__lxstat/gzopen undefined symbol while loading a shared library

bharat gusain bharat.gusain at hotmail.com
Wed Jun 10 08:04:36 UTC 2009




Hi all,

 

I am considerably
new to FreeBsd, previously working on Linux but have no idea of FreeBsd, below are
steps what I am doing and getting error:

 

a) I have ported
a shared library written for linux to FreeBsd 7.0 Release.

 

b) This
ported library (say libXXXX.so) is compiled successfully on my FreeBsd 7.0
machine.

 

c) Now I am
getting the following error while trying to load libXXXX.so using dlopen(libXXXX.so,
RTLD_LAZY) from another program:

/libexec/ld-elf.so.1: /usr/lib/libXXXX.so: undefined symbol “__lxstat”

I Googled
and found that __lxstat is a linux symbol and should be there in linux-ports, but
updating the linux-ports package also doesn’t resolved this issue.

 

d) If I use
RTLD_NOW I did not get the “__lxstat not defined” error, but then another error
comes from libpci.so.3.1.2,

dlerror=/usr/ligb/libXXXX.so:
Undefined symbol “gzopen”.

I am using some
functions from libpci.so.3.1.2 in my library and linking the libpci.so.3.1.2
normaly using –lpci 

In libpci.so.3.1.2
the –lz option links the libz to libpci so there should not be any issue in it.

 

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
 
00000000      DF *UND*    00000014              gzopen

$objdump -T /usr/lib/libz.so | grep gzopen



00004500 g    DF .text    00000014  Base        gzopen



Can anybody
please help!!

 

Regards

Bharat

 


_________________________________________________________________
Missed any of the IPL matches ? Catch a recap of all the action on MSN Videos
http://msnvideos.in/iplt20/msnvideoplayer.aspx


More information about the freebsd-ports mailing list