Share

Netflow iptables module

Tracker: Bugs/Requests/Patches

5 Error on compile - multiple definition of `_init' - ID: 2870719
Last Update: Comment added ( nobody )

Compiling for kernel 2.6.18-164.el5
make -C /lib/modules/2.6.18-164.el5/build M=/root/distr/netflow/ipt_netflow
modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-164.el5-x86_64'
CC [M] /root/distr/netflow/ipt_netflow/ipt_NETFLOW.o
Building modules, stage 2.
MODPOST
CC /root/distr/netflow/ipt_netflow/ipt_NETFLOW.mod.o
LD [M] /root/distr/netflow/ipt_netflow/ipt_NETFLOW.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.18-164.el5-x86_64'
gcc -O2 -Wall -Wunused -I/lib/modules/2.6.18-164.el5/build/include
-I/root/distr/iptables/iptables-1.3.5/include -DIPTABLES_V
ERSION=\"1.3.5\" -fPIC -o libipt_NETFLOW_sh.o -c libipt_NETFLOW.c
gcc -shared -o libipt_NETFLOW.so libipt_NETFLOW_sh.o
libipt_NETFLOW_sh.o: In function `_init':
libipt_NETFLOW.c:(.text+0x30): multiple definition of `_init'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crti.o:(.init+0x0)
: first defined here
collect2: ld returned 1 exit status
make: *** [libipt_NETFLOW.so] Error 1

------------


Oleg S. ( zatupitel ) - 2009-09-30 13:00

5

Open

None

Nobody/Anonymous

Compilation issue

v1.6

Public


Comments ( 2 )




Date: 2009-10-18 08:29
Sender: nobody

Пытался собрать ipt_netflow версии 1.6 под CentOS 5
и столкнулся с проблемой, модуль для ядра
собирался прекрасно, а вот модуль для
iptables выдавал ошибку.

Лечится правкой libipt_NETFLOW.c

-void _init(void)
+void __attribute((constructor)) my_init(void)

Собственно после этого все работает на
ура !

Инфу взял отсюда http://centos.alt.ru/?p=290 ,
проверил работает


Date: 2009-10-08 17:15
Sender: aabcProject Admin

Similar issue:
https://sourceforge.net/tracker/?func=detail&aid=2819372&group_id=232613&atid=1088104


Log in to comment.

Attached File

No Files Currently Attached

Change ( 1 )

Field Old Value Date By
summary Error on compile 2009-09-30 13:01 zatupitel