On Aug 8, 2007, at 2:26 AM, Banny Lau wrote:
> I met the problem while I am running the "make" after finished
> "configure"
> as the following:
>
> ./configure CFLAGS="-D_XOPEN_SOURCE_EXTENDED" --disable-dns --
> disable-shared
> --disable-static
>
> gcc -D_XOPEN_SOURCE_EXTENDED -o clamscan output.o getopt.o cfgparser.o
> misc.o options.o clamscan.o others.o manager.o treewalk.o
> ../libclamav/.libs/libclamav.a -L/usr/local/lib -lz
> /usr/ccs/bin/ld: Unsatisfied symbols:
> ntohl (code)
> collect2: ld returned 1 exit status
> *** Error exit code 1
[ ... ]
> Could you help about it and how can I solve the problem?
ntohl() is part of the byteorder functions used to:
" These routines convert 16 and 32 bit quantities between network
byte
order and host byte order. On machines which have a byte order
which is
the same as the network order, routines are defined as null
macros.
These routines are most often used in conjunction with Internet
addresses
and ports as returned by gethostbyname(3) and getservent(3)."
...and should be found in libc in any POSIX compliant system. For
big-endian systems, which I seem to recall that the HP PA-RISC
systems are, these routines are no-ops, and you can add something like:
#define ntohl(x) (x)
...in a common header file somewhere, or compile and add this to the
link stage to resolve that symbol:
uint32_t ntohl(uint32_t netlong)
{
return netlong;
}
...assuming you have ANSI C99 datatypes available. If you don't,
replace "uint32_t" by whatever is a 32-bit unsigned int datatype on
your platform.
--
-Chuck
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html