jaguar13 / opendpi

Automatically exported from code.google.com/p/opendpi
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Error building OpenDPI on RHEL4 #6

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Steps to reproduce the problem:
1. ./configure goes through fine.
2. But when doing make, it fails on ipq_main.c

make[1]: Entering directory `/root/opendpi-1.2.0/src/lib'
/bin/sh ../../libtool --tag=CC   --mode=compile gcc -DPACKAGE_NAME=\"OpenDPI\" 
-DPACKAGE_TARNAME=\"opendpi\" -DPACKAGE_VERSION=\"1.2.0\" 
-DPACKAGE_STRING=\"OpenDPI\ 1.2.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" 
-DPACKAGE=\"opendpi\" -DVERSION=\"1.2.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 
-DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_NETINET_IN_H=1 -DHAVE_STDINT_H=1 
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -I.  -I../../src/include/ 
  -g -O2 -MT ipq_main.lo -MD -MP -MF .deps/ipq_main.Tpo -c -o ipq_main.lo 
ipq_main.c
libtool: compile:  gcc -DPACKAGE_NAME=\"OpenDPI\" -DPACKAGE_TARNAME=\"opendpi\" 
-DPACKAGE_VERSION=\"1.2.0\" "-DPACKAGE_STRING=\"OpenDPI 1.2.0\"" 
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"opendpi\" 
-DVERSION=\"1.2.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 
-DLT_OBJDIR=\".libs/\" -DHAVE_NETINET_IN_H=1 -DHAVE_STDINT_H=1 
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -I. -I../../src/include/ 
-g -O2 -MT ipq_main.lo -MD -MP -MF .deps/ipq_main.Tpo -c ipq_main.c  -fPIC 
-DPIC -o .libs/ipq_main.o
In file included from /usr/include/linux/tcp.h:21,
                 from ipq_main.h:37,
                 from ipq_main.c:24:
/usr/include/asm/byteorder.h:6:2: warning: #warning using private kernel 
header; include <endian.h> instead!
In file included from /usr/include/netinet/ip6.h:23,
                 from ipq_main.h:46,
                 from ipq_main.c:24:
/usr/include/netinet/in.h:354: error: syntax error before '(' token
/usr/include/netinet/in.h:354: error: syntax error before "__u32"
/usr/include/netinet/in.h:355: error: syntax error before '(' token
/usr/include/netinet/in.h:355: error: syntax error before "__u16"
/usr/include/netinet/in.h:357: error: syntax error before '(' token
/usr/include/netinet/in.h:357: error: syntax error before "__u32"
/usr/include/netinet/in.h:359: error: syntax error before '(' token
/usr/include/netinet/in.h:359: error: syntax error before "__u16"
make[1]: *** [ipq_main.lo] Error 1
make[1]: Leaving directory `/root/opendpi-1.2.0/src/lib'
make: *** [all-recursive] Error 1

Kernel Version is:
$ uname -rvm
2.6.9-55.ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007 i686

Libpcap is:
$ rpm -qa | grep pcap
libpcap-0.8.3-10.RHEL4

GCC version is:
$ gcc -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.6/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man 
--infodir=/usr/share/info --enable-shared --enable-threads=posix 
--disable-checking --with-system-zlib --enable-__cxa_atexit 
--disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-8)

Make version is:
$ make -v
GNU Make 3.80

Original issue reported on code.google.com by mrksravi...@gmail.com on 28 Jul 2010 at 1:22

GoogleCodeExporter commented 8 years ago
I managed to compile it by commenting out lines # :365,366,367,368 from the 
file /usr/include/netinet/in.h . 

Am gonna use this temp. fix till someone comes up with a better solution :)

-Kiran C Nair

Original comment by kirancn...@gmail.com on 25 Oct 2010 at 11:24