[Clfs-support] Error when compiling glibc 2.22 (32 bit): incompatible libgcc.a being skipped

Montorsi, Francesco fmontorsi at empirix.com
Fri May 6 09:05:23 PDT 2016


Hi all,
This is my first post to this list.

I'm trying to follow the CLFS guide "Version SYSVINIT-20160313-x86_64-Multilib". I did manage to successfully achieve all steps of an older guide, employing older compiler/glibc/kernel header versions... now I need to update the cross-compile tools but I get an error when following the latest CLFS book:
    http://clfs.org/view/sysvinit/x86_64/cross-tools/glibc.html

In particular I managed to:
1) compile all required libs for GCC
2) compile GCC 5.3.0 statically for creating the temporary toolchain in /cross-tools

Next step 3) would be building glibc in 32 bits but it fails... the error I get is:

-------------------

...
x86_64-unknown-linux-gnu-gcc -m32 -B/cross-tools/bin/   -nostdlib -nostartfiles -r -o /home/clfs/sources/gcc_glibc/glibc-build/elf/librtld.map.o '-Wl,-(' /home/clfs/sources/gcc_glibc/glibc-build/elf/dl-allobjs.os /home/clfs/sources/gcc_glibc/glibc-build/libc_pic.a -lgcc '-Wl,-)' -Wl,-Map,/home/clfs/sources/gcc_glibc/glibc-build/elf/librtld.mapT
/cross-tools/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../x86_64-unknown-linux-gnu/bin/ld: skipping incompatible /cross-tools/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/libgcc.a when searching for -lgcc
/cross-tools/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find -lgcc
collect2: error: ld returned 1 exit status
Makefile:322: recipe for target '/home/clfs/sources/gcc_glibc/glibc-build/elf/librtld.map' failed
make[3]: *** [/home/clfs/sources/gcc_glibc/glibc-build/elf/librtld.map] Error 1
make[3]: Leaving directory '/home/clfs/sources/gcc_glibc/glibc-2.22/elf'
Makefile:213: recipe for target 'elf/subdir_lib' failed
make[2]: *** [elf/subdir_lib] Error 2
make[2]: Leaving directory '/home/clfs/sources/gcc_glibc/glibc-2.22'
Makefile:9: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/clfs/sources/gcc_glibc/glibc-build'
makefile:274: recipe for target 'glibc_32bit' failed
make: *** [glibc_32bit] Error 2
...
-------

The problem IMHO is that the libgcc.a created in step 2) is a 64bit library, while glibc 32 bit perhaps needs it in 32 bit architecture.

Note that for my setup "export" returns:

...
declare -x CLFS_HOST="x86_64-cross-linux-gnu"
declare -x CLFS_TARGET="x86_64-unknown-linux-gnu"
declare -x CLFS_TARGET32="i686-pc-linux-gnu"
...

What do you suggest? What else can I post to get help :) ?

Thanks,
Francesco Montorsi


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clfs.org/pipermail/clfs-support-clfs.org/attachments/20160506/63df6a8b/attachment-0001.html>


More information about the Clfs-support mailing list