[Ecls-list] Linking problem

Julian Stecklina der_julian at web.de
Mon Aug 2 14:57:03 UTC 2004


Hello,

I configured ECL using --enable-local-gmp and no threads support.

[...]
if [ -f CROSS-COMPILER ]; then \
        touch ecl_min; \
else \
        cc -L/usr/local/lib -o ecl_min cinit.o -L./ libeclmin.a -lgmp -lgc -lm ;\
fi
/usr/local/lib/libgc.so: undefined reference to `pthread_cleanup_pop'
/usr/local/lib/libgc.so: undefined reference to `pthread_create'
/usr/local/lib/libgc.so: undefined reference to `pthread_equal'
/usr/local/lib/libgc.so: undefined reference to `pthread_detach'
/usr/local/lib/libgc.so: undefined reference to `pthread_cleanup_push'
/usr/local/lib/libgc.so: undefined reference to `pthread_kill'
/usr/local/lib/libgc.so: undefined reference to `pthread_attr_getdetachstate'
/usr/local/lib/libgc.so: undefined reference to `pthread_join'
gmake[1]: *** [ecl_min] Error 1

After some headscratching, I realized that the error must be that the
LDFLAGS for the local GMP cause ecl_min to be linked with the local gc
library, too. This depends on a threading library, as is visible from
the undefined references.

Possible solutions:

1. Link the contained boehm-gc statically. It is not used by anything
   else anyway.

2. I could use the contained GMP as well to avoid fiddling with
   LDFLAGS. This is suboptimal, as no one wants to have every
   application bring its own version of things, if that can be
   avoided.

3. Hack the Makefile to pass arguments to GCC that "do the right
   thing." But then again, I do not understand GCC argument passing
   magic...

4. Use the local gc, as well. This still does not work, because
   devel/boehm-gc does not install gc/private/gc_priv.h on
   FreeBSD. But ECL needs that.

5. Require the user to build a non-threaded boehm-gc.

Any pointers? :-/

Regards,
-- 
Julian Stecklina 

Signed/encrypted mail welcome.  Key-ID: 0xD65B2AB5

-> GIVE stylish confetti to HEAVILY ARMED CLOWN <-
-> Heavily Armed Clown: Wheeee!!                <-





More information about the ecl-devel mailing list