Bug 235256

Summary: gcc library libgcc_s not found by linker (for g77)
Product: [openSUSE] openSUSE 10.2 Reporter: Joseph Comfort <Joseph.Comfort>
Component: DevelopmentAssignee: Philipp Thomas <pth>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Final   
Target Milestone: ---   
Hardware: i586   
OS: SUSE Other   
Whiteboard:
Found By: Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: linker script

Description Joseph Comfort 2007-01-15 21:23:41 UTC
I have a fortran (g77) code that must be linked against a library that is provided.  There was no problem with 10.1 or 10.0.  There appears to be some repackaging in 10.2, and that breaks the linking, with the linker not able to find libgcc_s.  In fact, /lib/libgcc_s.so.1 is installed, but the soft link to it is not in the linker search path.  I have installed the rpms: cpp, cpp41, compat-g77, gcc. gcc-c++, gcc-fortran, gcc41, gcc41-c++, gcc41-fortran, libgcc41, and libgfortran41.  The messages from the command are:

megpc2:/usr/local/fluka # flutil/lfluka -m fluka -L /usr/local/fluka -L /lib
$FLUPRO = /usr/local/fluka
ar x /usr/local/fluka/libflukahp.a fluka.o
rm: cannot remove `flukahp.map': No such file or directory
g77 -O3 -g -mcpu=pentiumpro -fexpensive-optimizations -funroll-loops
-fstrength-reduce -Wall -fno-automatic -fno-silent -m32 -ffortran-bounds-check
-I/usr/local/fluka/flukapro -v -o flukahp -Xlinker -Map -Xlinker flukahp.map
fluka.o -L/usr/local/fluka -L/lib -lflukahp
Driving: g77 -O3 -g -mcpu=pentiumpro -fexpensive-optimizations -funroll-loops
-fstrength-reduce -Wall -fno-automatic -fno-silent -m32 -ffortran-bounds-check
-I/usr/local/fluka/flukapro -v -o flukahp -Xlinker -Map -Xlinker flukahp.map
fluka.o -L/usr/local/fluka -L/lib -lflukahp -lfrtbegin -lg2c -lm -shared-libgcc
Reading specs from /usr/lib/gcc-lib/i586-suse-linux/3.3.5/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr
--with-local-prefix=/usr/local --infodir=/usr/share/info
--mandir=/usr/share/man --enable-languages=c,f77 --disable-checking
--libdir=/usr/lib --disable-libgcj --with-slibdir=/lib --with-system-zlib
--enable-shared --enable-__cxa_atexit i586-suse-linux
Thread model: posix
gcc version 3.3.5 20050117 (prerelease) (SUSE Linux)
 /usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../../i586-suse-linux/bin/ld
--eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o flukahp
/usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../crt1.o
/usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../crti.o
/usr/lib/gcc-lib/i586-suse-linux/3.3.5/crtbegin.o -L/usr/local/fluka -L/lib
-L/usr/lib/gcc-lib/i586-suse-linux/3.3.5
-L/usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../../i586-suse-linux/lib
-L/usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../.. -Map flukahp.map fluka.o
-lflukahp -lfrtbegin -lg2c -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
/usr/lib/gcc-lib/i586-suse-linux/3.3.5/crtend.o
/usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../crtn.o
/usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../../i586-suse-linux/bin/ld:
cannot find -lgcc_s

I will attach the linker script (as provided), if it is needed.  I haven't yet found a way around the problem.  Maybe I can stick a soft link somewhere, but the issue might pop up with other applications or users as well. Thank you.
Comment 1 Joseph Comfort 2007-01-15 21:26:26 UTC
Created attachment 113032 [details]
linker script

The linking shell script.
Comment 2 Andreas Hanke 2007-01-16 03:56:14 UTC

*** This bug has been marked as a duplicate of bug 218406 ***