From clamav-devel-bounces@lists.clamav.net  Thu Mar 26 07:29:01 2009
Return-Path: <clamav-devel-bounces@lists.clamav.net>
X-Original-To: list@tad.clamav.net
Delivered-To: list@tad.clamav.net
X-Virus-Scanned: Debian amavisd-new at tad.clamav.net
Received: from tad.clamav.net ([127.0.0.1])
	by localhost (tad.clamav.net [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id Oh9H36kIT7iF; Thu, 26 Mar 2009 07:29:01 +0100 (CET)
Received: from tad.clamav.net (localhost.localdomain [127.0.0.1])
	by tad.clamav.net (Postfix) with ESMTP id 946E916C302;
	Thu, 26 Mar 2009 07:28:58 +0100 (CET)
X-Original-To: clamav-devel@tad.clamav.net
Delivered-To: clamav-devel@tad.clamav.net
X-Virus-Scanned: Debian amavisd-new at tad.clamav.net
Received: from tad.clamav.net ([127.0.0.1])
	by localhost (tad.clamav.net [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id AOkL0Sl9THXl for <clamav-devel@tad.clamav.net>;
	Thu, 26 Mar 2009 07:28:55 +0100 (CET)
Received: from pccross.average.org (pccross.average.org [91.192.241.20])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by tad.clamav.net (Postfix) with ESMTP id 7297A16C2EF
	for <clamav-devel@lists.clamav.net>;
	Thu, 26 Mar 2009 07:28:55 +0100 (CET)
Received: from [127.0.0.1] (localhost [127.0.0.1])
	by pccross.average.org (8.14.3/8.14.3/Debian-6) with ESMTP id
	n2Q6Sre4012883
	for <clamav-devel@lists.clamav.net>; Thu, 26 Mar 2009 09:28:54 +0300
Message-ID: <49CB20A0.40207@average.org>
Date: Thu, 26 Mar 2009 09:28:48 +0300
From: Eugene Crosser <crosser@average.org>
User-Agent: Thunderbird 2.0.0.21 (X11/20090319)
MIME-Version: 1.0
To: ClamAV Development <clamav-devel@lists.clamav.net>
References: <a55c54ec0903250635x46b447a9t261e4c516567a1ce@mail.gmail.com>	<49CA8161.5030309@lavabit.com>	(sfid-20090325_220940_724264_C2D1DAFF)	<49CA982E.8080905@average.org>
	<49CAAAFC.7070107@lavabit.com>
	(sfid-20090326_010701_196855_758192F7)
In-Reply-To: <49CAAAFC.7070107@lavabit.com>
	(sfid-20090326_010701_196855_758192F7)
X-Enigmail-Version: 0.95.7
Subject: Re: [Clamav-devel] [Clamav] Cannot dlopen: file not found - unrar
 support unavailable
X-BeenThere: clamav-devel@lists.clamav.net
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: ClamAV Development <clamav-devel@lists.clamav.net>
List-Id: ClamAV Development <clamav-devel.lists.clamav.net>
List-Unsubscribe: <http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-devel>,
	<mailto:clamav-devel-request@lists.clamav.net?subject=unsubscribe>
List-Post: <mailto:clamav-devel@lists.clamav.net>
List-Help: <mailto:clamav-devel-request@lists.clamav.net?subject=help>
List-Subscribe: <http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-devel>,
	<mailto:clamav-devel-request@lists.clamav.net?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0209148167=="
Mime-version: 1.0
Sender: clamav-devel-bounces@lists.clamav.net
Errors-To: clamav-devel-bounces@lists.clamav.net

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--===============0209148167==
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature";
 boundary="------------enigF71839C976554B9165B59A5F"

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigF71839C976554B9165B59A5F
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Ladar Levison wrote:
> Eugene Crosser wrote:
>> I suspect that this may break on AMD64. It's more picky about PIC/non-=
PIC code
>> (no pun intended), attempt to link objects from .a into .so often fail=
s.
>>  =20
>=20
> I haven't tested this method on any AMD64 servers, but it wouldn't=20
> surprise if you were right. When I tried using this method on a Cent OS=
=20
> 5 system, I had to link 1-2 or other libraries before dlopen() would=20
> accept it.
>=20
> Any thoughts on a better way of accomplishing the same task? I like to =

> combine all of the f/oss libraries my daemon uses into a single library=
=20
> (clamav, openssl, memcached, etc). It makes deployments easier=20
> (executable, f/oss library and config file).

Technically, you have to ensure that all the code that is going into your=
 shared
object is compiled with -fPIC. If the libraries where built with
automake/libtool, the .so's are (obviously) made of PIC objects, while .a=
's are
likely not.

If you use automake/libtool to build *your* project, you specify library
descriptors (.la files) in the build instructions in Makefile.am, and the=

infrastructure will do "The Right Thing" for you, taking either .a or .so=

libraries depending on your intended target. I think that the .so's are s=
till
dynamically linked in this case, and I am not sure if you can forcibly cl=
ump all
the objects into a single .so. On the other hand, maybe you don't need.

Sorry for being so vague. Automake and libtool documentation is where you=
 can
find definite answers.

Eugene


--------------enigF71839C976554B9165B59A5F
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJyyCjfrw/cIw6UWkRAnZTAJ98oibQcNBpM+j52fko5dhPQ1tHLgCgsL6x
QMLWn1F3ZWtNRQrrTpng2N4=
=JDc5
-----END PGP SIGNATURE-----

--------------enigF71839C976554B9165B59A5F--

--===============0209148167==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net
--===============0209148167==--

