Tests build failure related to pcap.h

Bug #1071413 reported by Didier Barvaux on 2012-10-25
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
rohc
Status tracked in Rohc-main
1.3.x
Undecided
Didier Barvaux
1.4.x
Undecided
Didier Barvaux
Rohc-1.5.x
Medium
Didier Barvaux
Rohc-main
Medium
Didier Barvaux

Bug Description

 With current branch, I try to build the library and the test programs with :

./autogen.sh

./configure

make clean all

make all

make -C test

make check
cd test/non_regression
make check
cd ../..

And here are the errors:

make test_non_regression
make[1]: entrant dans le répertoire «
/home/dialine/rohc/test/non_regression »
  CC test_non_regression-test_non_regression.o
test_non_regression.c:136: error: expected declaration specifiers or ‘...’
before ‘pcap_dumper_t’
test_non_regression.c:140: warning: ‘struct pcap_pkthdr’ declared inside
parameter list
test_non_regression.c:140: warning: its scope is only this definition or
declaration, which is probably not what you want
test_non_regression.c:407: error: expected declaration specifiers or ‘...’
before ‘pcap_dumper_t’
test_non_regression.c:411: warning: ‘struct pcap_pkthdr’ declared inside
parameter list
test_non_regression.c:403: error: parameter 5 (‘header’) has incomplete type
test_non_regression.c: In function ‘compress_decompress’:
test_non_regression.c:525: error: ‘dumper’ undeclared (first use in this
function)
test_non_regression.c:525: error: (Each undeclared identifier is reported
only once
test_non_regression.c:525: error: for each function it appears in.)
test_non_regression.c:543: warning: implicit declaration of function
‘pcap_dump’
test_non_regression.c: In function ‘test_comp_and_decomp’:
test_non_regression.c:713: error: ‘PCAP_ERRBUF_SIZE’ undeclared (first use
in this function)
test_non_regression.c:714: error: ‘pcap_t’ undeclared (first use in this
function)
test_non_regression.c:714: error: ‘handle’ undeclared (first use in this
function)
test_non_regression.c:715: error: ‘cmp_handle’ undeclared (first use in this
function)
test_non_regression.c:716: error: ‘pcap_dumper_t’ undeclared (first use in
this function)
test_non_regression.c:716: error: ‘dumper’ undeclared (first use in this
function)
test_non_regression.c:719: error: storage size of ‘header’ isn’t known
test_non_regression.c:720: error: storage size of ‘cmp_header’ isn’t known
test_non_regression.c:745: warning: implicit declaration of function
‘pcap_open_offline’
test_non_regression.c:756: warning: implicit declaration of function
‘pcap_datalink’
test_non_regression.c:757: error: ‘DLT_EN10MB’ undeclared (first use in this
function)
test_non_regression.c:758: error: ‘DLT_LINUX_SLL’ undeclared (first use in
this function)
test_non_regression.c:759: error: ‘DLT_RAW’ undeclared (first use in this
function)
test_non_regression.c:786: warning: implicit declaration of function
‘pcap_dump_open’
test_non_regression.c:1018: warning: implicit declaration of function
‘pcap_next’
test_non_regression.c:1037: error: type of formal parameter 5 is incomplete
test_non_regression.c:1037: warning: passing argument 10 of
‘compress_decompress’ makes integer from pointer without a cast
test_non_regression.c:399: note: expected ‘int’ but argument is of type
‘unsigned char *’
test_non_regression.c:1037: warning: passing argument 12 of
‘compress_decompress’ makes pointer from integer without a cast
test_non_regression.c:399: note: expected ‘struct FILE *’ but argument is of
type ‘int’
test_non_regression.c:1037: error: too many arguments to function
‘compress_decompress’
test_non_regression.c:1076: error: type of formal parameter 5 is incomplete
test_non_regression.c:1076: warning: passing argument 10 of
‘compress_decompress’ makes integer from pointer without a cast
test_non_regression.c:399: note: expected ‘int’ but argument is of type
‘unsigned char *’
test_non_regression.c:1076: warning: passing argument 12 of
‘compress_decompress’ makes pointer from integer without a cast
test_non_regression.c:399: note: expected ‘struct FILE *’ but argument is of
type ‘int’
test_non_regression.c:1076: error: too many arguments to function
‘compress_decompress’
test_non_regression.c:1156: warning: implicit declaration of function
‘pcap_close’
test_non_regression.c:1161: warning: implicit declaration of function
‘pcap_dump_close’
test_non_regression.c:720: warning: unused variable ‘cmp_header’
test_non_regression.c:719: warning: unused variable ‘header’
test_non_regression.c:713: warning: unused variable ‘errbuf’
make[1]: *** [test_non_regression-test_non_regression.o] Erreur 1
make[1]: quittant le répertoire «
/home/dialine/rohc/test/non_regression »
make: *** [check-am] Erreur 2

