[Ecls-list] More build problems ...
R. Mattes
rm at mh-freiburg.de
Thu Jan 27 08:52:54 UTC 2005
Well, again, a fresh checkout (the last one _did_ compile without
problems) and the build process stops, this time with the following:
> ;;; Invoking external command: gcc -g -O2 -fPIC -D_THREAD_SAFE
> -fstrict-aliasing -Dlinux -I"/LISP/ecls/src"/h
> -I"/LISP/ecls/src"/gmp
> -I"/LISP/ecls/build"/h -I"/LISP/ecls/build"/h -w -c "ecl.c" -o "ecl.o"
;;; Invoking external command: gcc -o "ecl" -L"/LISP/ecls/build" "ecl.o"
"-L./" -Wl,--rpath,/usr/local/lib/ecl/ libecl.so -lpthread -ldl -lm
libecl.so: undefined reference to `cl_env' collect2: ld returned 1 exit
status
LAMBDA: Too many arguments to function CONTINUE. Top level. SI> cd doc;
make
make[2]: Entering directory `/usr/local/src/LISP/ecls/build/doc' make[2]:
Nothing to be done for `all'. make[2]: Leaving directory
`/usr/local/src/LISP/ecls/build/doc' make[1]: Leaving directory
`/usr/local/src/LISP/ecls/build' ralf at hobbes:/LISP/ecls$
And indeed, as a 'nm build/libecl.so' reveals:
000d0ce8 T cl_endp
00110190 T cl_enough_namestring
00055a90 T cl_ensure_directories_exist
U cl_env <----------------------- undefined!
001831cc s cl_env_key
000f8544 T cl_eq
000f8754 T cl_eql
000f8ae8 T cl_equal
Hmm, i should note that i added '--with-threads' to my configure
invocation. Looking a '' i find that cl_env is being defined
conditionally when threading is enabled:
#if defined(ECL_THREADS)
# define cl_env (*ecl_process_env())
extern struct cl_env_struct *ecl_process_env(void)
__attribute__((const));
#else
# if defined(mingw32) || defined(_MSC_VER) __declspec(dllimport) #endif
extern struct cl_env_struct cl_env;
#endif
(my indentation). Hmm, IMHU this will _not_ produce an exported symbol
when ECL_THREADS is defined. What is the intend of this code? Somehoe i
find i confusing that cl_env is _either_ a function call or a structure
reference - why not make it a function that either returns the global
structure or calls ecl_process_env. If you fear the performance penalty
of a function call declare the function inline (this is not optimal since
it might require recompilation of all code that calls cl_env but when one
switches from non-threading to threading but this is not different in the
current implementation, or?).
TIA Ralf Mattes
More information about the ecl-devel
mailing list