Date: Thu, 23 Aug 2007 11:09:28 +0600 From: Boris Kovalenko <boris@ntmk.ru> To: Kostik Belousov <kostikbel@gmail.com>, freebsd-ports@freebsd.org Subject: Re: can not find -lgcc_s Message-ID: <46CD1688.6020308@ntmk.ru> In-Reply-To: <20070823042721.GK2738@deviant.kiev.zoral.com.ua> References: <46CC0550.8080209@ur.evraz.com> <20070822110302.GH2738@deviant.kiev.zoral.com.ua> <46CD03C0.9080002@ntmk.ru> <20070823042721.GK2738@deviant.kiev.zoral.com.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello! boris# cc -v -r -o common.o stream.o config.o memory.o Using built-in specs. Target: amd64-undermydesk-freebsd Configured with: FreeBSD/amd64 system compiler Thread model: posix gcc version 4.2.0 20070514 [FreeBSD] /usr/bin/ld --eh-frame-hdr -V -dynamic-linker /libexec/ld-elf.so.1 -o common.o -r /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib -L/usr/lib stream.o config.o memory.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o GNU ld version 2.15 [FreeBSD] 2004-05-23 Supported emulations: elf_i386_fbsd elf_x86_64_fbsd /usr/bin/ld: cannot find -lgcc_s ld -r -o common.o stream.o config.o memory.o ld -shared -L/usr/lib -o libresin_os.so jni_os.o jni_jvmti.o jni_jvmdi.o -pthread ld: unrecognized option '-pthread' ld: use the --help option for usage information IMHO, the resin3 in not ready for separate cc/ld compilation. But what type of workaround may I try to use? > 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. > With respect, Boris
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46CD1688.6020308>