Error with test_non_regression compilation

Asked by FWX

Hello,

 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

Question information

Language:
English Edit question
Status:
Solved
For:
rohc Edit question
Assignee:
No assignee Edit question
Solved by:
FWX
Solved:
Last query:
Last reply:
Revision history for this message
FWX (dialine-rohc-team) said :
#1

The problem is due to file pcap/pcap.h not included, because WITH_PCAP_H ou WITH_PCAP_PCAP_H not defined in config.h

 The solution is to enable RoHC tests where configuring the package :

 $ ./configure --enable-rohc-tests
 $ make clean all
 $ make check -C test/non_regression