Clamav-0.65 / Linker error on FreeBSD4.8-STABLE

Marius Strobl marius at alchemy.franken.de
Fri Nov 21 09:51:41 PST 2003


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...



More information about the freebsd-ports mailing list