Compiling Haiku on R1/alpha2 cannot because wrong version gcc 2.95

I’m trying to compile Haiku on R1/alpha2 for a gcc4 hybrid. I had already done so previously for a previous compile of Haiku and it worked. At first I tried to just do a:

~/develop/haiku/haiku> svn update

but that returned a message something like: malformed file. Cannot remember the exact message.
I then deleted everything in ~/develop/ and downloaded everything again with this terminal command:

svn checkout http://svn.haiku-os.org/haiku/haiku/trunk haiku/haiku

After the source download I do:

cd generated.x86gcc4
  ../configure --alternative-gcc-output-dir ../generated.x86gcc2 --cross-tools-prefix /boot/develop/abi/x86/gcc4/tools/current/bin/

That works alright. I then in terminal:

cd ..
  cd generated.x86gcc2
  ../configure --alternative-gcc-output-dir ../generated.x86gcc4 --cross-tools-prefix /boot/develop/abi/x86/gcc2/tools/current/bin/

That returns:

GCC version 2.95.3-haiku-100712 is required!
Please download it from www.haiku-os.org...

I cannot find this version anywhere. Where do I get it? Can I do something to make it use the version in R1/alpha2? That is: gcc-2.95.3-haiku-100420.

[quote=tonestone57]The last part on that gcc is the date; 100712 = July 12, 2010

Would say that gcc was updated on that date. You either can a) update to more recent haiku image (one after that date) or b) download, compile and install newer buildtools.[/quote]
Where can I download buildtools from or what command do I use in terminal?

I tried this but it wouldn’t compile.

checking out Build Tools:
http://www.haiku-os.org/guides/building/get-source

There is some information in the build tools directory to get you going. Read the instructions to build gcc 2.95.

Change line 319 in configure, delete both of your generated folders to start fresh otherwise may not work and then try running configure (should work).
http://dev.haiku-os.org/browser/haiku/trunk/configure#L318

I still cannot get it to compile. I downloaded gcc 2.95. It seemed a bit in error the way it downloaded. My directory structure is like this: ~/Develop/haiku/haiku. I started the download in ~/Develop. Instaed of the download fokder structure having two haiku folders one in the other. It had a trunk folder. No buildtools folder. All the folders/files in /trunk were for gcc.2.95, so the download skipped my haiku folder. What I did was copy all the folders and files in /trunk to the ~/Develop/haiku/buildtools.

  1. From ~/Develop/haiku/haiku/generated.x86gcc2, I did this in terminalL
~> ../configure --alternative-gcc-output-dir ../generated.x86gcc4 --build-cross-tools ../../buildtools/
  1. Then in ~/Develop/haiku/haiku/generated.x86gcc4, I did this:
~>  ../configure --alternative-gcc-output-dir ../generated.x86gcc2 --build-cross-tools-gcc4 x86 ../../buildtools/

I then made sure the drive and partition that I wanted to put haiku on had the correct permissions.
3. In terminal I then started to build the haiku revision with this command:

~/develop/haiku/haiku/generated.x86gcc4> jam -q @disk /boot/home/develop/haiku/haiku/generated.x86gcc4/Jamfile: No such file or directory
don't know how to make @disk
...found 1 target(s)...
...can't find 1 target(s)...

So I thought after giving that message that I must also build jam first. I went into ~/Develop/haiku/buildtools/jam and in terminal did this:

> make

then

> ./jam0 -sBINDIR=$HOME/bin install

I then repeated 1-3 above but still got the same problem with no jamfile in 3.

the ./configure --build-cross-tools is meant to run on Linux, FreeBSD, other OSes - I’m not sure if that works on Haiku.

I thought you wanted to build newer gcc and replace the one that came with Haiku (instructions for that in buildtools folder).

When you do ./configure --build-cross-tools, does it compile gcc for you? (you should see a cross tools folder in your generated folder). Takes 30 minutes or longer to compile build tools.

Do you have a Jamfile in your generated folder?

Is @disk specified in your UserBuild file?

Do you have a build folder in your generated folder? I cannot recall the name but there is a file under build folder that is important (lists gcc to use and other information). Was this file created for you?

Just try jam in your generated folder and see what happens.

The last part on that gcc is the date; 100712 = July 12, 2010

Would say that gcc was updated on that date. You either can a) update to more recent haiku image (one after that date) or b) download, compile and install newer buildtools.

You can open up configure (in Pe or Styledit), search for 100712 and change back to older gcc version. This may or may not allow Haiku to build. Will depend on what changes happened to gcc 2.95. You can try this first but if you notice broken build, then you will have to do a) or b) above.

Since R1A2, there’s been some changes in Haiku’s public headers. At this point, it’s easiest to install a new nightly image, instead of trying to get R1A2 to compile trunk.

http://www.freelists.org/post/haiku-commits/r37380-haikutrunkheadersposix,6 is part of what would need to be updated… not sure what else would be needed.

I could not see any specific gcc2.95 for haiku on that page so thought it must be included in buildtools.

Yes there is a “cross-tools-build” and “cross-tools” folder in both “generated.x86gcc4” and “generated.x86gcc2”

No

Yes:
DefineBuildProfile disk : disk : “/dev/disk/ata/2/master/1” ;
DefineBuildProfile vmware : vmware-image ;

switch $(HAIKU_BUILD_PROFILE) {
case “disk” : {
AddOptionalHaikuImagePackages Development ;
}

case "vmware" : {
	HAIKU_IMAGE_SIZE = 900 ;
}

}

There is a build fol;der but nothing in it.

I doen’t matter. I updated Haiku with nightly image r37730.