tags: added: build tests
summary: - Build failure related to pcap.h
+ Tests build failure related to pcap.h
Didier Barvaux (didier-barvaux) wrote :
Download full text (3.2 KiB)

Fixed in branch 1.5.x: print an explanation message with #error if pcap.h is not located.
See http://bazaar.launchpad.net/~didier-barvaux/rohc/1.5.x/revision/535

The build output now is:

$ make check -C test/non_regression/
make: Entering directory `rohc/rohc-1.5.x/test/non_regression'
make test_non_regression
make[1]: Entering directory `rohc/rohc-1.5.x/test/non_regression'
  CC test_non_regression-test_non_regression.o
test_non_regression.c:108:4: error: #error "pcap.h header not found, did you specified --enable-rohc-tests for ./configure ? If yes, check configure output and config.log"
test_non_regression.c:139:32: error: unknown type name 'pcap_dumper_t'
test_non_regression.c:410:32: error: unknown type name 'pcap_dumper_t'
test_non_regression.c: In function 'test_comp_and_decomp':
test_non_regression.c:716:14: error: 'PCAP_ERRBUF_SIZE' undeclared (first use in this function)
test_non_regression.c:716:14: note: each undeclared identifier is reported only once for each function it appears in
test_non_regression.c:717:2: error: unknown type name 'pcap_t'
test_non_regression.c:718:2: error: unknown type name 'pcap_t'
test_non_regression.c:719:2: error: unknown type name 'pcap_dumper_t'
test_non_regression.c:722:21: error: storage size of 'header' isn't known
test_non_regression.c:723:21: error: storage size of 'cmp_header' isn't known
test_non_regression.c:748:2: warning: implicit declaration of function 'pcap_open_offline' [-Wimplicit-function-declaration]
test_non_regression.c:759:2: warning: implicit declaration of function 'pcap_datalink' [-Wimplicit-function-declaration]
test_non_regression.c:760:28: error: 'DLT_EN10MB' undeclared (first use in this function)
test_non_regression.c:761:28: error: 'DLT_LINUX_SLL' undeclared (first use in this function)
test_non_regression.c:762:28: error: 'DLT_RAW' undeclared (first use in this function)
test_non_regression.c:789:3: warning: implicit declaration of function 'pcap_dump_open' [-Wimplicit-function-declaration]
test_non_regression.c:789:10: warning: assignment makes pointer from integer without a cast [enabled by default]
test_non_regression.c:1019:2: warning: implicit declaration of function 'pcap_next' [-Wimplicit-function-declaration]
test_non_regression.c:1034:3: warning: implicit declaration of function 'compress_decompress' [-Wimplicit-function-declaration]
test_non_regression.c:1157:3: warning: implicit declaration of function 'pcap_close' [-Wimplicit-function-declaration]
test_non_regression.c:1162:3: warning: implicit declaration of function 'pcap_dump_close' [-Wimplicit-function-declaration]
test_non_regression.c:723:21: warning: unused variable 'cmp_header' [-Wunused-variable]
test_non_regression.c:722:21: warning: unused variable 'header' [-Wunused-variable]
test_non_regression.c:716:7: warning: unused variable 'errbuf' [-Wunused-variable]
test_non_regression.c: At top level:
test_non_regression.c:1197:12: warning: 'compare_packets' defined but not used [-Wunused-function]
make[1]: *** [test_non_regression-test_non_regression.o] Error 1
make[1]: Leaving directory `rohc/rohc-1.5.x/test/non_regression'
make: *** [check-am] Error 2
mak...

Read more...

Didier Barvaux (didier-barvaux) wrote :

Will not be fixed on 1.4.x branch because the pcap.h is not located by configure.

Didier Barvaux (didier-barvaux) wrote :

Will not be fixed on 1.3.x branch because the pcap.h is not located by configure.

Didier Barvaux (didier-barvaux) wrote :

Fixed in trunk: print an explanation message with #error if pcap.h is not located.
See http://bazaar.launchpad.net/~didier-barvaux/rohc/main/revision/535

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers