Hello - struggling to compile on PPC64

Darren Critchley darren at kdi.ca
Wed Mar 30 08:06:49 EST 2005

Hello, I am working on a conversion project going from IA32(Intel 
Architecture) to PowerPC64, the target will most likely be iSeries.

The current project is a complete distribution that is built on IA32 
using modified build scripts based on Linux From Scratch (LFS) 5.1.1 
Basically LFS allows one to build a basic distribution from scratch, and 
in fact we have used this build process to build an installable distro 
for IA32. The build script I use, creates a new tool chain independant 
of the host systems glibc, gcc, binutils and other compiler tools. It 
then chroots itself to this toolchain and builds the entire distro in a 
build directory. The kernel that I use for that is a 2.4.29. After 
compilation, the build directory is then tarred up and placed on a 
bootable CD with a setup program, etc, effectively becoming a complete 
installable distro.
(an excellent example of this build process can be found at 
www.ipcop.org, they use it to build a secure distro from scratch. Much 
of my build script was taken from there)

My objective is to make this build script/process work on power5 to 
produce a distro that can be loaded onto a power5. At this point in time 
I do not care if it is 32 or 64 bit, we just want to get something built 
on the power5 platform. To this end, I reserved a machine through IBM's 
(VLP) Virtual Loaner Program. It is running RHEL3 with a 2.4.21 kernel. 
I have been told by IBM that I should be able to accomplish what I want 
on this box as long as I do not require SCSI support, which I don't.

I uploaded the source and buildscript to the VLP box. I have made some 
changes to the build scrip to recognize that it is running on PPC and 
that the target will be PPC.
It builds the first few programs: sed-4.0.9, m4-1.4, bison-1.875, 
flex-2.5.4a, binutils-, and when gcc-3.3.3 tries to build it 
ends with this error:
/tools/powerpc64-unknown-linux-gnu/bin/ld: warning: powerpc:common 
architecture of input file `/usr/lib/crti.o' is incompatible with 
powerpc:common64 output
/tools/powerpc64-unknown-linux-gnu/bin/ld: warning: powerpc:common 
architecture of input file `/usr/lib/crtn.o' is incompatible with 
powerpc:common64 output
/tools/powerpc64-unknown-linux-gnu/bin/ld: can not size stub section: 
Bad value
/tools/powerpc64-unknown-linux-gnu/bin/ld: libgcc_s.so.1: Not enough 
room for program headers, try linking with -N
/tools/powerpc64-unknown-linux-gnu/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status

I have looked up those errors and found nothing useful about it.
What I am looking for is a really good how to on developing something 
like this on PPC64. I found a tool chain (biarch) from penguinppc.org, 
but the included scripts seem to reference what looks to be nightly CVS 
snapshots of glibc, binutils and gcc. Needless to say I have had no luck 
in getting that toolchain built either.

It would seem that the PPC64 information on the LFS site is limited, 
mainly because not many people have a power5 sitting around to play on, 
so it may be some time before they have any useful information on their 
Does anyone know of anyone else who has attempted or completed anything 
like this? Any information or help would be greatly appreciated.

Thanks in advance
Darren Critchley
Kobelt Development Inc

More information about the Linuxppc64-dev mailing list