building 'native', 'cross' and 'cross-native' GCCs

Michael Zintakis
Wed Mar 16 17:12:00 GMT 2011

I've installed and tried, in vain, to build my x86_64->powerpc (603e or 
G2 as it is also known) toolchain but was ultimately frustrated by failure!

The error I am getting and see no way around is during the "Installing C 
library" stage:

  make[3]: *** 
Error 1
  make[2]: *** [elf/subdir_lib] Error 2
  make[1]: *** [all] Error 2
  Build failed in step 'Installing C library'
  Error happened in '/home/mz/gcc/crosstool-ng-1.10.0/scripts/functions' 
in function 'CT_DoExecLog' (line unknown, sorry)
        called from 
at line # 251 in function 'do_libc'
        called from 
'/home/mz/gcc/crosstool-ng-1.10.0/scripts/' at line # 606 
in function 'main'
  Look at 
'/home/mz/gcc-test/install/powerpc-unknown-linux-gnu/build.log' for more 
info on this error.
(elapsed: 21:12.18)
 make: *** [build] Error 2

The appropriate log file reveals this:

  powerpc-unknown-linux-gnu-gcc      -nostdlib -nostartfiles -r -o 
-lgcc '-Wl,-)' 
In function `_dl_addr_inside_object':
  /home/mz/gcc-test/build/src/glibc-2.12.2/elf/dl-addr.c:157: multiple 
definition of `_dl_addr_inside_object'
first defined here
multiple definition of `__libc_multiple_libcs'
first defined here
In function `_dl_start':
multiple definition of `_dl_start'
first defined here
In function `_itoa':
multiple definition of `_itoa'
first defined here
  collect2: ld returned 1 exit status
  make[3]: *** 
Error 1
  make[3]: Leaving directory `/home/mz/gcc-test/build/src/glibc-2.12.2/elf'
  make[2]: *** [elf/subdir_lib] Error 2
  make[2]: Leaving directory `/home/mz/gcc-test/build/src/glibc-2.12.2'
  make[1]: *** [all] Error 2
  make[1]: Leaving directory 

Googling "multiple definition of `_dl_addr_inside_object'" suggests a 
couple of things to try:

1. removing "-fstack-protector" (I use this option when building gcc);
2. force this by adding "-fno-stack-protector" to both the gcc and glibc 
3. use "-j1" instead of (my usual) "-j3"

Unfortunately none of this worked and I am really stuck and very 
frustrated, so would appreciate any help from the list with regards to 
how to overcome this problem.

My latest version of the .config file I used during the build is 
attached to this message (if it is scrubbed by the mailing list daemon 
please let me know and I will include it in-line as a separate message).

During the whole thing I discovered various bugs in crosstool-ng and 
also have a few suggestions/questions which I will post in a separate 
thread as I do not wish to pollute this one.

The versions of the packages I am using/building is:

gcc 4.5.2
gmp 4.3.1
mpfr 3.0.0
binutils 2.21
cloog-ppl 0.15.10
glibc 2.12.2
libelf 0.8.13
mpc 0.8.2
linux kernel 2.6.35

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: .config
URL: <>
-------------- next part --------------
For unsubscribe information see

More information about the crossgcc mailing list