dlopen: resolving external library symbols to calling program
Alejandro Pulver
alepulver at FreeBSD.org
Fri Nov 30 08:56:01 PST 2007
Hello.
When I was updating the games/deng port, I found it failed at runtime
with the following error:
% doomsday
While opening dynamic library
/usr/local/lib/libdropengl.so:
/usr/local/lib/libdropengl.so: Undefined symbol "ArgExists"
DD_InitDGL: Loading of libdropengl.so failed.
(null).
The function is defined in m_args.c which is included in both
"doomsday" and "libdropengl.so". But nm(1) reports it as undefined for
"libdropengl.so". Also, it is loaded with RTLD_NOW.
% nm `which doomsday` | grep ArgExists
080d9ef0 T ArgExists
% nm /usr/local/lib/libdropengl.so | grep ArgExists
U ArgExists
The files are linked with the "-flat namespace" and "-undefined
suppress" flags in Mac OS X (don't know if it's relevant here).
I think the simplest solution (if possible, of course) would be to make
dlopen() resolve these symbols to the main executable. I tried to do
this with RTLD_GLOBAL without success.
The port is available here (note that the application uses cmake to
build):
ftp://ftp.alepulver.com.ar/deng.tar.bz2
If you need any other information just ask me. I will appreciate any
help.
Thanks and Best Regards,
Ale
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20071130/9a8c2c05/signature.pgp
More information about the freebsd-hackers
mailing list