linker problems building clamav

security security at
Sat Apr 14 00:03:58 UTC 2007

6.1-RELEASE-p10 FreeBSD 6.1-RELEASE-p10

I've gotten myself wedged with multiple versions of shared objects. 
I've got different versions of libssl and libcrypto in /lib and
/usr/local/lib.  I've rebuilt openssl and libssh2 in ports and told
ldconfig to rebuild it's cache

how do gracefully get out of this?


Here's the error:

cc -O2 -fno-strict-aliasing -pipe -o .libs/clamd output.o cfgparser.o
getopt.o misc.o network.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  -L/usr/local/lib
../libclamav/.libs/ /usr/local/lib/ -lbz2
/usr/local/lib/ /usr/local/lib/ -lssh2 -lz -lssl
-lcrypto -lthr -Wl,--rpath -Wl,/usr/local/lib
/usr/bin/ld: warning:, needed by /usr/local/lib/,
may conflict with
/usr/bin/ld: warning:, needed by
/usr/local/lib/, may conflict with
network.o(.text+0x2b): In function `r_gethostbyname':
: undefined reference to `gethostbyname_r'
*** Error code 1

 ldconfig -r | grep libcrypto
        13:-lcrypto.3 => /lib/
        49:-lcrypto.4 => /lib/
        156:-lcrypto.1 => /usr/lib/compat/
        157:-lcrypto.2 => /usr/lib/compat/
        266:-lcrypto.5 => /usr/local/lib/
        676:-lcrypto.3 => /usr/local/lib/compat/
ldconfig -r | grep libssl
        105:-lssl.4 => /usr/lib/
        127:-lssl.3 => /usr/lib/
        172:-lssl.1 => /usr/lib/compat/
        173:-lssl.2 => /usr/lib/compat/
        474:-lssl3.1 => /usr/local/lib/
        540:-lssl.5 => /usr/local/lib/
        722:-lssl.3 => /usr/local/lib/compat/

More information about the freebsd-questions mailing list