Hello,

I have a problem with compiling ClamAV 0.85 with Sun CC (Studio10). During compile, when linking libclamav, I receive following error:


------------
/usr/ccs/bin/ld -G -z defs -h libclamav.so.1 -o .libs/libclamav.so.1.0.11 matcher-ac.lo matcher-bm.lo matcher.lo md5.lo others.lo readdb.lo cvd.lo dsig.lo str.lo scanners.lo filetypes.lo unrarlib.lo zzip-dir.lo zzip-err.lo zzip-file.lo zzip-info.lo zzip-io.lo zzip-stat.lo zzip-zip.lo strc.lo blob.lo mbox.lo message.lo snprintf.lo strrcpy.lo table.lo text.lo ole2_extract.lo vba_extract.lo msexpand.lo pe.lo cabd.lo lzxd.lo mszipd.lo qtmd.lo system.lo upx.lo htmlnorm.lo chmunpack.lo rebuildpe.lo petite.lo fsg.lo line.lo untar.lo special.lo binhex.lo is_tar.lo tnef.lo -R/usr/local/lib -R/usr/local/lib -lunrar -lz -lbz2 /usr/local/lib/libgmp.so -lpthread -lsocket -lnsl -lc
Undefined                       first referenced
 symbol                             in file
__zzip_aligned4                     zzip-zip.lo
ld: fatal: Symbol referencing errors. No output written to .libs/libclamav.so.1.0.11
*** Error code 1
make: Fatal error: Command failed for target `libclamav.la' Current working directory /1compile/clamav/clamav-0.85-rar3/libclamav
*** Error code 1
make: Fatal error: Command failed for target `all-recursive' Current working directory /1compile/clamav/clamav-0.85-rar3
*** Error code 1
make: Fatal error: Command failed for target `all'

------------


As you can see, compiler cannot resolve __zzip_aligned4 symbol, in spite of that fact that such function exist in libclamav/zziplib/zzip-zip.c.

----
_zzip_inline char* __zzip_aligned4(char* p)
----


The string in this file causing the problem:

-----
register char* q = aligned4 (p + sizeof(*hdr) + u_namlen + 1);
-----

"aligned4" function resolves to __zzip_aligned4 by #define directive:

-----
#define aligned4 __zzip_aligned4
-----


Why CC does not compile ClamAV normally, while GCC does? What should I do with that, may be add some parameters to CC?
_______________________________________________
http://lurker.clamav.net/list/clamav-users.html

Reply via email to