[libtrace-users] Problem with compiling on OpenBSD 4.2

Niclas Rosell niclas.rosell at iis.se
Tue Apr 1 22:29:30 NZDT 2008


Hi all

We are using LibTrace for a DNS-traffic capturing application and would
like to get this running on OpenBSD as well but it seems that it fails
with bpf (see output below). Any ideas?

Regards

Niclas Rosell


$ uname -prs  
OpenBSD 4.2 Intel(R) Xeon(TM) CPU 3.40GHz ("GenuineIntel" 686-class)
$ ./configure                                                                  
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... 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 for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking for bison... no
checking for byacc... no
checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether byte ordering is bigendian... no
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 for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for _LARGE_FILES value needed for large files... no
checking build system type... i386-unknown-openbsd4.2
checking host system type... i386-unknown-openbsd4.2
checking for a sed that does not truncate output... /usr/bin/sed
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... file_magic ELF
[0-9][0-9]*-bit [LM]SB shared object
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes
checking the maximum length of command line arguments... 65536
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag  works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared
libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... openbsd4.2 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared
libraries... no
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared
libraries... no
checking dynamic linker characteristics... openbsd4.2 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... yes
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker (/usr/bin/ld) supports shared
libraries... yes
checking dynamic linker characteristics... openbsd4.2 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking whether gcc needs -traditional... no
checking for socket... yes
checking for strdup... yes
checking for strlcpy... yes
checking for strcasecmp... yes
checking for strncasecmp... yes
checking for snprintf... yes
checking for long int... yes
checking size of long int... 4
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for strndup... no
checking for ANSI C header files... (cached) yes
checking pcap.h usability... yes
checking pcap.h presence... yes
checking for pcap.h... yes
checking pcap-int.h usability... yes
checking pcap-int.h presence... yes
checking for pcap-int.h... yes
checking pcap-bpf.h usability... no
checking pcap-bpf.h presence... no
checking for pcap-bpf.h... no
checking net/bpf.h usability... yes
checking net/bpf.h presence... yes
checking for net/bpf.h... yes
checking sys/limits.h usability... yes
checking sys/limits.h presence... yes
checking for sys/limits.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking net/ethernet.h usability... no
checking net/ethernet.h presence... no
checking for net/ethernet.h... no
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking netpacket/packet.h usability... no
checking netpacket/packet.h presence... no
checking for netpacket/packet.h... no
checking for net/if.h... yes
checking for netinet/ether.h... no
checking for netinet/if_ether.h... yes
checking for net/if_arp.h... yes
checking for pcap-bpf.h... (cached) no
checking for net/bpf.h... (cached) yes
checking gdc.h usability... no
checking gdc.h presence... no
checking for gdc.h... no
checking for dlopen in -ldl... no
checking for pcap_next_ex in -lpcap... yes
checking for pcap_inject... no
checking for pcap_sendpacket... no
checking for pcap_setnonblock... no
checking whether BIOCSETIF is declared... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking for dag_open in -ldag... no
checking whether we have DAG 2.4 API instead... false
checking for gzopen in -lz... yes
checking for doxygen... false
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating docs/Makefile
config.status: creating libpacketdump/Makefile
config.status: creating tools/Makefile
config.status: creating tools/traceanon/Makefile
config.status: creating tools/tracepktdump/Makefile
config.status: creating tools/tracemerge/Makefile
config.status: creating tools/tracereport/Makefile
config.status: creating tools/tracertstats/Makefile
config.status: creating tools/tracesplit/Makefile
config.status: creating tools/tracestats/Makefile
config.status: creating tools/traceflow/Makefile
config.status: creating examples/Makefile
config.status: creating examples/skeleton/Makefile
config.status: creating examples/rate/Makefile
config.status: creating examples/stats/Makefile
config.status: creating docs/libtrace.doxygen
config.status: creating lib/libtrace.h
config.status: creating config.h
config.status: executing depfiles commands

