NICMx / Jool

SIIT and NAT64 for Linux
GNU General Public License v2.0
326 stars 66 forks source link

multiple definition of `_init` #406

Closed BoostCookie closed 1 year ago

BoostCookie commented 1 year ago

I'm getting the following error when running make:

make[3]: Entering directory '/tmp/jool-4.1.9/src/usr/iptables'
cc -Wall -pedantic -std=gnu11 -O2 -I../..    -D_INIT=libxt_JOOL_SIIT_init -fPIC -c -o libxt_JOOL_SIIT.o libxt_JOOL_SIIT.c;
cc -shared -fPIC  -o libxt_JOOL_SIIT.so libxt_JOOL_SIIT.o;
/bin/ld: libxt_JOOL_SIIT.o: in function `_init':
libxt_JOOL_SIIT.c:(.text+0x150): multiple definition of `_init'; /usr/lib/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../lib/crti.o:(.init+0x0): first defined here
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:37: libxt_JOOL_SIIT.so] Error 1
rm libxt_JOOL_SIIT.o
make[3]: Leaving directory '/tmp/jool-4.1.9/src/usr/iptables'
make[2]: *** [Makefile:28: all] Error 2
make[2]: Leaving directory '/tmp/jool-4.1.9/src/usr/iptables'
make[1]: *** [Makefile:359: all-recursive] Error 1
make[1]: Leaving directory '/tmp/jool-4.1.9/src/usr'
make: *** [Makefile:429: all-recursive] Error 1

Here's what I did to get this:

$ curl -LO "https://github.com/NICMx/Jool/releases/download/v4.1.9/jool-4.1.9.tar.gz"
$ tar -xzvf jool-4.1.9.tar.gz
$ cd jool-4.1.9
$ ./configure
$ make

Same problem with version 4.1.8.

ydahhrk commented 1 year ago

I believe this was already fixed by 490ddb0933061cab3c2a7952dffc61789deed565.

Best approach would be to install the latest main. Alternatively, if you don't need the iptables wrappers, you can compile them out:

./configure --with-xtables=no
make clean
make
BoostCookie commented 1 year ago

That is good to hear! Any idea when the next release with that fix is planned?

ydahhrk commented 1 year ago

Next weekend.

ydahhrk commented 1 year ago

4.1.10 released; closing.