gcc/ld problem

Miguel Bazdresch lfs-01 at thewizardstower.org
Thu Oct 28 07:38:40 PDT 2004

* Declan Moriarty <declan.moriarty at ntlworld.ie> [2004-10-28 12:36]:
> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/../../../../i686-pc-linux-gnu/bin/ld:
> installation problem, cannot exec
> `/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/../../../../i686-pc-linux-gnu/bin/ld':
> No such file or directory
> collect2: ld returned 255 exit status
> Hmmmph! The thing is there. I did the 'cd' from the appropiate directory
> just to check. But despite permissions of 751, it isn't executable
> [From my LFS-3.3, hence the extra '/lfs']
> root:~#cd /lfs/usr/i686-pc-linux-gnu/bin
> root:/lfs/usr/i686-pc-linux-gnu/bin#./ld
> bash: ./ld: No such file or directory
> root:/lfs/usr/i686-pc-linux-gnu/bin#ls
> ld*
> root:/lfs/usr/i686-pc-linux-gnu/bin#ls -l
> total 988
> -rwxr-xr-x    1 root     root      1004838 Oct 14  2003 ld*

I don't understand why the extra /lfs, but anyway, your problem is
likely to be that ld is linked against libraries that don't exist/cannot
be found in your system.

My system is BE-LFS from around july, but:

$ ldd /usr/bin/ld
        linux-gate.so.1 =>  (0xffffe000)
        libbfd- => /usr/lib/libbfd-
        libdl.so.2 => /lib/libdl.so.2 (0x4009a000)
        libc.so.6 => /lib/libc.so.6 (0x4009e000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

See that you have those libs in your system, and that they are in
either /lib or /usr/lib. (don't worry about linux-gate.so.1)

Miguel Bazdresch

More information about the blfs-support mailing list