Bug 442198 - ld: cannot find -lgcc_s with -m elf_i386 even though -L/usr/lib/gcc/x86_64-redhat-linux/4.3.0/32 is passed
ld: cannot find -lgcc_s with -m elf_i386 even though -L/usr/lib/gcc/x86_64-re...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: binutils (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-12 13:36 EDT by Lubomir Kundrak
Modified: 2008-04-12 13:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-12 13:38:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Lubomir Kundrak 2008-04-12 13:36:00 EDT
Description of problem:

mock-chroot> gcc -v -o conftest -m32 conftest.c
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-cpu=generic --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.3.0 20080404 (Red Hat 4.3.0-6) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-o' 'conftest' '-m32' '-mtune=generic'
 /usr/libexec/gcc/x86_64-redhat-linux/4.3.0/cc1 -quiet -v -imultilib 32
conftest.c -quiet -dumpbase conftest.c -m32 -mtune=generic -auxbase conftest
-version -o /tmp/ccMxSNrf.s
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-redhat-linux/4.3.0/include-fixed"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-redhat-linux/4.3.0/../../../../x86_64-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc/x86_64-redhat-linux/4.3.0/include
 /usr/include
End of search list.
GNU C (GCC) version 4.3.0 20080404 (Red Hat 4.3.0-6) (x86_64-redhat-linux)
        compiled by GNU C version 4.3.0 20080404 (Red Hat 4.3.0-6), GMP version
4.2.2, MPFR version 2.3.0-p2.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 57c66a39f9931edd83b9090a874bd1dd
COLLECT_GCC_OPTIONS='-v' '-o' 'conftest' '-m32' '-mtune=generic'
 as -V -Qy --32 -o /tmp/ccInahTn.o /tmp/ccMxSNrf.s
GNU assembler version 2.18.50.0.6 (x86_64-redhat-linux) using BFD version
version 2.18.50.0.6-2 20080403
COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/4.3.0/:/usr/libexec/gcc/x86_64-redhat-linux/4.3.0/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.3.0/:/usr/lib/gcc/x86_64-redhat-linux/:/usr/libexec/gcc/x86_64-redhat-linux/4.3.0/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.3.0/:/usr/lib/gcc/x86_64-redhat-linux/
LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/4.3.0/32/:/usr/lib/gcc/x86_64-redhat-linux/4.3.0/32/:/usr/lib/gcc/x86_64-redhat-linux/4.3.0/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-redhat-linux/4.3.0/:/usr/lib/gcc/x86_64-redhat-linux/4.3.0/:/usr/lib/gcc/x86_64-redhat-linux/4.3.0/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-o' 'conftest' '-m32' '-mtune=generic'
 /usr/libexec/gcc/x86_64-redhat-linux/4.3.0/collect2 --eh-frame-hdr --build-id
-m elf_i386 --hash-style=gnu -dynamic-linker /lib/ld-linux.so.2 -o conftest
/usr/lib/gcc/x86_64-redhat-linux/4.3.0/../../../../lib/crt1.o
/usr/lib/gcc/x86_64-redhat-linux/4.3.0/../../../../lib/crti.o
/usr/lib/gcc/x86_64-redhat-linux/4.3.0/32/crtbegin.o
-L/usr/lib/gcc/x86_64-redhat-linux/4.3.0/32
-L/usr/lib/gcc/x86_64-redhat-linux/4.3.0/32
-L/usr/lib/gcc/x86_64-redhat-linux/4.3.0/../../../../lib -L/lib/../lib
-L/usr/lib/../lib -L/usr/lib/gcc/x86_64-redhat-linux/4.3.0
-L/usr/lib/gcc/x86_64-redhat-linux/4.3.0
-L/usr/lib/gcc/x86_64-redhat-linux/4.3.0/../../.. /tmp/ccInahTn.o -lgcc
--as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed
/usr/lib/gcc/x86_64-redhat-linux/4.3.0/32/crtend.o
/usr/lib/gcc/x86_64-redhat-linux/4.3.0/../../../../lib/crtn.o
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-redhat-linux/4.3.0/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-redhat-linux/4.3.0/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
mock-chroot> 
 
Additional info:

conftest.c is just "main () {}"
This worked in Fedora 8.
Comment 1 Lubomir Kundrak 2008-04-12 13:38:13 EDT
Uh, sorry for the noise

mock-chroot> file /usr/lib/gcc/x86_64-redhat-linux/4.3.0/32/libgcc_s.so 
/usr/lib/gcc/x86_64-redhat-linux/4.3.0/32/libgcc_s.so: broken symbolic link to
`/lib/libgcc_s.so.1'
mock-chroot> 

Note You need to log in before you can comment on or make changes to this bug.