chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Strange segfaults when linking with pthreads


From: Felix
Subject: Re: [Chicken-users] Strange segfaults when linking with pthreads
Date: Fri, 04 Mar 2011 13:25:00 +0100 (CET)

From: Peter Bex <address@hidden>
Subject: Re: [Chicken-users] Strange segfaults when linking with pthreads
Date: Fri, 4 Mar 2011 10:48:37 +0100

> On Fri, Mar 04, 2011 at 10:40:49AM +0100, Felix wrote:
>> This seems to work. It looks like Aleksej pointed into the right
>> direction, as insane as this may be. 
>> 
>> diff --git a/Makefile.bsd b/Makefile.bsd
>> index b818eac..5eab203 100644
>> --- a/Makefile.bsd
>> +++ b/Makefile.bsd
>> @@ -57,7 +57,7 @@ LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared
>>  LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -shared 
>> -Wl,-R"$(RUNTIME_LINKER_PATH)" -Wl,-L.
>>  LINKER_LINK_SHARED_PROGRAM_OPTIONS = -Wl,-R"$(RUNTIME_LINKER_PATH)"
>>  LIBCHICKEN_SO_LINKER_OPTIONS = 
>> -Wl,-soname,lib$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX).so$(SONAME_VERSION)
>> -LIBRARIES = -lm
>> +LIBRARIES = -lm -lpthread
>>  NEEDS_RELINKING = yes
>>  USES_SONAME = yes
> 
> I will try this tonight but I'm a bit afraid that this won't work when
> linking Chicken to other non-pthreaded libraries?
> 

I don't think this is a problem. An chicken application like csi first
resolves libchicken.so, and all subsequently loaded .so's will refer
to symbols already resolved. Anyway, give it a try. 


cheers,
felix



reply via email to

[Prev in Thread] Current Thread [Next in Thread]