[Gc] Re: Link failure on Cygwin

Ludovic Courtès ludo at gnu.org
Fri Sep 18 11:07:18 PDT 2009


Hi Ivan,

Ivan Maidanski <ivmai at mail.ru> writes:

> ludo at gnu.org (Ludovic CourtХs) wrote:
>> ...
>> > The problem is in the generated Makefile: THREADDLLIBS = -lpthread
>> > -ldl
>> > It works if changed to an empty list. Could anybody prepare the
>> > patch?
>>  configure' reads this:
>> 
>> --8<---------------cut here---------------start------------->8---
>> *-*-cygwin*) AC_DEFINE(GC_WIN32_THREADS)
>> AC_DEFINE(THREAD_LOCAL_ALLOC) win32_threads=true ;;
>> --8<---------------cut here---------------end--------------->8---
>> 
>> That is, $THREADDLLIBS is already empty AIUI.
>
> But, it isn't (or do you have something different?).
>
>>  Furthermore, I don't see how it would fix this bit:
>> 
>> --8<---------------cut here---------------start------------->8---
>> /bin/sh ./libtool --tag=CC --mode=link gcc -fexceptions -I
>> libatomic_ops/src -g -O2 -o libcord.la -rpath
>> /nix/store/7x8whr8b6hkwi8m85r76fs9d4xg81mkk-boehm-gc-7.1/lib
>> -version-info 1:3:0 -no-undefined cord/cordbscs.lo cord/cordprnt.lo
>> cord/cordtest.lo cord/cordxtra.lo ./libgc.la
>> 
>> *** Warning: This system can not link to static lib archive
>> ./libgc.la.  ...
>
> Look in to the log upper where libgc is crated - a dll shall be
> created but if -lpthread -ldl is present then a static one is created
> because of some unresolved symbols present.

Indeed.  This patch does the trick (tested on Cygwin 1.5.25):

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-patch
Size: 665 bytes
Desc: not available
Url : http://napali.hpl.hp.com/pipermail/gc/attachments/20090918/605ed2bc/attachment.bin
-------------- next part --------------

Thanks,
Ludo’.


More information about the Gc mailing list