Open nthiery opened 7 years ago
I think this might work now but I haven't tried it yet. I'll put this next on my todo list.
I see now, the way the GAP binary is built by default still compiles all of the GAP kernel into the executable; I mistakenly assumed it was switched over to just being a thin wrapper around libgap.so. So when running the gap executable dlopen-ing a compiled module correctly resolves the required symbols since they're already loaded, but that won't work when dlopen-ing a module from libgap.
As @nthiery wrote that's just a matter of compiling the extension module such that it is linked to libgap.
(Incomplete) Steps to reproduce:
Compile libgap:
Install IO package as usual
load IO in libgap; here from Sage:
sage: libgap.LoadPackage("IO") ...
W dlopen() error: /opt/sage-git/local/gap/latest/pkg/io/bin/x86_64-pc-linux-gnu-gcc-default64/io.so: undefined symbol: InfoBags
This is because io.so is not marked as depending on libgap.so:
TODO: fix the automake configuration / package compilation procedure to make io.so depend on libgap.so
Note: enabling a given compiled io.so to work both on gap and libgap will require gap itself to be built on top of libgap