From owner-freebsd-ports@FreeBSD.ORG Wed Jun 10 08:04:35 2009 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A333D106566B; Wed, 10 Jun 2009 08:04:35 +0000 (UTC) (envelope-from bharat.gusain@hotmail.com) Received: from col0-omc3-s5.col0.hotmail.com (col0-omc3-s5.col0.hotmail.com [65.55.34.143]) by mx1.freebsd.org (Postfix) with ESMTP id 822148FC0C; Wed, 10 Jun 2009 08:04:35 +0000 (UTC) (envelope-from bharat.gusain@hotmail.com) Received: from COL114-W24 ([65.55.34.136]) by col0-omc3-s5.col0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 10 Jun 2009 00:52:34 -0700 Message-ID: X-Originating-IP: [203.145.174.100] From: bharat gusain To: Date: Wed, 10 Jun 2009 07:52:34 +0000 Importance: Normal MIME-Version: 1.0 X-OriginalArrivalTime: 10 Jun 2009 07:52:34.0923 (UTC) FILETIME=[6A9923B0:01C9E9A0] Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: __lxstat/gzopen undefined symbol while loading a shared library X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 08:04:36 -0000 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=