Hello,
I am trying to compile a shared library so that I can use it with
EXT:LOAD-FOREIGN, but when loading it I get this error:
Error in function SYSTEM::LOAD-OBJECT-FILE:
Can't open object "<...>/sparc/liboa-design.so": "ld.so.1:
/mnt_icdg/sw.sun4u/pkg/cmucl/19a/bin/lisp: fatal: relocation error: file
<...>/sparc/liboa-design.so: symbol __1cG__CrunMex_rethrow_q6F_v_:
referenced symbol not found"
[Condition of type SIMPLE-ERROR]
Doing nm on the library shows that the symbol is there:
[bjorn] <muvcso42> sparc 143>nm liboa-design.so | grep CrunMex
U __1cG__CrunMex_rethrow_q6F_v_
The command line to compile the library was this one:
$ CC -Kpic -G -I<...> -L<...> -l<...> ... -lsocket -lnsl -lrt
../oaDesignDB.cpp -o liboa-design.so
(It is a C++ file, but with extern "C" declarations in it.)
The load call used was:
(ext:load-foreign "sparc/liboa-design.so"
:libraries '(<...> "-lsocket" "-lnsl" "-lrt"))))
I have already got it working on Linux compiling with gcc, so I suspect
that it is just a matter of invoking the compiler with the right
parameters. I am thankful for any suggestions.
Regards,
Bj�rn