[Ecls-list] sig11 in cl_boot()

Stanislaw Halik sthalik+ecl at tehran.lain.pl
Tue Jan 16 11:32:24 UTC 2007


On Tue, Jan 16, 2007, Juan Jose Garcia-Ripoll wrote:
>>> * Flags you used to build ECL
>> I didn't specify any flags myself for building the latest CVS, using the
>> default of "-O2 -g". Stable 0.9i was built by a Debian maintainer, I
>> believe no additional optimizations were being used.
> That is not enough. Was ECL built with pthread support? If so...

>>> * Procedure you use to link with ECL's library

>> gcc -g -O0 -o epic5 [long, boring list of objects] words.o ecl.o info.o
>> -Wl,-E -L/usr/local/lib /usr/lib/perl/5.8/auto/DynaLoader/DynaLoader.a
>> -L/usr/lib/perl/5.8/CORE -lperl -ldl -lm -pthread -lc -lcrypt -lruby1.8
>> -lpthread -ldl -lcrypt -lm -lncurses -lssl -lcrypto -lnsl -lresolv
>> -lcrypt -lm -lrt -L/tmp/ecl/lib/ecl -lecl
> ...linking against pthread is not enough. All threads have to be
> created by the routines in the garbage collector. This is so because
> the garbage collector has to keep track of the stacks that are
> created, static regions, etc.

I disabled all other pthread-using libraries, made sure it isn't linked
in anymore, linked against libecl, yet it still crashes.

libecl is now the first library being linked:

LIBS =  -L/tmp/ecl/lib/ecl -lecl -lncurses  -lssl -lcrypto -lnsl
-lresolv -lcrypt -lm

enkidu ~cvs/epic5/source% LD_LIBRARY_PATH=/tmp/ecl/lib/ecl ldd epic5  
        linux-gate.so.1 =>  (0xffffe000)
        libecl.so => /tmp/ecl/lib/ecl/libecl.so (0xb7da3000)
        libncurses.so.5 => /lib/libncurses.so.5 (0xb7d50000)
        libssl.so.0.9.8 => /usr/lib/i686/cmov/libssl.so.0.9.8
        (0xb7d11000)
        libcrypto.so.0.9.8 => /usr/lib/i686/cmov/libcrypto.so.0.9.8
        (0xb7bd7000)
        libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb7bc1000)
        libresolv.so.2 => /lib/tls/i686/cmov/libresolv.so.2 (0xb7bae000)
        libcrypt.so.1 => /lib/tls/i686/cmov/libcrypt.so.1 (0xb7b80000)
        libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7b5a000)
        libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7a29000)
        libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7a25000)
        libgmp.so.3 => /usr/lib/libgmp.so.3 (0xb79e2000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb79ce000)
        /lib/ld-linux.so.2 (0xb7ef0000)

Looks like my libecl wasn't built with pthread support after all.

cl_boot() is the first thing run in main, no threads are created before
its execution.

-- 
Unix stuff      :: http://tehran.lain.pl
Yet Another RBL :: http://rbl.lain.pl




More information about the ecl-devel mailing list