LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   libpcap 0.8.3 installation problem (https://www.linuxquestions.org/questions/linux-software-2/libpcap-0-8-3-installation-problem-180996/)

open2rock 05-13-2004 04:02 AM

libpcap 0.8.3 installation problem
 
Hi,

I am facing some problem in installing libpcap 0.8.3 for redhat 9.0, kernel 2.4.20-8 on i686 machine. I am installing libpcap in #/root/downloads/libpcap-0.8.3 with root priveleges. I have tried ./configure; make; make install ..well this fails below is the output;

[root@localhost libpcap-0.8.3]# ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking gcc version... 3
checking for inline... inline
checking for __attribute__... yes
checking for u_int8_t using gcc... yes
checking for u_int16_t using gcc... yes
checking for u_int32_t using gcc... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/ioccom.h usability... no
checking sys/ioccom.h presence... no
checking for sys/ioccom.h... no
checking sys/sockio.h usability... no
checking sys/sockio.h presence... no
checking for sys/sockio.h... no
checking ifaddrs.h usability... yes
checking ifaddrs.h presence... yes
checking for ifaddrs.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for netinet/if_ether.h... yes
checking for ANSI ioctl definitions... yes
checking for ether_hostton... yes
checking for strerror... yes
checking for strlcpy... no
checking for vsnprintf... yes
checking for snprintf... yes
checking if --disable-protochain option is specified... enabled
checking packet capture type... linux
checking for getifaddrs... yes
checking if --enable-ipv6 option is specified... no
checking whether to build optimizer debugging code... no
checking whether to build parser debugging code... no
checking Linux kernel version... 2
checking if if_packet.h has tpacket_stats defined... yes
checking whether we have /proc/net/dev... yes
checking whether we have DAG API... no
checking for flex... flex
checking for flex 2.4 or higher... yes
checking for bison... bison
checking for ranlib... ranlib
checking if sockaddr struct has sa_len member... no
checking if sockaddr_storage struct exists... yes
checking if dl_hp_ppa_info_t struct has dl_module_id_1 member... no
checking if unaligned accesses fail... no
checking for a BSD-compatible install... /usr/bin/install -c
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged

[root@localhost libpcap-0.8.3]# make
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./pcap-linux.c
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./fad-getad.c
sed -e 's/.*/static const char pcap_version_string[] = "libpcap version &";/' ./
VERSION > version.h
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./pcap.c
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./inet.c
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./gencode.c
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./optimize.c
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./nametoaddr.c
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./etherent.c
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./savefile.c
rm -f bpf_filter.c
ln -s ./bpf/net/bpf_filter.c bpf_filter.c
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c bpf_filter.c
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./bpf_image.c
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./bpf_dump.c
flex -Ppcap_ -t ./scanner.l > $$.scanner.c; mv $$.scanner.c scanner.c
bison -y -p pcap_ -d ./grammar.y

[root@localhost libpcap-0.8.3]# make install
[ -d /usr/local/lib ] || \
(mkdir -p /usr/local/lib; chmod 755 /usr/local/lib)
/usr/bin/install -c -m 644 libpcap.a /usr/local/lib/libpcap.a
ranlib /usr/local/lib/libpcap.a
[ -d /usr/local/include ] || \
(mkdir -p /usr/local/include; chmod 755 /usr/local/include)
/usr/bin/install -c -m 644 ./pcap.h /usr/local/include/pcap.h
/usr/bin/install -c -m 644 ./pcap-bpf.h \
/usr/local/include/pcap-bpf.h
/usr/bin/install -c -m 644 ./pcap-namedb.h \
/usr/local/include/pcap-namedb.h
[ -d /usr/local/man/man3 ] || \
(mkdir -p /usr/local/man/man3; chmod 755 /usr/local/man/man3)
/usr/bin/install -c -m 644 ./pcap.3 \
/usr/local/man/man3/pcap.3

thanks in advance.

Mara 05-13-2004 03:50 PM

Moved: This thread is more suitable in Linux-Software and has been moved accordingly to help your thread/question get the exposure it deserves.

I don't see it failing. It looks like a successfull install.

open2rock 05-14-2004 07:31 AM

Well,

When I verified the libpcap version in using tcpdump...the output displayed libpcap-0.6.2....I guess that does mean libpcap-0.8.3 is not in use....

Now this leads me to understand that libpcap-0.8.3 is not installed..am I missing any steps here....

cetialphav 05-15-2004 01:23 AM

It looks like it installed fine. At least, I don't see any errors. What makes you thing that tcpdump will automatically pick up the new libpcap that you just installed? On my system (Fedora), tcpdump is not dynamically linked to libpcap.

Code:

[todd@perl todd]$ ldd /usr/sbin/tcpdump
        libc.so.6 => /lib/tls/libc.so.6 (0x00aef000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x0038c000)

Also note that on some systems /usr/local/lib is not part of the path when searching for dynamic libraries. I've had to add that directory to /etc/ld.so.conf.

Even if tcpdump were dynamically linked and ld.so.conf was properly configured, it still may not pick up the new libpcap because the version numbers are quite different. You have no assurance that those libraries are binary compatible.

My advice is to rebuild tcpdump and have it link to the new libpcap.


All times are GMT -5. The time now is 04:56 AM.