Hi
I have a problem building the latest version of Ethereal
against libpcap-0.6.2 on alphaev6-dec-osf4.0f.
The problem is that snprintf and vsnprintf are required by
libpcap but are not supplied by the OS.
Ethereal needs to be able to link against libpcap during
./configure so it expects everything to be available before
any of its own code can be compiled (ethereal supplies it's
own version of these two routines).
Here is an extract from Ethereal's config.log file:-
The config.log contains:
configure:2941: checking for connect
configure:2969: gcc -o conftest -Wall -W -Wno-unused -g -I$(top_srcdir)
-I$(top_srcdir)/wiretap -I$(top_srcdir)/epan -I/usr/local/i
nclude -I/usr/users21/toy/lib/glib/include -I/usr/users21/toy/include
-I$(top_srcdir) -I$(top_srcdir)/wiretap -I$(top_srcdir)/epan
-I/usr/local/include -L/usr/local/lib conftest.c -L/usr/users21/toy/lib
1>&5
configure:3035: checking whether to use libpcap for packet capture
configure:3078: checking for extraneous pcap header directories
configure:3120: checking for net/bpf.h
configure:3130: gcc -E -I$(top_srcdir) -I$(top_srcdir)/wiretap
-I$(top_srcdir)/epan -I/usr/local/include -I/usr/users21/toy/include
conftest.c >/dev/null 2>conftest.out
configure:3154: checking for pcap.h
configure:3164: gcc -E -I$(top_srcdir) -I$(top_srcdir)/wiretap
-I$(top_srcdir)/epan -I/usr/local/include -I/usr/users21/toy/include
conftest.c >/dev/null 2>conftest.out
configure:3191: checking for pcap_open_live in -lpcap
configure:3210: gcc -o conftest -Wall -W -Wno-unused -g -I$(top_srcdir)
-I$(top_srcdir)/wiretap -I$(top_srcdir)/epan -I/usr/local/include
-I/usr/users21/toy/lib/glib/include -I/usr/users21/toy/include
-I/usr/users21/toy/include -I$(top_srcdir) -I$(top_srcdir)/wiretap
-I$(top_srcdir)/epan -I/usr/local/include -I/usr/users21/toy/include
-L/usr/local/lib conftest.c -lpcap -L/usr/users21/toy/lib 1>&5
collect2: ld returned 1 exit status
/usr/bin/ld:
Unresolved:
snprintf
vsnprintf
configure: failed program was:
#line 3199 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char pcap_open_live();
int main() {
pcap_open_live()
; return 0; }
I am contacting you because Guy Harris recommended that action as
the problem may crop up for other users as well (see below).
Regards
==================================================
Richard Toy tel:+31-(0)43-3661.112
Eurocontrol Maastricht UAC fax:+31-(0)43-3661.300
Horsterweg 11
NL - 6199 AC
Maastricht - Airport
e-mail(company):[EMAIL PROTECTED]
e-mail(private):[EMAIL PROTECTED]
==================================================
-----Original Message-----
From: Guy Harris [mailto:[EMAIL PROTECTED]]
Sent: 18 July 2001 00:37
To: TOY Richard
Cc: '[EMAIL PROTECTED]'
Subject: Re: [Ethereal-users] Problems building ethereal-0.8.19
> Why is the test program expecting to use snprintf & vsnprintf?
Probably because the test program is using libpcap (which, given that
it's testing for the existence of libpcap, it has to do), and the
version of libpcap on your system is expecting to use snprintf and
vsnprintf - the most recent versions of libpcap do.
Unfortunately, it appears your OS doesn't have snprintf or vsnprintf.
tcpdump compensates for this by supplying its own versions of those
routines, as does Ethereal; unfortunately, this doesn't help in autoconf
scripts.
I'd suggest mailing [EMAIL PROTECTED] about this, as it's
really a libpcap problem, and could conceivably show up with *other*
libpcap-based programs (although Ethereal is somewhat special in that it
can be built even if you don't have libpcap - the build produces a
program that can't capture traffic, but that *can* read captures from
other programs such as tcpdump.
As a short-term fix, I would suggest either
1) upgrading your OS to a version that includes snprintf and
vsnprintf;
2) getting rid of the libpcap under "/usr/users21/toy" (and if
that's the only one installed on your system, installing an
older one that doesn't use snprintf or vsnprintf - 0.5.2
*might* not use it:
http://www.tcpdump.org/release/
).
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe