Opened 17 years ago

Closed 16 years ago

#1739 closed enhancement (fixed)

Include a build system script to generate a proper 'develop' directory on Haiku

Reported by: nielx Owned by: bonefish
Priority: blocker Milestone: R1/alpha1
Component: Build System Version: R1/pre-alpha1
Keywords: Cc: zooey, andreasf, scottmc, briandabrain@…
Blocked By: Blocking:
Platform: x86

Description (last modified by nielx)

The build system should have support for creating a working development environment on Haiku.

This means creating a '/boot/develop/' structure and including a working GCC 2.95.3 in that.

It might also mean installing the Makefile engine that is used by a lot of projects, but that's open for interpretation.

Attachments (2)

build_developer_tools.sh (3.5 KB ) - added by nielx 17 years ago.
Build script for the legacy gcc
legacy-gcc-haiku-compile-fix.diff (1.5 KB ) - added by nielx 17 years ago.
Fix for building the legacy gcc compiler for haiku

Download all attachments as: .zip

Change History (27)

by nielx, 17 years ago

Attachment: build_developer_tools.sh added

Build script for the legacy gcc

by nielx, 17 years ago

Fix for building the legacy gcc compiler for haiku

comment:1 by nielx, 17 years ago

Adding one note: the gcc patches do not break creating a cross-compiler on linux.

comment:2 by nielx, 17 years ago

Some more poking around. Building a native gcc 4.1.2 with a cross-compiler fails because the cross-linker accepts undefined symbols in applications. This should only happen in shared libraries (and perhaps static). Does anybody know where to look to to change this behavior? Thanks!

comment:3 by nielx, 17 years ago

Another update. I managed to get configure to work correctly by passing the '-z defs' option, which is passed on to the linker. How do i put this in the specs?

comment:4 by nielx, 17 years ago

Priority: normalblocker

Making this a blocker. Even though my script might not make it, this ticket can be used as an umbrella for everything needed to build haiku on haiku.

comment:5 by stippi, 17 years ago

Actually, I prefer one ticket per issue. I get confused by tickets which mention multiple different types of issues. Sometimes even comments introduce new (sometimes related sometimes not really related) issues. Then you can't close a ticket without reading all the comments first to see if something would be missed. That's why a prefer one ticked per distinct, precise issue.

comment:6 by bonefish, 17 years ago

I agree with Stephan.

The only thing still missing is a downloadable zip file containing a native gcc, BTW. I intend to create one when I actually get around to finishing the tool chain port.

comment:7 by nielx, 17 years ago

Description: modified (diff)

Well, I agree too, and the summary of this tickets states that the issue is to create a setting in the build system that creates a proper working develop directory. I updated the description to match the summary. Consider this ticket as a step in the self-hosting requirement.

comment:8 by nielx, 17 years ago

Ingo, as far as I can see you satisfied the requirements of this ticket, didn't you?

Can this ticket be closed?

in reply to:  8 comment:9 by bonefish, 17 years ago

Status: newassigned

Replying to nielx:

Ingo, as far as I can see you satisfied the requirements of this ticket, didn't you?

Nope, a few tools are still missing (jam, flex, bison).

Can this ticket be closed?

Will do when I've added the missing stuff.

comment:10 by nielx, 17 years ago

I'm compiling another status report, what's still missing?

in reply to:  10 ; comment:11 by bonefish, 17 years ago

Replying to nielx:

I'm compiling another status report, what's still missing?

Aparently everything to build Haiku is included now. So feel free to close the ticket, if you like. On my list are still a few things, though:

  • subversion
  • OpenSSH (not directly development related, but needed for BerliOS non-anonymous svn)
  • gettext: Needed by the auto tools for certain packages.
  • make is a build tool, but included in the Haiku sources. I'd like to re-port it.

comment:12 by andreasf, 17 years ago

Cc: andreasf added

in reply to:  11 ; comment:13 by andreasf, 17 years ago

Is it on purpose that the BSD compatibility headers are not being included? libbsd.so is being linked from the develop/lib/x86 folder.

For instance, getpass is being detected, but in order to use it the prototype is needed.

