I'd like to compile some libraries (like CL-PPCRE, etc.) into shared objects, and use
that from a (otherwise statically) linked binary.
Please see the attached files for details.
The created binary uses the cl-ppcre.so:
$ LD_LIBRARY_PATH=. ldd ./test-mono
libcl-ppcre.so => ./libcl-ppcre.so (0x00007fe7feead000)
but on starting there's a function missing:
$ LD_LIBRARY_PATH=. ./test-mono
Condition of type: UNDEFINED-FUNCTION
The function CL-PPCRE::CREATE-SCANNER is undefined.
No restarts available.
Top level in: #<process TOP-LEVEL>.
This is on a Debian x86_64, testing/unstable, ecl 11.1.1
What am I doing wrong?
Thank you for all help.
From: Philipp Marek <philipp@ma...> - 2011-09-12 09:35:01
thank you very much for the extensive help!
> Summing up the errors are:
> #1 Calling make-build without letting it know that there are other libraries
> to be initialized. Even if you link a library for cl-ppcre, you are not
> calling its initialization routine first. You are just adjoining the
> libraries, but not doing the equivalent of a "LOAD" of them.
Ah, ok. I didn't that :lisp-files accepts other file types, too ;)
> #2 Trying to use make-build for more than it was designed. C:BUILDER is ok
> in many situations like this one in which you are doing low-level
> composition of programs
Ok, good to know.
> #2 Creating a package "test" in the ASDF file instead of in the files that
> you are going to use. ASDF descriptions should be just that: descriptions.
> No code should be in it. Specially no code that is intended to be run at run
> time (like package creations)
Yes, I know (somewhere in the back of my brain) ... but as it didn't get this far I
didn't fix this.
> I attached a fixed version.
Thank you very much, this works (of course!)