On Wed, 13 Apr 2005, Trog wrote:

> From: Trog <[EMAIL PROTECTED]>
> To: ClamAV users ML <[email protected]>
> Date: Wed, 13 Apr 2005 15:17:13 +0100
> Subject: Re: [Clamav-users] 0.84rc1 on OpenBSD3.6-stable.
> Reply-To: ClamAV users ML <[email protected]>
> 
> On Wed, 2005-04-13 at 14:21 +0100, Dennis Davis wrote:
> 
> > I can't find a subroutine called cl_dup.  Have I missed something
> > really obvious, or am I doing something blindingly stupid?
> > 
> > Alternatively can I alter line 523 to read:
> > 
> > 523                  client_conn->root = root;
> 
> Only if you want it to crash.

Oh, that would be about par for today :-)

I've found out what's wrong.  It's "shared library hell", the Unix
equivalent of "DLL hell" on a Microsoft machine.

I'm trying to build this on a machine that already has version
0.83 installed.  So there's a shared version of libclamav
(libclamav.so.1.8) already present in /usr/local/lib.

The build of clamd in 0.84rc1 uses a command line of the form:

/bin/sh ../libtool --mode=link cc  -O2   -L/usr/local/lib -o clamd  output.o  
cfgparser.o getopt.o  memory.o misc.o  options.o clamd.o  tcpserver.o 
localserver.o  session.o thrmgr.o  server-th.o scanner.o  others.o clamuko.o  
dazukoio_compat12.o  dazukoio.o  ../libclamav/libclamav.la  -pthread -pthread

which generates a "cc" line of:

cc -O2 -o .libs/clamd output.o cfgparser.o getopt.o memory.o misc.o options.o 
clamd.o tcpserver.o localserver.o session.o thrmgr.o server-th.o scanner.o 
others.o clamuko.o dazukoio_compat12.o dazukoio.o -pthread -pthread  
-L/usr/local/lib -L../libclamav/.libs -lclamav -lbz2 -lgmp -lcurl -lssl 
-lcrypto -lz -Wl,-rpath,/usr/local/lib

The order:

-L/usr/local/lib -L../libclamav/.libs -lclamav

means that the linker picks up the 0.83 version of libclamav.so in
/usr/local/lib, rather than the version in ../libclamav/.libs.  And
that's the cause of failure as the new library includes routines
that aren't in 0.83.

If I manually build clamd with the above order altered to:

-L../libclamav/.libs -lclamav -L/usr/local/lib

then everything works fine.

Another alternative is to remove the 0.83 version before trying to
build 0.84rc1.

I'm not sure whether to consider this a bug or not.  I doubt that
this problem is only going to arise on OpenBSD.  So the developers
may like to consider changing library ordering so building 0.84rc1
etc isn't affected by an existing installed version of clamd.
-- 
Dennis Davis, BUCS, University of Bath, Bath, BA2 7AY, UK
[EMAIL PROTECTED]               Phone: +44 1225 386101
_______________________________________________
http://lurker.clamav.net/list/clamav-users.html

Reply via email to