Find the answer to your Linux question:
Results 1 to 2 of 2
Binutils compiled successfully but when I run the "make bootstrap" command to compile GCC I get an error (after a few minutes): libgcc/32/unwind-c_s.o -lc && rm -f 32/libgcc_s.so && if ...
  1. #1
    Just Joined!
    Join Date
    Jul 2006
    Posts
    52

    Linux From Scratch GCC Compile Error



    Binutils compiled successfully but when I run the "make bootstrap" command to compile GCC I get an error (after a few minutes):

    libgcc/32/unwind-c_s.o -lc && rm -f 32/libgcc_s.so && if [ -f 32/libgcc_s.so.1 ]; then mv -f 32/libgcc_s.so.1 32/lib gcc_s.so.1.backup; else true; fi && mv 32/libgcc_s.so.1.tmp 32/libgcc_s.so.1 && ln -s libgcc_s.so.1 32/libgcc_s.so
    /tools/x86_64-unknown-linux-gnu/bin/ld: skipping incompatible /usr/lib/../lib/li bc.so when searching for -lc
    /tools/x86_64-unknown-linux-gnu/bin/ld: skipping incompatible /usr/lib/../lib/li bc.a when searching for -lc
    /tools/x86_64-unknown-linux-gnu/bin/ld: skipping incompatible /usr/lib/libc.so w hen searching for -lc
    /tools/x86_64-unknown-linux-gnu/bin/ld: skipping incompatible /usr/lib/libc.a wh en searching for -lc
    /tools/x86_64-unknown-linux-gnu/bin/ld: cannot find -lc
    collect2: ld returned 1 exit status
    make[3]: *** [32/libgcc_s.so] Error 1
    make[3]: Leaving directory `/mnt/lfs/tools/gcc-build/gcc'
    make[2]: *** [stmp-multilib] Error 2
    make[2]: Leaving directory `/mnt/lfs/tools/gcc-build/gcc'
    make[1]: *** [stage1_build] Error 2
    make[1]: Leaving directory `/mnt/lfs/tools/gcc-build/gcc'
    make: *** [bootstrap] Error 2
    Any ideas?

  2. #2
    Just Joined!
    Join Date
    Oct 2006
    Location
    South England
    Posts
    5
    It seems like you're missing a required libraries .
    You see where it says
    >>/tools/x86_64-unknown-linux-gnu/bin/ld: cannot find -lc

    That means it cant find 'libc' . probably something like 'libc.so.6' or 'libc-2.3.6'.
    I think you need to install Glibc . If you're doing LFS , you'll probably need to install 'Glibc-2.3.6' , then do GCC .


    >>/tools/x86_64-unknown-linux-gnu/bin/ld: cannot find -lc
    ^If (when you run a configure script for the source you're building) you add 'x86_64-myos-linux-gnu' , you'll have your own custom target .

    eg. ./configure --prefix=/usr x86_64-"put-distro-name-here"-linux-gnu
    then it wont be targeted at 'x86_64-unknown-linux-gnu' .
    (Its a good idea to specify your target for building Gcc+Binutils etc .)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •