From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 30 16:56:01 2007 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0374E16A498 for ; Fri, 30 Nov 2007 16:56:00 +0000 (UTC) (envelope-from alepulver@FreeBSD.org) Received: from relay00.pair.com (relay00.pair.com [209.68.5.9]) by mx1.freebsd.org (Postfix) with SMTP id 86EF713C448 for ; Fri, 30 Nov 2007 16:56:00 +0000 (UTC) (envelope-from alepulver@FreeBSD.org) Received: (qmail 30530 invoked by uid 0); 30 Nov 2007 16:29:19 -0000 Received: from unknown (HELO deimos.mars.bsd) (unknown) by unknown with SMTP; 30 Nov 2007 16:29:19 -0000 X-pair-Authenticated: 200.127.53.54 Date: Fri, 30 Nov 2007 13:28:58 -0300 From: Alejandro Pulver To: freebsd-hackers@FreeBSD.org Message-ID: <20071130132858.1e4290a0@deimos.mars.bsd> X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.1; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/6qg=HrxqZ=ub+bcoSc4UlQ0"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: Subject: dlopen: resolving external library symbols to calling program X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Nov 2007 16:56:01 -0000 --Sig_/6qg=HrxqZ=ub+bcoSc4UlQ0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable 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 --Sig_/6qg=HrxqZ=ub+bcoSc4UlQ0 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFHUDpLiV05EpRcP2ERAkO6AKCNAYMYGLtPtZ2h7RLGOU07YmN+7gCgnenB sJb5VPO/Ml8GEwdV9jFYjXY= =2lOJ -----END PGP SIGNATURE----- --Sig_/6qg=HrxqZ=ub+bcoSc4UlQ0--