From: SourceForge.net <no...@so...> - 2010-06-09 17:25:08
|
Bugs item #3013406, was opened at 2010-06-08 15:23 Message generated for change (Settings changed) made by sds You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101355&aid=3013406&group_id=1355 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: modules Group: lisp error Status: Open Resolution: None Priority: 5 Private: No Submitted By: Sam Steingold (sds) >Assigned to: Sam Steingold (sds) Summary: "make distrib" does not play well with dynamic modules Initial Comment: configure and build cvs head clisp on a vanilla platform (e.g., linux) with dynamic modules (the default build). dynamic module loading works just fine both from the build directory and after "make install": $ clisp > (require "pari") ;; Loading file <<libdir>>/dynmod/pari.lisp ... ;; Loading file <<libdir>>/pari/preload.lisp ... ;; Loaded file <<libdir>>/pari/preload.lisp ;; Loading module pari from <<libdir>>/dynmod/lib-pari.so ;; Loaded module pari from <<libdir>>/dynmod/lib-pari.so ;; Loading file <<libdir>>/pari/pari.fas ... ;; Loaded file <<libdir>>/pari/pari.fas ;; Loaded file <<libdir>>/dynmod/pari.lisp T however, "make distrib" is not so lucky: untar clisp.tar.gz on the same machine, do "make base clisp" there and: $ ./clisp > (require "libsvm") ;; Loading file <<dir>>/clisp-2.48+/dynmod/libsvm.lisp ... ;; Loading file <<dir>>/clisp-2.48+/libsvm/preload.lisp ... ;; Loaded file <<dir>>/clisp-2.48+/libsvm/preload.lisp ;; Loading module libsvm from <<dir>>/clisp-2.48+/dynmod/lib-libsvm.so *** - SYSTEM::DYNLOAD-MODULES: "dlopen" -> "<<dir>>/clisp-2.48+/dynmod/lib-libsvm.so: undefined symbol: funcall" The following restarts are available: SKIP :R1 skip (DYNLOAD-MODULES # '#) STOP :R2 stop loading file <<dir>>/clisp-2.48+/dynmod/libsvm.lisp ABORT :R3 Abort main loop the error is in dlopen! the function mentioned depends on the module: it's funcall for libsvm and pari; fd_write for linux; allocate_cons for pcre; register_foreign_inttype for wildcard &c. i.e., every time it's a symbol already present in the running process (lisp.run). $ nm dynmod/lib-MODNAME.so |grep ' U '|grep -v '@@' gives a different list for each MODNAME but the same list whether we are looking at the result of "make distrib" (does not work) or "make install" (works). ---------------------------------------------------------------------- >Comment By: Sam Steingold (sds) Date: 2010-06-09 13:25 Message: t turned out that one has to link the executable with ld -export-dynamic or cc -Wl,-export-dynamic a fix is on the way... ---------------------------------------------------------------------- Comment By: Sam Steingold (sds) Date: 2010-06-08 15:31 Message: moreovert, under gdb in build directory: (gdb) p find_name(0,"funcall") $1 = (void *) 0x485b84 (gdb) p dlsym(0,"funcall") $2 = 4742020 in distrib directory: (gdb) p find_name(0,"funcall") $1 = (void *) 0x0 (gdb) p dlsym(0,"funcall") $2 = 0 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101355&aid=3013406&group_id=1355 |