I'm having trouble compiling libpcap on Solaris. I tried both the 0.6.2
distribution and the latest copy (as of 6/13/01) checked out of
anonymous cvs.
The machine I'm working on is a Sparc R220. 'uname -a' returns:
SunOS usf-cf-sparc-solaris-1 5.8 Generic_108528-05 sun4u sparc
SUNW,Ultra-60
The compile error is:
gcc -O2 -I. -DHAVE_CONFIG_H -c ./inet.c
./inet.c: In function `pcap_lookupdev':
./inet.c:177: `SIOCGIFCONF' undeclared (first use in this function)
./inet.c:177: (Each undeclared identifier is reported only once
./inet.c:177: for each function it appears in.)
./inet.c:217: `SIOCGIFFLAGS' undeclared (first use in this function)
./inet.c: In function `pcap_lookupnet':
./inet.c:293: `SIOCGIFADDR' undeclared (first use in this function)
./inet.c:307: `SIOCGIFNETMASK' undeclared (first use in this function)
gmake: *** [inet.o] Error 1
On Linux, SIOCGIFCONF is defined in
/usr/include/bits/ioctls.h
/usr/include/linux/sockios.h
On the Solaris machine, a search yielded the following:
net/if.h: * OBSOLETE: Structure used in SIOCGIFCONF request.
sys/sockio.h:#define SIOCGIFCONF _IOWRN('i', 20, 8)
There is an ifdef in inet.c which only includes sockio.h if
HAVE_SYS_SOCKIO_H.
If I manually enable sockio.h, the compile continues and dies at
gcc -O2 -I. -DHAVE_CONFIG_H -c ./gencode.c
In file included from ./gencode.c:56:
sll.h:83: parse error before `u_int16_t'
If I remove the reference to sll.h in gencode.c, the build completes ok.
My initial autoconf results are attached.
thanks,
-pat
ps. I went through this same exercise with the latest source, as of
6/13/01 from anonymous cvs and ran into the same problems. With the
newest codebase, however, I wasn't able to simply comment out sll.h.
There is a dependency on sll.h because LINUX_SLL_P_802_3 is now
referenced in gencode.c. had to make more involved changes to get the
newer codebase to compile. I've been following the tcpdump developer's
mailing list. Maybe some of the recent changes have introduced some
subtle/minor build problems on environments outside the mainstream dev
platforms.
hope that helps, and i'd be happy to provide any additional information
to help debug the problem.
here's my autoconf output.
bash-2.03$ ./configure
loading cache ./config.cache
checking host system type... sparc-sun-solaris2.8
checking target system type... sparc-sun-solaris2.8
checking build system type... sparc-sun-solaris2.8
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 for inline... (cached) inline
checking for __attribute__... (cached) yes
checking for u_int8_t using gcc... (cached) no
checking for u_int16_t using gcc... (cached) no
checking for u_int32_t using gcc... (cached) no
checking how to run the C preprocessor... (cached) gcc -E
checking for sys/ioccom.h... (cached) yes
checking for sys/sockio.h... (cached) yes
checking for ifaddrs.h... (cached) no
checking for netinet/if_ether.h... (cached) yes
checking for ANSI ioctl definitions... (cached) yes
checking for ether_hostton... (cached) no
checking for strerror... (cached) yes
checking for freeifaddrs... (cached) no
checking for strlcpy... (cached) yes
checking if --disable-protochain option is specified... enabled
checking packet capture type... dlpi
checking if --enable-ipv6 option is specified... no
checking for sys/bufmod.h... (cached) yes
checking for sys/dlpi_ext.h... (cached) no
checking for /dev/dlpi device... no
checking for /dev/dlpi directory... no
checking for flex... (cached) flex
checking for flex 2.4 or higher... (cached) yes
checking for bison... (cached) bison
checking for ranlib... (cached) :
checking if sockaddr struct has sa_len member... (cached) no
checking if dl_hp_ppa_info_t struct has dl_module_id_1 member...
(cached) no
checking if unaligned accesses fail... (cached) yes
checking for a BSD compatible install... (cached) /opt/sfw/bin/ginstall
-c
creating ./config.status
creating Makefile
creating config.h
-
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