Wireshark-users: Re: [Wireshark-users] having trouble compiling wireshark

Date Prev · Date Next · Thread Prev · Thread Next
From: "Rohit Grover" <rgrover1@xxxxxxxxx>
Date: Thu, 31 May 2007 18:05:52 +1200
On 5/31/07, Guy Harris <guy@xxxxxxxxxxxx> wrote:
Rohit Grover wrote:

> I've installed libpcap 0.9.5 (from source) on my debian system and
> done a 'make install' to setup libpcap.a. But I get the following
> error when running ./configure for wireshark (0.99.5):
>
> ...
> checking for pcap_open_live in -lpcap... no

configure:24789: gcc -o conftest -D_U_="__attribute__((unused))" -Wall -Wpointer
-arith -W  -g -O2 -I/usr/local/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2
.0/include    -I/usr/local/include  -L/usr/local/lib conftest.c -lpcap    >&5
/usr/local/lib/libpcap.a(grammar.o): In function `pcap_parse':
grammar.c:(.text+0x46f): undefined reference to `pcap_lex'
collect2: ld returned 1 exit status
configure:24795: $? = 1


> checking for pcap_open_live in -lpcap with -lcfg -lodm... no

configure:24830: checking for pcap_open_live in -lpcap with -lcfg -lodm
configure:24861: gcc -o conftest -D_U_="__attribute__((unused))" -Wall -Wpointer
-arith -W  -g -O2 -I/usr/local/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2
.0/include    -I/usr/local/include  -L/usr/local/lib conftest.c -lpcap -lcfg -lo
dm >&5
/usr/bin/ld: cannot find -lcfg
collect2: ld returned 1 exit status


> checking for pcap_open_live in -lpcap with -lpfring... no

configure:24861: gcc -o conftest -D_U_="__attribute__((unused))" -Wall -Wpointer
-arith -W  -g -O2 -I/usr/local/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2
.0/include    -I/usr/local/include  -L/usr/local/lib conftest.c -lpcap -lpfring
&5
/usr/bin/ld: cannot find -lpfring
collect2: ld returned 1 exit status
configure:24867: $? = 1


and in each case,


configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "wireshark"
| #define VERSION "0.99.5"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define YYTEXT_POINTER 1
| #define HTML_VIEWER "mozilla"
| #define HAVE_LIBGNUTLS 1
| #define HAVE_LIBGCRYPT 1
| #define DATAFILE_DIR "/usr/local/share/wireshark"
| #define HAVE_INTTYPES_H 1
| #define INTTYPES_H_DEFINES_FORMATS
| /* end confdefs.h.  */
|
| #     include <pcap.h>
|
| int
| main ()
| {
|
|       pcap_open_live(NULL, 0, 0, 0, NULL);
|
|   ;
|   return 0;
| }
configure:24889: result: no
configure:24903: error: Can't link with library libpcap.


So in case I, I have an undefined reference to pcap_lex() from
/usr/local/lib/libpcap.a(grammar.o); in case II, ld cannot find -lcfg;
and in case III,  ld cannot find -lpfring.


what am I missing here?

thanks,
rohit.