Re: build gcc 4.1.1 on a PowerMac G5 running Yellow Dog Linux 4.0 fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Richardson, Joshua A. wrote:
Any ideas on this?  I've really gotten nowhere since I originally asked.  Thanks.

I'm having an issue trying to build gcc 4.1.1 on a PowerMac G5 running Yellow Dog Linux 4.0.
Is this a 64-bit system as default?  What does the 'uname -a' tell?
  Since I'm pretty new to building gcc, let me just lay out the steps I've taken and the errors I've gotten.

1. Running the following configure line:
a. ../gcc-4.1.1/configure --prefix=/usr/bin --enable-languages="c,c++' --disable-multilib

The configury "guesses" the $build, $host and $target via 'uname' I think...

> configure:3652: checking for powerpc64-unknown-linux-gnu-ar

This tells which system was guessed, a Linux/PPC64...

> /usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
> /usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
> /usr/bin/ld: cannot find -lc

What does the 'file /usr/lib/libc.so' say? Is it a 64-bit shared library? Is it a shared library at all?
My "original" YDL4.0 glibc-2.3.3 in my YDL4.0 targeted crosstoolchain has :

Dell:/opt/host-YellowDog4.0/usr/lib # cat libc.so
/* GNU ld script
  Use the shared library, but some functions are only in
  the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf32-powerpc)
GROUP ( libc.so.6 libc_nonshared.a )

and this tells that at least here the '*lib' has 32-bit stuff, not 64-bit stuff ! My guess is that your '/lib64' and '/usr/lib64' should have those 64-bit default libraries for 'powerpc64-linux-gnu' !

So please try the given simple sanity checks for finding out your situation

> Any idea on what I could be doing wrong?

Maybe your YDL4.0 system is 32-bit but the 'uname' tells the CPU being a 64-bit one. I don't know what that 'G5' is neither remembering for what type the YDL4.0 was made... I would guess it being purely 32-bit. We ignorant people may know the difference between a 32-bit CPU and a 64-bit CPU, so when asking it is always better to make the CPU type being clear... And also tell it right for the 'configure' if there is any possibility that it too could guess it wrong! Using something like :

  --host=powerpc-yellowdog-linux --target=powerpc-yellowdog-linux

in configure could be recommended to tell what you would like the compiler to be if it
should be a pure 32-bit one... For the right $host and $target name you should consult
your existing GCC, with 'gcc -v' or something. If wanting to use the same name as was
used with it. My one was guessed....

The :

  --prefix=/usr/bin

then is a little odd... The default for native GCC in Linux is the '--prefix=/usr'. With your choice the GCC driver binaries would be installed into '/usr/bin/bin', the target/GCC-version specific stuff into
'/usr/bin/lib/gcc/$target/4.1.1' and '/usr/bin/libexec/gcc/$target/4.1.1'


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux