can not find -lgcc_s

Kostik Belousov kostikbel at gmail.com
Wed Aug 22 21:27:29 PDT 2007


On Thu, Aug 23, 2007 at 09:49:20AM +0600, Boris Kovalenko wrote:
> Hello!
> 
>    This didn't helped.
> >On Wed, Aug 22, 2007 at 03:43:44PM +0600, "Boris Ju. Kovalenko / Б. Ю. 
> >Коваленко" wrote:
> >  
> >>Hello!
> >>
> >>cc -r -o common.o stream.o config.o memory.o 
> >>-rpath=/lib:/usr/lib:/usr/local/lib -L/usr/lib -L/lib -lcrypto -lssl
> >>/usr/bin/ld: cannot find -lgcc_s
> >>
> >>What is wrong? System is 7.0-CURRENT, AMD64, gcc 4.2.0, libgcc_s.so is 
> >>present in /usr/lib and is a symlik to /lib/libgcc_s.so.1
> >>    
> >Rebuild the libtool port,
> >portupgrade -f libtool.

Well, you can rerun the command manually, adding the -v option to the cc
arguments to see what happens exactly.

Looking closely on the command, it seems to be somewhat strange. -r switch
for ld means partial linking. I was not able to find -r switch in gcc
documentation, so, most likely, it shall be passed unmodified to ld.
But, since gcc driver was not instructed to not do the final linking,
it seems that it added neccessary libraries to the ld command line.

Most likely, because libgcc_s.so is shared object instead of relocatable one,
that is needed for incremental link, ld printed that diagnostic.

Please, do two things:
- rerun the command with cc -v and show me the output;
- change the cc to ld (most likely, you set LD=CC somewhere) and rerun the
  command. Incremental linking is usually done by direct invocation of ld.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20070823/507dea4b/attachment.pgp


More information about the freebsd-ports mailing list