Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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/ && if [ -f 32/ ]; then mv -f 32/ 32/lib; else true; fi && mv 32/ 32/ && ln -s 32/
    /tools/x86_64-unknown-linux-gnu/bin/ld: skipping incompatible /usr/lib/../lib/li 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/ 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/] 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
    South England
    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 '' 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 .)

  3. #3
    Just Joined!
    Join Date
    Mar 2012

    ld skipping incompatible library

    This must be another problem, because if the library could not be found it will say something like "/usr/bin/ld -lc: could not locate library". Your message sounds more then a library which is different then your headers. "/usr/bin/ld -lc: skipping incompatible library" is emitted when you try to link a 32bit program to a 64bit library (in my case it was this problem), and I could solve this with "LD_LIBRARY_PATH=blah:blah/blah". Don't forget that you can also use the option "--build-sysroot=/blah".

  4. $spacer_open
  5. #4
    Join Date
    May 2004
    arch linux
    this thread is almost 6 years old, so locking...

Posting Permissions

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