configure: Libtrace version 3.0.4
configure: Compiled with PCAP 0.8 support: Yes
configure: Compiled with compressed trace (zlib) support: Yes
configure: Compiled with DAG live capture support: No
configure: Building man pages/documentation: No
$ make                     
make  all-recursive
Making all in lib
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H  -I.
-I. -I..      -g -O2 -Wall -W -Wmissing-prototypes -MT
libtraceio-zlib.lo -MD -MP -MF ".deps/libtraceio-zlib.Tpo" -c -o
libtraceio-zlib.lo libtraceio-zlib.c;  then mv -f
".deps/libtraceio-zlib.Tpo" ".deps/libtraceio-zlib.Plo"; else rm -f
".deps/libtraceio-zlib.Tpo"; exit 1; fi
mkdir .libs
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -W -Wmissing-prototypes
-MT libtraceio-zlib.lo -MD -MP -MF .deps/libtraceio-zlib.Tpo -c
libtraceio-zlib.c  -fPIC -DPIC -o .libs/libtraceio-zlib.o
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -W -Wmissing-prototypes
-MT libtraceio-zlib.lo -MD -MP -MF .deps/libtraceio-zlib.Tpo -c
libtraceio-zlib.c -o libtraceio-zlib.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H  -I.
-I. -I..      -g -O2 -Wall -W -Wmissing-prototypes -MT trace.lo -MD -MP
-MF ".deps/trace.Tpo" -c -o trace.lo trace.c;  then mv -f
".deps/trace.Tpo" ".deps/trace.Plo"; else rm -f ".deps/trace.Tpo"; exit
1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -W -Wmissing-prototypes
-MT trace.lo -MD -MP -MF .deps/trace.Tpo -c trace.c  -fPIC -DPIC
-o .libs/trace.o
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -W -Wmissing-prototypes
-MT trace.lo -MD -MP -MF .deps/trace.Tpo -c trace.c -o trace.o
>/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H  -I.
-I. -I..      -g -O2 -Wall -W -Wmissing-prototypes -MT format_erf.lo -MD
-MP -MF ".deps/format_erf.Tpo" -c -o format_erf.lo format_erf.c;  then
mv -f ".deps/format_erf.Tpo" ".deps/format_erf.Plo"; else rm -f
".deps/format_erf.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -W -Wmissing-prototypes
-MT format_erf.lo -MD -MP -MF .deps/format_erf.Tpo -c format_erf.c
-fPIC -DPIC -o .libs/format_erf.o
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -W -Wmissing-prototypes
-MT format_erf.lo -MD -MP -MF .deps/format_erf.Tpo -c format_erf.c -o
format_erf.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H  -I.
-I. -I..      -g -O2 -Wall -W -Wmissing-prototypes -MT format_pcap.lo
-MD -MP -MF ".deps/format_pcap.Tpo" -c -o format_pcap.lo format_pcap.c;
then mv -f ".deps/format_pcap.Tpo" ".deps/format_pcap.Plo"; else rm -f
".deps/format_pcap.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -W -Wmissing-prototypes
-MT format_pcap.lo -MD -MP -MF .deps/format_pcap.Tpo -c format_pcap.c
-fPIC -DPIC -o .libs/format_pcap.o
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -W -Wmissing-prototypes
-MT format_pcap.lo -MD -MP -MF .deps/format_pcap.Tpo -c format_pcap.c -o
format_pcap.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H  -I.
-I. -I..      -g -O2 -Wall -W -Wmissing-prototypes -MT format_legacy.lo
-MD -MP -MF ".deps/format_legacy.Tpo" -c -o format_legacy.lo
format_legacy.c;  then mv -f ".deps/format_legacy.Tpo"
".deps/format_legacy.Plo"; else rm -f ".deps/format_legacy.Tpo"; exit 1;
fi
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -W -Wmissing-prototypes
-MT format_legacy.lo -MD -MP -MF .deps/format_legacy.Tpo -c
format_legacy.c  -fPIC -DPIC -o .libs/format_legacy.o
format_legacy.c: In function `trtime':
format_legacy.c:106: warning: unused variable `envbuf'
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -W -Wmissing-prototypes
-MT format_legacy.lo -MD -MP -MF .deps/format_legacy.Tpo -c
format_legacy.c -o format_legacy.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H  -I.
-I. -I..      -g -O2 -Wall -W -Wmissing-prototypes -MT format_rt.lo -MD
-MP -MF ".deps/format_rt.Tpo" -c -o format_rt.lo format_rt.c;  then mv
-f ".deps/format_rt.Tpo" ".deps/format_rt.Plo"; else rm -f
".deps/format_rt.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -W -Wmissing-prototypes
-MT format_rt.lo -MD -MP -MF .deps/format_rt.Tpo -c format_rt.c  -fPIC
-DPIC -o .libs/format_rt.o
format_rt.c: In function `rt_init_input':
format_rt.c:217: warning: implicit declaration of function `strndup'
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -W -Wmissing-prototypes
-MT format_rt.lo -MD -MP -MF .deps/format_rt.Tpo -c format_rt.c -o
format_rt.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H  -I.
-I. -I..      -g -O2 -Wall -W -Wmissing-prototypes -MT format_helper.lo
-MD -MP -MF ".deps/format_helper.Tpo" -c -o format_helper.lo
format_helper.c;  then mv -f ".deps/format_helper.Tpo"
".deps/format_helper.Plo"; else rm -f ".deps/format_helper.Tpo"; exit 1;
fi
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -W -Wmissing-prototypes
-MT format_helper.lo -MD -MP -MF .deps/format_helper.Tpo -c
format_helper.c  -fPIC -DPIC -o .libs/format_helper.o
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -W -Wmissing-prototypes
-MT format_helper.lo -MD -MP -MF .deps/format_helper.Tpo -c
format_helper.c -o format_helper.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H  -I.
-I. -I..      -g -O2 -Wall -W -Wmissing-prototypes -MT
format_pcapfile.lo -MD -MP -MF ".deps/format_pcapfile.Tpo" -c -o
format_pcapfile.lo format_pcapfile.c;  then mv -f
".deps/format_pcapfile.Tpo" ".deps/format_pcapfile.Plo"; else rm -f
".deps/format_pcapfile.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -W -Wmissing-prototypes
-MT format_pcapfile.lo -MD -MP -MF .deps/format_pcapfile.Tpo -c
format_pcapfile.c  -fPIC -DPIC -o .libs/format_pcapfile.o
format_pcapfile.c: In function `pcapfile_write_packet':
format_pcapfile.c:291: warning: comparison between signed and unsigned
format_pcapfile.c: At top level:
format_pcapfile.c:504: warning: `pcapfile_event' defined but not used
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -W -Wmissing-prototypes
-MT format_pcapfile.lo -MD -MP -MF .deps/format_pcapfile.Tpo -c
format_pcapfile.c -o format_pcapfile.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H  -I.
-I. -I..      -g -O2 -Wall -W -Wmissing-prototypes -MT format_duck.lo
-MD -MP -MF ".deps/format_duck.Tpo" -c -o format_duck.lo format_duck.c;
then mv -f ".deps/format_duck.Tpo" ".deps/format_duck.Plo"; else rm -f
".deps/format_duck.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -W -Wmissing-prototypes
-MT format_duck.lo -MD -MP -MF .deps/format_duck.Tpo -c format_duck.c
-fPIC -DPIC -o .libs/format_duck.o
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -W -Wmissing-prototypes
-MT format_duck.lo -MD -MP -MF .deps/format_duck.Tpo -c format_duck.c -o
format_duck.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H  -I.
-I. -I..      -g -O2 -Wall -W -Wmissing-prototypes -MT format_tsh.lo -MD
-MP -MF ".deps/format_tsh.Tpo" -c -o format_tsh.lo format_tsh.c;  then
mv -f ".deps/format_tsh.Tpo" ".deps/format_tsh.Plo"; else rm -f
".deps/format_tsh.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -W -Wmissing-prototypes
-MT format_tsh.lo -MD -MP -MF .deps/format_tsh.Tpo -c format_tsh.c
-fPIC -DPIC -o .libs/format_tsh.o
format_tsh.c: In function `tsh_get_framing_length':
format_tsh.c:56: warning: unused parameter `packet'
format_tsh.c: In function `tsh_get_link_type':
format_tsh.c:153: warning: unused parameter `packet'
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -W -Wmissing-prototypes
-MT format_tsh.lo -MD -MP -MF .deps/format_tsh.Tpo -c format_tsh.c -o
format_tsh.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H  -I.
-I. -I..      -g -O2 -Wall -W -Wmissing-prototypes -MT format_bpf.lo -MD
-MP -MF ".deps/format_bpf.Tpo" -c -o format_bpf.lo format_bpf.c;  then
mv -f ".deps/format_bpf.Tpo" ".deps/format_bpf.Plo"; else rm -f
".deps/format_bpf.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -W -Wmissing-prototypes
-MT format_bpf.lo -MD -MP -MF .deps/format_bpf.Tpo -c format_bpf.c
-fPIC -DPIC -o .libs/format_bpf.o
format_bpf.c: In function `bpf_get_direction':
format_bpf.c:335: warning: unused parameter `packet'
format_bpf.c: In function `bpf_get_timeval':
format_bpf.c:343: error: incompatible types in assignment
*** Error code 1

Stop in /home/niclas/libtrace-3.0.4/lib.
*** Error code 1

Stop in /home/niclas/libtrace-3.0.4 (line 355 of Makefile).
*** Error code 1

Stop in /home/niclas/libtrace-3.0.4 (line 217 of Makefile).
$ 

-- 
Niclas Rosell
Department for Domain Product and DNS Operation
.SE (The Internet Infrastructure Foundation)
PO Box 7399, SE-103 91 Stockholm, Sweden
Tel: +46 8 452 35 00/25, mobile: +46 73 270 8684
E-mail: niclas.rosell at iis.se
Web:www.iis.se




More information about the Libtrace-users mailing list