Mailing List Archive

Fwd: Compile problems
oh I forgot to say I have:
slackware 8 (kernel 2.4.12 sources are in /usr/src/linux)
libc.so.6 -> libc-2.2.3.so
bash-2.05# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-slackware-linux/2.95.3/specs
gcc version 2.95.3 20010315 (release)

---------- Forwarded Message ----------

Subject: Compile problems
Date: Sun, 9 Dec 2001 13:09:38 +0100
From: freaky <freaky@bananateam.nl>
To: nessus@list.nessus.org
Cc: nessus-devel@list.nessus.org

Hey there,

I've got some compile problems with both the stable and the unstable version.
I'll explain the problem with the unstable since I believe it comes atleast
some further than the stable version.
When trying to compile the nessus-libraries the libpcap-nessus fails, however
the make continues and at the end it shows no error (there are some errors in
the middle of the text somewhere where libpcap compiles). So I run make
install and this gives no appearant errors either, however when trying to
compile libnasl afterwards it gives an error that it's missing libpcap.
Anyways here come the configure and the make from within
nessus-libraries/libpcap-nessus to shorten stuff a bit.

bash-2.05# cd /tmp/nessus-libraries/libpcap-nessus/
bash-2.05# ./configure
loading cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for gcc... (cached) gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking gcc version... (cached) 2
checking how to run the C preprocessor... (cached) gcc -E
checking for malloc.h... (cached) yes
checking for sys/ioccom.h... (cached) no
checking for sys/sockio.h... (cached) no
checking for ANSI ioctl definitions... (cached) yes
checking for ether_hostton... (cached) yes
checking for strerror... (cached) yes
checking packet capture type... snoop
checking for flex... (cached) flex
checking for flex 2.4 or higher... (cached) yes
checking for bison... (cached) bison
checking for ranlib... (cached) ranlib
checking if sockaddr struct has sa_len member... (cached) no
checking if unaligned accesses fail... (cached) no
creating ./config.status
creating Makefile
bash-2.05# make
/bin/sh /tmp/nessus-libraries/libtool gcc -pipe -O2 -I. -Ilinux-include
-I../../include -DHAVE_CONFIG_H -DNESSUS_ON_SSL -DHAVE_MALLOC_H=1
-DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1 -I. -DHAVE_SSL
-I/usr/local/ssl/include -I/usr/local/ssl/include/openssl
-I/usr/local/include -I/tmp/nessus-libraries/include
-I/tmp/nessus-libraries/libpcap-nessus -c ./pcap-snoop.c
rm -f .libs/pcap-snoop.lo
gcc -pipe -O2 -I. -Ilinux-include -I../../include -DHAVE_CONFIG_H
-DNESSUS_ON_SSL -DHAVE_MALLOC_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1
-I. -DHAVE_SSL -I/usr/local/ssl/include -I/usr/local/ssl/include/openssl
-I/usr/local/include -I/tmp/nessus-libraries/include
-I/tmp/nessus-libraries/libpcap-nessus
-c ./pcap-snoop.c -fPIC -DPIC -o .libs/pcap-snoop.lo
./pcap-snoop.c:33: net/if.h: No such file or directory
In file included from ./pcap-snoop.c:38:
linux-include/netinet/if_ether.h:36: net/if_arp.h: No such file or directory
./pcap-snoop.c:41: netinet/udp_var.h: No such file or directory
./pcap-snoop.c:43: netinet/tcpip.h: No such file or directory
In file included from ./pcap-snoop.c:32:
/usr/include/net/raw.h:24: parse error before `u32'
/usr/include/net/raw.h:24: warning: `struct sk_buff' declared inside
parameter list
/usr/include/net/raw.h:24: warning: its scope is only this definition or
declaration, which is probably not what you want.
/usr/include/net/raw.h:24: warning: `struct sock' declared inside parameter
list
/usr/include/net/raw.h:25: warning: `struct sk_buff' declared inside
parameter list
/usr/include/net/raw.h:25: warning: `struct sock' declared inside parameter
list
/usr/include/net/raw.h:31: `MAX_INET_PROTOS' undeclared here (not in a
function)
/usr/include/net/raw.h:33: parse error before `raw_v4_lock'
/usr/include/net/raw.h:33: warning: data definition has no type or storage
class
/usr/include/net/raw.h:40: warning: `struct iphdr' declared inside parameter
list
/usr/include/net/raw.h:40: warning: `struct sk_buff' declared inside
parameter list
In file included from ./pcap-snoop.c:38:
linux-include/netinet/if_ether.h:78: field `ea_hdr' has incomplete type
./pcap-snoop.c: In function `pcap_read':
./pcap-snoop.c:83: dereferencing pointer to incomplete type
./pcap-snoop.c:85: arithmetic on pointer to an incomplete type
./pcap-snoop.c:91: dereferencing pointer to incomplete type
./pcap-snoop.c: In function `pcap_stats':
./pcap-snoop.c:104: storage size of `rawstats' isn't known
./pcap-snoop.c:107: dereferencing pointer to incomplete type
./pcap-snoop.c:108: `SIOCRAWSTATS' undeclared (first use in this function)
./pcap-snoop.c:108: (Each undeclared identifier is reported only once
./pcap-snoop.c:108: for each function it appears in.)
./pcap-snoop.c:114: dereferencing pointer to incomplete type
./pcap-snoop.c:114: dereferencing pointer to incomplete type
./pcap-snoop.c:115: dereferencing pointer to incomplete type
./pcap-snoop.c:115: dereferencing pointer to incomplete type
./pcap-snoop.c: In function `pcap_open_live':
./pcap-snoop.c:126: storage size of `sr' isn't known
./pcap-snoop.c:127: storage size of `sf' isn't known
./pcap-snoop.c:137: `PF_RAW' undeclared (first use in this function)
./pcap-snoop.c:137: `RAWPROTO_SNOOP' undeclared (first use in this function)
./pcap-snoop.c:144: `AF_RAW' undeclared (first use in this function)
./pcap-snoop.c:151: `SIOCADDSNOOP' undeclared (first use in this function)
./pcap-snoop.c:157: `SIOCSNOOPLEN' undeclared (first use in this function)
./pcap-snoop.c:163: `SIOCSNOOPING' undeclared (first use in this function)
make: *** [pcap-snoop.o] Error 1

as far as I can see it's missing some files. if.h (can't find that, there's a
include file in the kernel sources called if_inet6.h though). if_arp.h (can't
find that, there's a arp.h though.) udp_var.h tcpip.h (no such things in the
/netinet includes. i do have an udp.h and a tcp.h)

any ideas?

kind regards,

ferry van steen

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