comment:14 by andreasf, 17 years ago

Similarly, I can't find the freetype2 headers despite libfreetype.so being linked there. I'd expect them under 3rdparty.

comment:15 by scottmc, 17 years ago

Cc: scottmc added

in reply to:  13 comment:16 by andreasf, 17 years ago

Update: bsd headers were included in hrev25137.

in reply to:  14 comment:17 by andreasf, 17 years ago

In addition to the missing freetype2 headers, the freetype-config tool and its pkg-config files are missing.

pkg-config files are also missing for libpng, whose headers are present under 3rdparty.

comment:18 by scottmc, 16 years ago

This ticket actually has a handful of tasks still to be done. There is a milestone on HaikuPorts for it: http://ports.haiku-files.org/query?group=status&milestone=Haiku+self-hosting Many of them are now including in the haiku development builds even though the tickets aren't closed: http://haiku-files.org/files/optional-packages/[[BR]]

From Ingo's list above:

  • subversion

* OpenSSH (not directly development related, but needed for BerliOS non-anonymous svn)

  • gettext: Needed by the auto tools for certain packages.

* make is a build tool, but included in the Haiku sources. I'd like to re-port it.

in reply to:  18 comment:19 by andreasf, 16 years ago

Replying to scottmc:

This ticket actually has a handful of tasks still to be done. There is a milestone on HaikuPorts for it:

While the HaikuPorts milestone is certainly relevant for development on Haiku, Ingo indicated above that this ticket could be closed despite the missing tools he listed. So what's keeping this develop-directory ticket open would be only the missing develop contents, no? If we do want to track other tool availability, we could do so in a separate ticket, now that Trac has dependency tracking. I'll look into packaging neon and Subversion 1.4.x shortly.

For the freetype headers I had a one-line patch against OptionalPackages to add them, but it was useless without freetype-config (which would need to be built first) and pkg-config files (that may need to be preprocessed before copying).

Index: build/jam/OptionalPackages
===================================================================
--- build/jam/OptionalPackages	(Revision 25608)
+++ build/jam/OptionalPackages	(Arbeitskopie)
@@ -92,6 +92,7 @@
 	AddHeaderDirectoryToHaikuImage libs ncurses : 3rdparty ;
 	AddHeaderDirectoryToHaikuImage libs png : 3rdparty ;
 	AddHeaderDirectoryToHaikuImage libs zlib : 3rdparty ;
+	AddHeaderDirectoryToHaikuImage libs freetype2 : 3rdparty ;
 
 	if $(HAIKU_GCC_VERSION[1]) > 2 {
 		# gcc 4

I dropped that incomplete patch for my Bluetooth patch and was short on time lately. This line could already be added if still missing.

comment:20 by mmlr, 16 years ago

Note that there is already an subversion 1.4.6 package available as the "Subversion" OptionalPackage. It was added in hrev26158 and has been in there for 4 weeks now.

comment:21 by stippi, 16 years ago

I am trying to take care of make and an updated makefile engine. Many BeOS software relies on that. Ingo wrote a better/updated version that handles object dependencies better a couple years back, I wanted to compile a proper optional package from that. I also prepared an optional package for CVS. I did compile pkg-config on/for Haiku, but it requires changes to the SetupEnvironment script. I need to figure out if this can be done via the OptionalPackage build feature of if I need to find another way.

in reply to:  20 comment:22 by andreasf, 16 years ago

Replying to mmlr:

Note that there is already an subversion 1.4.6 package available as the "Subversion" OptionalPackage. It was added in hrev26158 and has been in there for 4 weeks now.

Thanks for the notice, I've not been running Haiku for a number of weeks. I am going to work on Subversion anyway since I heard Subversion 1.5 was out by now. :)

comment:23 by psudobuddha, 16 years ago

Cc: briandabrain@… added

comment:24 by scottmc, 16 years ago

I've created a new ticket to cover the freetype issues, it's #2949. I think this was the only remaining open issue for this ticket.

comment:25 by axeld, 16 years ago

Resolution: fixed
Status: assignedclosed

So I guess this one can be closed, then, right?

Note: See TracTickets for help on using tickets.