LionHear7 / opendpi

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

Cant compile Netfilter wrapper #8

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I've followed the instructions for installation. enabling appropriate kernel 
features and patching the opendpi source. upon running make, I get the 
following error.

make -C /lib/modules/2.6.35-20-generic-pae/build M=$PWD;
make[2]: Entering directory `/usr/src/linux-headers-2.6.35-20-generic-pae'
  CC [M]  /usr/src/opendpi-netfilter-wrapper-1.0/wrapper/src/main.o
/usr/src/opendpi-netfilter-wrapper-1.0/wrapper/src/main.c:452: warning: 
âstruct xt_match_paramâ declared inside parameter list
/usr/src/opendpi-netfilter-wrapper-1.0/wrapper/src/main.c:452: warning: its 
scope is only this definition or declaration, which is probably not what you 
want
/usr/src/opendpi-netfilter-wrapper-1.0/wrapper/src/main.c: In function 
âopendpi_mtâ:
/usr/src/opendpi-netfilter-wrapper-1.0/wrapper/src/main.c:461: error: 
dereferencing pointer to incomplete type
/usr/src/opendpi-netfilter-wrapper-1.0/wrapper/src/main.c: At top level:
/usr/src/opendpi-netfilter-wrapper-1.0/wrapper/src/main.c:597: warning: 
initialization from incompatible pointer type
/usr/src/opendpi-netfilter-wrapper-1.0/wrapper/src/main.c:598: warning: 
initialization from incompatible pointer type
make[3]: *** [/usr/src/opendpi-netfilter-wrapper-1.0/wrapper/src/main.o] Error 1
make[2]: *** [_module_/usr/src/opendpi-netfilter-wrapper-1.0/wrapper/src] Error 
2
make[2]: Leaving directory `/usr/src/linux-headers-2.6.35-20-generic-pae'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/opendpi-netfilter-wrapper-1.0/wrapper/src'
make: *** [all] Error 2

Any clues? 

Regards,

Tom

Original issue reported on code.google.com by t...@northeast.me.uk on 27 Oct 2010 at 2:58

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
opendpi-netfilter-wrapper 1.0 (and 1.1) doesn't support kernel versions later 
than 2.6.34. I patched it to support 2.6.35. It compiles and works fine. Patch 
is attached.

Original comment by p3t3r...@gmail.com on 13 Nov 2010 at 10:19

Attachments:

GoogleCodeExporter commented 9 years ago
There is error in the patch opendpi-netfilter-wrapper-1.1_2.6.35_v2.patch
The function opendpi_mt_check has to return int.
I modified patch opendpi-netfilter-wrapper-1.1_2.6.35_v2.patch
Patch is attached.

Original comment by alex2g...@gmail.com on 28 Jan 2011 at 8:35

Attachments:

GoogleCodeExporter commented 9 years ago
I got error even use patch

[root@42826 wrapper]# make
make -C ipt
make[1]: Entering directory 
`/usr/local/src/opendpi-netfilter-wrapper-1.1/wrapper/ipt'
if test -d opendpi_cpy; then \
                cp /usr/local/src/opendpi-netfilter-wrapper-1.1/opendpi-1.2.0/src/* opendpi_cpy -R; \
        else \
                mkdir opendpi_cpy; \
                cp /usr/local/src/opendpi-netfilter-wrapper-1.1/opendpi-1.2.0/src/* opendpi_cpy -R; \
        fi
make libxt_opendpi.so
make[2]: Entering directory 
`/usr/local/src/opendpi-netfilter-wrapper-1.1/wrapper/ipt'
gcc -fPIC -Iopendpi_cpy/include -Iopendpi_cpy/lib -I../src 
-DOPENDPI_NETFILTER_MODULE -O2 -Wall -D_INIT=libxt_opendpi_init -c -o 
libxt_opendpi.o libxt_opendpi.c;
libxt_opendpi.c:26:21: error: xtables.h: No such file or directory
libxt_opendpi.c:36: warning: âstruct xt_entry_matchâ declared inside 
parameter list
libxt_opendpi.c:36: warning: its scope is only this definition or declaration, 
which is probably not what you want
libxt_opendpi.c: In function âopendpi_mt4_saveâ:
libxt_opendpi.c:38: error: dereferencing pointer to incomplete type
libxt_opendpi.c: At top level:
libxt_opendpi.c:51: warning: âstruct xt_entry_matchâ declared inside 
parameter list
libxt_opendpi.c: In function âopendpi_mt4_printâ:
libxt_opendpi.c:53: error: dereferencing pointer to incomplete type
libxt_opendpi.c: At top level:
libxt_opendpi.c:66: warning: âstruct xt_entry_matchâ declared inside 
parameter list
libxt_opendpi.c: In function âopendpi_mt4_parseâ:
libxt_opendpi.c:68: error: dereferencing pointer to incomplete type
libxt_opendpi.c:78: error: âtrueâ undeclared (first use in this function)
libxt_opendpi.c:78: error: (Each undeclared identifier is reported only once
libxt_opendpi.c:78: error: for each function it appears in.)
libxt_opendpi.c:82: error: âfalseâ undeclared (first use in this function)
libxt_opendpi.c: In function âopendpi_mt_checkâ:
libxt_opendpi.c:93: warning: implicit declaration of function âexit_errorâ
libxt_opendpi.c:93: error: âPARAMETER_PROBLEMâ undeclared (first use in this 
function)
libxt_opendpi.c: At top level:
libxt_opendpi.c:113: warning: âstruct xt_entry_matchâ declared inside 
parameter list
libxt_opendpi.c: In function âopendpi_mt_initâ:
libxt_opendpi.c:115: error: dereferencing pointer to incomplete type
libxt_opendpi.c:115: warning: unused variable âinfoâ
libxt_opendpi.c: At top level:
libxt_opendpi.c:123: error: variable âopendpi_mt4_regâ has initializer but 
incomplete type
libxt_opendpi.c:124: error: unknown field âversionâ specified in initializer
libxt_opendpi.c:124: error: âXTABLES_VERSIONâ undeclared here (not in a 
function)
libxt_opendpi.c:124: warning: excess elements in struct initializer
libxt_opendpi.c:124: warning: (near initialization for âopendpi_mt4_regâ)
libxt_opendpi.c:125: error: unknown field ânameâ specified in initializer
libxt_opendpi.c:125: warning: excess elements in struct initializer
libxt_opendpi.c:125: warning: (near initialization for âopendpi_mt4_regâ)
libxt_opendpi.c:126: error: unknown field ârevisionâ specified in initializer
libxt_opendpi.c:126: warning: excess elements in struct initializer
libxt_opendpi.c:126: warning: (near initialization for âopendpi_mt4_regâ)
libxt_opendpi.c:128: error: unknown field âfamilyâ specified in initializer
libxt_opendpi.c:128: warning: excess elements in struct initializer
libxt_opendpi.c:128: warning: (near initialization for âopendpi_mt4_regâ)
libxt_opendpi.c:132: error: unknown field âsizeâ specified in initializer
libxt_opendpi.c:132: warning: implicit declaration of function âXT_ALIGNâ
libxt_opendpi.c:132: warning: excess elements in struct initializer
libxt_opendpi.c:132: warning: (near initialization for âopendpi_mt4_regâ)
libxt_opendpi.c:133: error: unknown field âuserspacesizeâ specified in 
initializer
libxt_opendpi.c:133: warning: excess elements in struct initializer
libxt_opendpi.c:133: warning: (near initialization for âopendpi_mt4_regâ)
libxt_opendpi.c:134: error: unknown field âhelpâ specified in initializer
libxt_opendpi.c:134: warning: excess elements in struct initializer
libxt_opendpi.c:134: warning: (near initialization for âopendpi_mt4_regâ)
libxt_opendpi.c:135: error: unknown field âinitâ specified in initializer
libxt_opendpi.c:135: warning: excess elements in struct initializer
libxt_opendpi.c:135: warning: (near initialization for âopendpi_mt4_regâ)
libxt_opendpi.c:136: error: unknown field âparseâ specified in initializer
libxt_opendpi.c:136: warning: excess elements in struct initializer
libxt_opendpi.c:136: warning: (near initialization for âopendpi_mt4_regâ)
libxt_opendpi.c:137: error: unknown field âfinal_checkâ specified in 
initializer
libxt_opendpi.c:137: warning: excess elements in struct initializer
libxt_opendpi.c:137: warning: (near initialization for âopendpi_mt4_regâ)
libxt_opendpi.c:138: error: unknown field âprintâ specified in initializer
libxt_opendpi.c:138: warning: excess elements in struct initializer
libxt_opendpi.c:138: warning: (near initialization for âopendpi_mt4_regâ)
libxt_opendpi.c:139: error: unknown field âsaveâ specified in initializer
libxt_opendpi.c:139: warning: excess elements in struct initializer
libxt_opendpi.c:139: warning: (near initialization for âopendpi_mt4_regâ)
libxt_opendpi.c:140: error: unknown field âextra_optsâ specified in 
initializer
libxt_opendpi.c:140: warning: excess elements in struct initializer
libxt_opendpi.c:140: warning: (near initialization for âopendpi_mt4_regâ)
libxt_opendpi.c: In function â_initâ:
libxt_opendpi.c:149: error: âfalseâ undeclared (first use in this function)
libxt_opendpi.c:157: warning: implicit declaration of function 
âxtables_register_matchâ
make[2]: *** [libxt_opendpi.o] Error 1
make[2]: Leaving directory 
`/usr/local/src/opendpi-netfilter-wrapper-1.1/wrapper/ipt'
make[1]: *** [all] Error 2
make[1]: Leaving directory 
`/usr/local/src/opendpi-netfilter-wrapper-1.1/wrapper/ipt'
make: *** [all] Error 2

My server:

Linux 42826.server.local 2.6.18-238.19.1.el5PAE #1 SMP Fri Jul 15 08:15:44 EDT 
2011 i686 i686 i386 GNU/Linux

Original comment by blogaf...@gmail.com on 1 Aug 2011 at 10:35

GoogleCodeExporter commented 9 years ago
Sorry, the prob is exactly the same as in the latest comment. First, the patch 
was applied particularly (see below). Then compile errors were the same.

Would you please help?

-- cut --
# patch -p3 < patch
patching file ipt/libxt_opendpi.c
Hunk #2 FAILED at 124.
1 out of 2 hunks FAILED -- saving rejects to file ipt/libxt_opendpi.c.rej
patching file src/main.c
Hunk #1 succeeded at 452 with fuzz 1.
Hunk #2 succeeded at 541 with fuzz 1.
Hunk #3 succeeded at 556 with fuzz 2.

Original comment by cu6a...@gmail.com on 10 Jan 2012 at 1:33

GoogleCodeExporter commented 9 years ago
Sorry about panic. Downgraded from 2.6.39.4 to 2.6.35.9. Then patched MANUALLY.
Everything compiled ok.
Thanks for patch anyway! ;)

Original comment by cu6a...@gmail.com on 10 Jan 2012 at 3:07