Date: Wed, 10 Jun 2009 07:52:34 +0000 From: bharat gusain <bharat.gusain@hotmail.com> To: <freebsd-ports@freebsd.org> Subject: __lxstat/gzopen undefined symbol while loading a shared library Message-ID: <COL114-W24809E1A0390FE573790C2EA450@phx.gbl>
next in thread | raw e-mail | index | archive | help
Hi all=2C =20 I am considerably new to FreeBsd=2C previously working on Linux but have no idea of FreeBsd= =2C below are steps what I am doing and getting error: =20 a) I have ported a shared library written for linux to FreeBsd 7.0 Release. =20 b) This ported library (say libXXXX.so) is compiled successfully on my FreeBsd 7.0 machine. =20 c) Now I am getting the following error while trying to load libXXXX.so using dlopen(li= bXXXX.so=2C RTLD_LAZY) from another program: /libexec/ld-elf.so.1: /usr/lib/libXXXX.so: undefined symbol =93__lxstat=94 I Googled and found that __lxstat is a linux symbol and should be there in linux-port= s=2C but updating the linux-ports package also doesn=92t resolved this issue. =20 d) If I use RTLD_NOW I did not get the =93__lxstat not defined=94 error=2C but then ano= ther error comes from libpci.so.3.1.2=2C dlerror=3D/usr/ligb/libXXXX.so: Undefined symbol =93gzopen=94. I am using some functions from libpci.so.3.1.2 in my library and linking the libpci.so.3.1.= 2 normaly using =96lpci=20 In libpci.so.3.1.2 the =96lz option links the libz to libpci so there should not be any issue = in it. =20 Following are some logs output: $objdump -T /usr/lib/libXXXX.so | grep __lxstat 00000000 D *UND* 00000000 __lxstat $objdump -T /usr/lib/libXXXX.so | grep gzopen 00000000 D *UND* 00000000 gzopen $objdump -T /usr/lib/libpci.so.3.1.2 | grep gzopen =20 00000000 DF *UND* 00000014 gzopen $objdump -T /usr/lib/libz.so | grep gzopen 00004500 g DF .text 00000014 Base gzopen Can anybody please help!! =20 Regards Bharat =20 _________________________________________________________________ Missed any of the IPL matches ? Catch a recap of all the action on MSN Vide= os http://msnvideos.in/iplt20/msnvideoplayer.aspx=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?COL114-W24809E1A0390FE573790C2EA450>