clamav-users -- Amos wrote:

gcc -g -O2 -o clamscan output.o getopt.o memory.o cfgparser.o clamscan.o options.o others.o manager.o treewalk.o -L/usr/local/lib -L/usr/soft/that/clamav-0.71/src/default/sparc_sun_solaris2.8/libclamav /usr/local/lib/libclamav.so -lz -lbz2 /usr/local/lib/libgmp.so -lpthread -R/usr/local/lib -R/usr/local/lib
Undefined first referenced
symbol in file
cl_settempdir clamscan.o
ld: fatal: Symbol referencing errors. No output written to clamscan
collect2: ld returned 1 exit status
gmake[2]: *** [clamscan] Error 1

I'm having a similar problem on two FreeBSD 4.x servers. Actually I can get it to compile successfully on one FreeBSD 4.7 box and on other FreeBSD 4.7 they blow up similar to what you see above..


/bin/sh ../libtool --mode=link cc -O -pipe -L/usr/local/lib -pthread -o clamscan output.o getopt.o memory.o cfgparser.o clamscan.o options.o others.o manager.o treewalk.o -L../libclamav -lclamav
mkdir .libs
cc -O -pipe -pthread -o clamscan output.o getopt.o memory.o cfgparser.o clamscan.o options.o others.o manager.o treewalk.o -L/usr/local/lib -L/usr/ports/security/clamav/work/clamav-0.71/libclamav /usr/local/lib/libclamav.so -lz -lbz2 -lc_r -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib
clamscan.o: In function `clamscan':
clamscan.o(.text+0x150): undefined reference to `cl_settempdir'
clamscan.o(.text+0x174): undefined reference to `cl_settempdir'
gmake[2]: *** [clamscan] Error 1



On another FreeBSD 4.7 box it seems to compile flawlessly. I've checked all the depends as far as I know of (libgmp, pthreads, etc.) everything seems to be there and 0.70 compiled without a hitch. I'm suspecting something has changed with the libtool included in the distribution.


The other box (same OS) compiled just fine:

/bin/sh ../libtool --mode=link cc -O -pipe -L/usr/local/lib -pthread -o clamscan output.o getopt.o memory.o cfgparser.o clamscan.o options.o others.o manager.o treewalk.o -L../libclamav -lclamav
cc -O -pipe -pthread -o .libs/clamscan output.o getopt.o memory.o cfgparser.o clamscan.o options.o others.o manager.o treewalk.o -L/usr/local/lib -L/usr/ports/security/clamav/work/clamav-0.71/libclamav /nfs-misc/FreeBSD/ports/security/clamav/work/clamav-0.71/libclamav/.libs/libclamav.so -lz -lbz2 -lgmp -Wl,--rpath -Wl,/usr/local/lib



The only thing I found differently was the following:

Box that didn't work:

foo# ldconfig -r | grep libc_r
        13:-lc_r.4 => /usr/lib/libc_r.so.4
        69:-lc_r.3 => /usr/lib/compat/libc_r.so.3


Box that worked:

bar# ldconfig -r | grep libc_r
        13:-lc_r.4 => /usr/lib/libc_r.so.4

--
Robert Blayzor, BOFH
INOC, LLC
[EMAIL PROTECTED]
PGP: http://www.inoc.net/~dev/
Key fingerprint = 1E02 DABE F989 BC03 3DF5  0E93 8D02 9D0B CB1A A7B0

Supercomputer: Turns CPU-bound problem into I/O-bound problem. - Ken Batcher


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Clamav-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/clamav-users

Reply via email to