[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#498744: [Pkg-ia32-libs-maintainers] Bug#498744: gcc -m32 seems to ignore -L flag



Ron Garret <ron@flownet.com> writes:

> Package: gcc, ia32-libs
> Version: 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
>
> I am getting the oft-reported "skipping incompatible /usr/bin/../lib/ 
> libc.a when searching for -lc" problem when trying to compile 32 bit  
> binaries on a 64-bit machine.  However, I have tried all of the usual  
> fixes and none of them work.  In particular, gcc seems to be ignoring  
> my -L flag:

Not a bug in ia32-libs as it is not involved here at all. The core
libraries and gcc come in their own packages on amd64.

Mak sure you have gcc-multilib and libc6-dev-i386 installed.

> [ron@monster1:~]$ gcc -m32 -L/usr/lib32 test.c
> /usr/bin/ld: skipping incompatible /usr/bin/../lib/libc.so when  
> searching for -lc
> /usr/bin/ld: skipping incompatible /usr/bin/../lib/libc.a when  
> searching for -lc
> /usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for  
> -lc
> /usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for - 
> lc
> /usr/bin/ld: cannot find -lc
> collect2: ld returned 1 exit status

The "skipping" is perfeclty fine. That just means it finds a 64bit
version while searching for a 32bit version and ignores it.

As for not finding the 32bit version amke sure you actualy do have it
and then look with "strace -f -s1024" what arguments are passed to
ld. If there is no /usr/lib32 in that then you have a bug.

MfG
        Goswin





Reply to: