From owner-freebsd-ports@FreeBSD.ORG Fri Nov 21 09:51:41 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 076B216A4CE for ; Fri, 21 Nov 2003 09:51:41 -0800 (PST) Received: from newtrinity.zeist.de (newtrinity.zeist.de [217.24.217.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id DCA7443FE3 for ; Fri, 21 Nov 2003 09:51:38 -0800 (PST) (envelope-from marius@newtrinity.zeist.de) Received: from newtrinity.zeist.de (localhost [127.0.0.1]) hALHpbK0007035; Fri, 21 Nov 2003 18:51:37 +0100 (CET) (envelope-from marius@newtrinity.zeist.de) Received: (from marius@localhost) by newtrinity.zeist.de (8.12.10/8.12.10/Submit) id hALHpWR3007034; Fri, 21 Nov 2003 18:51:32 +0100 (CET) (envelope-from marius) Date: Fri, 21 Nov 2003 18:51:31 +0100 From: Marius Strobl To: Jan-Peter Koopmann Message-ID: <20031121185131.A2734@newtrinity.zeist.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from Jan-Peter.Koopmann@seceidos.de on Fri, Nov 21, 2003 at 04:10:00PM +0100 X-AntiVirus: checked by AntiVir Milter 1.0.6; AVE 6.22.0.1; VDF 6.22.0.44 cc: ports@freebsd.org Subject: Re: Clamav-0.65 / Linker error on FreeBSD4.8-STABLE X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Nov 2003 17:51:41 -0000 On Fri, Nov 21, 2003 at 04:10:00PM +0100, Jan-Peter Koopmann wrote: > Hi, > > On a different system I am getting > > > Making all in clamscan > /bin/sh ../libtool --mode=link cc -O -pipe -I/usr/local/include -O > -pthread -L/usr/local/lib -lcipher -o clamscan clamscan.o options.o > getopt.o others.o manager.o treewalk.o -L../libclamav -lclamav > cc -O -pipe -I/usr/local/include -O -o clamscan clamscan.o options.o > getopt.o others.o manager.o treewalk.o -L/usr/local/lib -lcipher > -L/usr/ports/security/clamav/work/clamav-0.65/libclamav > /usr/local/lib/libclamav.so -lz -lbz2 -lc_r -Wl,--rpath > -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib > /usr/lib/libc.so: warning: this program uses gets(), which is unsafe. > /usr/lib/libc.so: warning: mktemp() possibly used unsafely; consider > using mkstemp() > /usr/lib/libc.so: warning: tmpnam() possibly used unsafely; consider > using mkstemp() > /usr/lib/libc.so: warning: this program uses f_prealloc(), which is not > recommended. > /usr/lib/libc.so: warning: tempnam() possibly used unsafely; consider > using mkstemp() Oh, the port is linking against libc and libc_r on FreeBSD 4 which is not quite correct. > clamscan.o: In function `clamscan': > clamscan.o(.text+0xab): undefined reference to `cl_debug' > manager.o: In function `scanmanager': > manager.o(.text+0x202): undefined reference to `cl_strerror' > manager.o(.text+0x24b): undefined reference to `cl_strerror' > manager.o(.text+0x29f): undefined reference to `cl_strerror' > manager.o(.text+0x555): undefined reference to `cl_gentemp' > manager.o: In function `scancompressed': > manager.o(.text+0xfb5): undefined reference to `cl_gentemp' > manager.o: In function `scandenied': > manager.o(.text+0x1915): undefined reference to `cl_gentemp' > manager.o: In function `checkfile': > manager.o(.text+0x1c0a): undefined reference to `cl_strerror' > manager.o: In function `checkstdin': > manager.o(.text+0x1cae): undefined reference to `cl_strerror' > *** Error code 1 > > Stop in /usr/ports/security/clamav/work/clamav-0.65/clamscan. > *** Error code 1 > > Now. What's wrong here? > My guess is that you are compiling clamav-0.65 on a system where an older version of clamav is installed. This will cause the port to link against the installed version of libclamav instead of the newly built one. You will probably get away by deinstalling the old port before compiling the new one but it would be nice if you could try the updated patch at http://quad.zeist.de/security_clamav.diff which should fix this. Doesn't seem to be easy to build clamav right...