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

Bug#211469: Missing symlink in libgcc1



On Wed, Sep 17, 2003 at 05:27:49PM -0500, Michael Schultheiss wrote:
> Package: libgcc1
> Version: 1:3.3.2-0pre3
> Severity: important
> 
> libgcc1 package installs /lib/libgcc_s.so.1 but does not establish a
> symlink /lib/libgcc_s.so to /lib/libgcc_s.so.1. This causes an app that
> tries to link with libgcc_s with "-lgcc_s" to fail. Here is an example:
>                                                                                 
> ld -share -soname libevl.so.1 -o libevl.so evl_log_write.os facreg.os
> formatrec.os posix1.os posix2.os posix_evlsup.os syslogat.os
> query/q.tab.os query/lex.qq.os query/normalize.os query/evaluate.os
> query/qopt.os template/bvfmt.os template/lex.tt.os template/serial.os
> template/template.os template/tmplfmt.os template/tmplmgmt.os
> template/tt.tab.os  util/evl_common.os  util/evl_list.os
> util/fmtbuf.os  util/format.os  util/scanner.os -lc -lgcc_s
> ld: cannot find -lgcc_s
>                                                                                 
> If the symlink libgcc_s.so is created and ldconfig is run again, above
> command links just fine.

Your ld command is incorrect.

No, really.  Do not ever, for any reason, use ld to build shared
libraries.  Use GCC.  If you say:
  gcc -shared -Wl,-soname,libevl.so.1 -o libevl.so blah.os blah.os

Then gcc will do the right thing with -lc, -lgcc_s, and the appropriate
CRT files - that shared library is missing crti.o and crtn.o for
instance, which could cause problems with constructors.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



Reply to: