lnln1111 / scholarzhang

Automatically exported from code.google.com/p/scholarzhang
0 stars 1 forks source link

2.6.35内核下编译出错 #116

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. 在内核2.6.35下编译出错
错误信息:
 ==> start autogen.sh
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
==> start configure
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
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 ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -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 dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux 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... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libxtables... yes
checking linux/netfilter/x_tables.h usability... yes
checking linux/netfilter/x_tables.h presence... yes
checking for linux/netfilter/x_tables.h... yes
Found kernel version 2.6.35.0 in /lib/modules/2.6.35-ARCH/build
WARNING: You are trying a newer kernel. Results may vary. :-)
configure: creating ./config.status
config.status: creating Makefile
config.status: creating Makefile.iptrules
config.status: creating Makefile.mans
config.status: creating extensions/Makefile
config.status: creating extensions/ipset/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
==> start make
make  all-recursive
make[1]: Entering directory 
`/var/abs/local/yaourtbuild/west-chamber/west-chamber/src/west-chamber-0.0.1'
Making all in extensions
make[2]: Entering directory 
`/var/abs/local/yaourtbuild/west-chamber/west-chamber/src/west-chamber-0.0.1/ext
ensions'
if [ -n "/lib/modules/2.6.35-ARCH/build" ]; then make -C 
/lib/modules/2.6.35-ARCH/build 
M=/var/abs/local/yaourtbuild/west-chamber/west-chamber/src/west-chamber-0.0.1/ex
tensions modules; fi;
make[3]: Entering directory `/usr/src/linux-2.6.35-ARCH'
  CC [M]  /var/abs/local/yaourtbuild/west-chamber/west-chamber/src/west-chamber-0.0.1/extensions/compat_xtables.o
In file included from 
/var/abs/local/yaourtbuild/west-chamber/west-chamber/src/west-chamber-0.0.1/exte
nsions/compat_xtables.c:21:0:
/var/abs/local/yaourtbuild/west-chamber/west-chamber/src/west-chamber-0.0.1/exte
nsions/compat_xtnu.h:87:53: warning: ‘struct xt_match_param’ declared 
inside parameter list
/var/abs/local/yaourtbuild/west-chamber/west-chamber/src/west-chamber-0.0.1/exte
nsions/compat_xtnu.h:87:53: warning: its scope is only this definition or 
declaration, which is probably not what you want
/var/abs/local/yaourtbuild/west-chamber/west-chamber/src/west-chamber-0.0.1/exte
nsions/compat_xtnu.h:103:16: warning: ‘struct xt_target_param’ declared 
inside parameter list
/var/abs/local/yaourtbuild/west-chamber/west-chamber/src/west-chamber-0.0.1/exte
nsions/compat_xtables.c:193:51: warning: ‘struct xt_target_param’ declared 
inside parameter list
/var/abs/local/yaourtbuild/west-chamber/west-chamber/src/west-chamber-0.0.1/exte
nsions/compat_xtables.c: In function ‘xtnu_target_run’:
/var/abs/local/yaourtbuild/west-chamber/west-chamber/src/west-chamber-0.0.1/exte
nsions/compat_xtables.c:207:48: error: dereferencing pointer to incomplete type
/var/abs/local/yaourtbuild/west-chamber/west-chamber/src/west-chamber-0.0.1/exte
nsions/compat_xtables.c:216:3: warning: passing argument 2 of ‘nt->target’ 
from incompatible pointer type
/var/abs/local/yaourtbuild/west-chamber/west-chamber/src/west-chamber-0.0.1/exte
nsions/compat_xtables.c:216:3: note: expected ‘const struct xt_target_param 
*’ but argument is of type ‘const struct xt_target_param *’
/var/abs/local/yaourtbuild/west-chamber/west-chamber/src/west-chamber-0.0.1/exte
nsions/compat_xtables.c: In function ‘xtnu_register_target’:
/var/abs/local/yaourtbuild/west-chamber/west-chamber/src/west-chamber-0.0.1/exte
nsions/compat_xtables.c:294:17: warning: assignment from incompatible pointer 
type
/var/abs/local/yaourtbuild/west-chamber/west-chamber/src/west-chamber-0.0.1/exte
nsions/compat_xtables.c:299:17: warning: assignment from incompatible pointer 
type
make[4]: *** 
[/var/abs/local/yaourtbuild/west-chamber/west-chamber/src/west-chamber-0.0.1/ext
ensions/compat_xtables.o] Error 1
make[3]: *** 
[_module_/var/abs/local/yaourtbuild/west-chamber/west-chamber/src/west-chamber-0
.0.1/extensions] Error 2
make[3]: Leaving directory `/usr/src/linux-2.6.35-ARCH'
make[2]: *** [modules] Error 2
make[2]: Leaving directory 
`/var/abs/local/yaourtbuild/west-chamber/west-chamber/src/west-chamber-0.0.1/ext
ensions'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 
`/var/abs/local/yaourtbuild/west-chamber/west-chamber/src/west-chamber-0.0.1'
make: *** [all] Error 2
    Aborting...

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
both svn 101 and 0.01 version
os: archlinux 2.6.35
iptables vesion: v1.4.9

Please provide any additional information below.
I'm a green hand on unix network programming. Could you point out how I can fix 
this briefly If you don't have time to fix this problem. thx!

Original issue reported on code.google.com by QiuWei1...@gmail.com on 23 Aug 2010 at 6:38

GoogleCodeExporter commented 9 years ago
Issue 120 has been merged into this issue.

Original comment by yingyingcui.scholarzhang@gmail.com on 17 Oct 2010 at 6:08

GoogleCodeExporter commented 9 years ago
内核的netfilter部分变动挺快的,这个就是把Xtables-addons套装拿
来改了一下,核心文件就几个,当时是1.22,现在xtables-addons��
�1.30了,这就是问题所在。估计liruqi在弄这个吧?交给他了。

Original comment by yingyingcui.scholarzhang@gmail.com on 17 Oct 2010 at 6:12

GoogleCodeExporter commented 9 years ago
hi, I've create a patch, please test it.

http://pastebin.com/wE52WbbF

Original comment by tewil...@gmail.com on 17 Oct 2010 at 1:42

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Can you test revision r105?

Original comment by yingyingcui.scholarzhang@gmail.com on 18 Oct 2010 at 3:22

GoogleCodeExporter commented 9 years ago
Hi, sorry for test it late.
now I can compile the package successfully.
But when run the iptables bla bla.
I get errors as below:
/usr/lib/iptables/libxt_ZHANG.so: libxtables.so.4: cannot open shared object 
file: No such file or directory
/usr/lib/iptables/libxt_ZHANG.so: libxtables.so.4: cannot open shared object 
file: No such file or directory
iptables v1.4.9: Couldn't load target 
`ZHANG':/usr/lib/iptables/libipt_ZHANG.so: cannot open shared object file: No 
such file or directory

Try `iptables -h' or 'iptables --help' for more information.
/usr/lib/iptables/libxt_CUI.so: libxtables.so.4: cannot open shared object 
file: No such file or directory
/usr/lib/iptables/libipt_CUI.so: libxtables.so.4: cannot open shared object 
file: No such file or directory
/usr/lib/iptables/libxt_CUI.so: libxtables.so.4: cannot open shared object 
file: No such file or directory
/usr/lib/iptables/libipt_CUI.so: libxtables.so.4: cannot open shared object 
file: No such file or directory
iptables v1.4.9: Couldn't load target `CUI':(null)

Try `iptables -h' or 'iptables --help' for more information.
/usr/lib/iptables/libxt_gfw.so: libxtables.so.4: cannot open shared object 
file: No such file or directory
/usr/lib/iptables/libipt_gfw.so: libxtables.so.4: cannot open shared object 
file: No such file or directory
iptables v1.4.9: Couldn't load match `gfw':(null)

Try `iptables -h' or 'iptables --help' for more information.
/usr/lib/iptables/libxt_gfw.so: libxtables.so.4: cannot open shared object 
file: No such file or directory
/usr/lib/iptables/libipt_gfw.so: libxtables.so.4: cannot open shared object 
file: No such file or directory
iptables v1.4.9: Couldn't load match `gfw':(null)

=============================================================
I searched  in other issues then make symbollink from libxt_ZHANG to 
libipt_ZHANG,
from libxt_CUI to libipt_CUI, and so on.
Then the error seems changed:

Try `ipset -H' or 'ipset --help' for more information.
/usr/lib/iptables/libxt_ZHANG.so: libxtables.so.4: cannot open shared object 
file: No such file or directory
/usr/lib/iptables/libxt_ZHANG.so: libxtables.so.4: cannot open shared object 
file: No such file or directory
iptables v1.4.9: Couldn't load target 
`ZHANG':/usr/lib/iptables/libipt_ZHANG.so: cannot open shared object file: No 
such file or directory

Try `iptables -h' or 'iptables --help' for more information.
/usr/lib/iptables/libxt_CUI.so: libxtables.so.4: cannot open shared object 
file: No such file or directory
/usr/lib/iptables/libipt_CUI.so: libxtables.so.4: cannot open shared object 
file: No such file or directory
/usr/lib/iptables/libxt_CUI.so: libxtables.so.4: cannot open shared object 
file: No such file or directory
/usr/lib/iptables/libipt_CUI.so: libxtables.so.4: cannot open shared object 
file: No such file or directory
iptables v1.4.9: Couldn't load target `CUI':(null)

Try `iptables -h' or 'iptables --help' for more information.
/usr/lib/iptables/libxt_gfw.so: libxtables.so.4: cannot open shared object 
file: No such file or directory
/usr/lib/iptables/libipt_gfw.so: libxtables.so.4: cannot open shared object 
file: No such file or directory
iptables v1.4.9: Couldn't load match `gfw':(null)

====================================================================
I searched in my /usr/lib/. there is no libxtables.so.4 but libxtables.so.5.
Trying symbollink from libxtables.so.5 to libxtables.so.4 doesn't work.

iptables: target "ZHANG" has version "libxtables.so.4", but "libxtables.so.5" 
is required.
iptables: target "CUI" has version "libxtables.so.4", but "libxtables.so.5" is 
required.
iptables: match "gfw" has version "libxtables.so.4", but "libxtables.so.5" is 
required.
iptables: match "gfw" has version "libxtables.so.4", but "libxtables.so.5" is 
required.
======================================================================

I'm using archlinux with kernel 2.6.35 ,iptables 1.4.9, and ipset 4.4. Sorry 
for the poor typesetting. 

Original comment by QiuWei1...@gmail.com on 20 Oct 2010 at 12:14

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
fixed by r105

Original comment by yingyingcui.scholarzhang@gmail.com on 23 Oct 2010 at 7:23

GoogleCodeExporter commented 9 years ago
I got the similar error:
iptables: target "ZHANG" has version "libxtables.so.2", but "libxtables.so.5" 
is required.
....

I have compiled iptables 1.4.10 and xtables-addons 1.34, recompile web-chamber 
doesn't work, is there any solution for it?

Original comment by ubunt...@gmail.com on 10 Apr 2011 at 4:28

GoogleCodeExporter commented 9 years ago
> iptables: target "ZHANG" has version "libxtables.so.2", but "libxtables.so.5" 
is required.

This means you need to update the version of your iptables.

Original comment by kiz...@gmail.com on 17 Sep 2011 at 1:57

GoogleCodeExporter commented 9 years ago

Original comment by kiz...@gmail.com on 17 Sep 2011 at 2:42