NICMx / Jool

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

Jool on Openwrt (Nftables) #372

Closed tiagogaspar8 closed 2 years ago

tiagogaspar8 commented 2 years ago

Hi!

As asked I opened another thread to discuss this.

I have came into an issue, where OpenWrt has libtool 2.4.2 and jool is requiring 2.4.6. Is there a requirement for this or can I patch jool to support the 2.4.2 version?

tiagogaspar8 commented 2 years ago

Hi @ydahhrk I have patched jool to 4.6.2 and I get the following error:

OpenWrt-libtool: compile:  arm-openwrt-linux-muslgnueabi-gcc -DPACKAGE_NAME=\"Jool\" -DPACKAGE_TARNAME=\"jool\" -DPACKAGE_VERSION=\"4.1.6\" "-DPACKAGE_STRING=\"Jool 4.1.6\"" -DPACKAGE_BUGREPORT=\"jool@nic.mx\" -DPACKAGE_URL=\"\" -DPACKAGE=\"jool\" -DVERSION=\"4.1.6\" -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_ARPA_INET_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1 -DHAVE_INET_NTOA=1 -DHAVE_MEMSET=1 -DHAVE_STRCASECMP=1 -DHAVE_STRTOL=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -Wall -pedantic -std=gnu11 -I../../../src -I/mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/usr/include/libnl3 -DXTABLES_DISABLED -MT wargp/libjoolargp_la-instance.lo -MD -MP -MF wargp/.deps/libjoolargp_la-instance.Tpo -c wargp/instance.c -o wargp/libjoolargp_la-instance.o >/dev/null 2>&1

mv -f wargp/.deps/libjoolargp_la-instance.Tpo wargp/.deps/libjoolargp_la-instance.Plo

/bin/bash ../../../libtool  --tag=CC   --mode=compile arm-openwrt-linux-muslgnueabi-gcc -DPACKAGE_NAME=\"Jool\" -DPACKAGE_TARNAME=\"jool\" -DPACKAGE_VERSION=\"4.1.6\" -DPACKAGE_STRING=\"Jool\ 4.1.6\" -DPACKAGE_BUGREPORT=\"jool@nic.mx\" -DPACKAGE_URL=\"\" -DPACKAGE=\"jool\" -DVERSION=\"4.1.6\" -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_ARPA_INET_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1 -DHAVE_INET_NTOA=1 -DHAVE_MEMSET=1 -DHAVE_STRCASECMP=1 -DHAVE_STRTOL=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I.    -Wall -pedantic -std=gnu11 -I../../../src -I/mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/usr/include/libnl3  -DXTABLES_DISABLED  -MT wargp/libjoolargp_la-joold.lo -MD -MP -MF wargp/.deps/libjoolargp_la-joold.Tpo -c -o wargp/libjoolargp_la-joold.lo `test -f 'wargp/joold.c' || echo './'`wargp/joold.c

OpenWrt-libtool: compile:  arm-openwrt-linux-muslgnueabi-gcc -DPACKAGE_NAME=\"Jool\" -DPACKAGE_TARNAME=\"jool\" -DPACKAGE_VERSION=\"4.1.6\" "-DPACKAGE_STRING=\"Jool 4.1.6\"" -DPACKAGE_BUGREPORT=\"jool@nic.mx\" -DPACKAGE_URL=\"\" -DPACKAGE=\"jool\" -DVERSION=\"4.1.6\" -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_ARPA_INET_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1 -DHAVE_INET_NTOA=1 -DHAVE_MEMSET=1 -DHAVE_STRCASECMP=1 -DHAVE_STRTOL=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -Wall -pedantic -std=gnu11 -I../../../src -I/mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/usr/include/libnl3 -DXTABLES_DISABLED -MT wargp/libjoolargp_la-joold.lo -MD -MP -MF wargp/.deps/libjoolargp_la-joold.Tpo -c wargp/joold.c  -fPIC -DPIC -o wargp/.libs/libjoolargp_la-joold.o

OpenWrt-libtool: compile:  arm-openwrt-linux-muslgnueabi-gcc -DPACKAGE_NAME=\"Jool\" -DPACKAGE_TARNAME=\"jool\" -DPACKAGE_VERSION=\"4.1.6\" "-DPACKAGE_STRING=\"Jool 4.1.6\"" -DPACKAGE_BUGREPORT=\"jool@nic.mx\" -DPACKAGE_URL=\"\" -DPACKAGE=\"jool\" -DVERSION=\"4.1.6\" -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_ARPA_INET_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1 -DHAVE_INET_NTOA=1 -DHAVE_MEMSET=1 -DHAVE_STRCASECMP=1 -DHAVE_STRTOL=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -Wall -pedantic -std=gnu11 -I../../../src -I/mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/usr/include/libnl3 -DXTABLES_DISABLED -MT wargp/libjoolargp_la-joold.lo -MD -MP -MF wargp/.deps/libjoolargp_la-joold.Tpo -c wargp/joold.c -o wargp/libjoolargp_la-joold.o >/dev/null 2>&1

mv -f wargp/.deps/libjoolargp_la-joold.Tpo wargp/.deps/libjoolargp_la-joold.Plo

/bin/bash ../../../libtool  --tag=CC   --mode=compile arm-openwrt-linux-muslgnueabi-gcc -DPACKAGE_NAME=\"Jool\" -DPACKAGE_TARNAME=\"jool\" -DPACKAGE_VERSION=\"4.1.6\" -DPACKAGE_STRING=\"Jool\ 4.1.6\" -DPACKAGE_BUGREPORT=\"jool@nic.mx\" -DPACKAGE_URL=\"\" -DPACKAGE=\"jool\" -DVERSION=\"4.1.6\" -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_ARPA_INET_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1 -DHAVE_INET_NTOA=1 -DHAVE_MEMSET=1 -DHAVE_STRCASECMP=1 -DHAVE_STRTOL=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I.    -Wall -pedantic -std=gnu11 -I../../../src -I/mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/usr/include/libnl3  -DXTABLES_DISABLED  -MT wargp/libjoolargp_la-pool4.lo -MD -MP -MF wargp/.deps/libjoolargp_la-pool4.Tpo -c -o wargp/libjoolargp_la-pool4.lo `test -f 'wargp/pool4.c' || echo './'`wargp/pool4.c

OpenWrt-libtool: compile:  arm-openwrt-linux-muslgnueabi-gcc -DPACKAGE_NAME=\"Jool\" -DPACKAGE_TARNAME=\"jool\" -DPACKAGE_VERSION=\"4.1.6\" "-DPACKAGE_STRING=\"Jool 4.1.6\"" -DPACKAGE_BUGREPORT=\"jool@nic.mx\" -DPACKAGE_URL=\"\" -DPACKAGE=\"jool\" -DVERSION=\"4.1.6\" -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_ARPA_INET_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1 -DHAVE_INET_NTOA=1 -DHAVE_MEMSET=1 -DHAVE_STRCASECMP=1 -DHAVE_STRTOL=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -Wall -pedantic -std=gnu11 -I../../../src -I/mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/usr/include/libnl3 -DXTABLES_DISABLED -MT wargp/libjoolargp_la-pool4.lo -MD -MP -MF wargp/.deps/libjoolargp_la-pool4.Tpo -c wargp/pool4.c  -fPIC -DPIC -o wargp/.libs/libjoolargp_la-pool4.o

OpenWrt-libtool: compile:  arm-openwrt-linux-muslgnueabi-gcc -DPACKAGE_NAME=\"Jool\" -DPACKAGE_TARNAME=\"jool\" -DPACKAGE_VERSION=\"4.1.6\" "-DPACKAGE_STRING=\"Jool 4.1.6\"" -DPACKAGE_BUGREPORT=\"jool@nic.mx\" -DPACKAGE_URL=\"\" -DPACKAGE=\"jool\" -DVERSION=\"4.1.6\" -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_ARPA_INET_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1 -DHAVE_INET_NTOA=1 -DHAVE_MEMSET=1 -DHAVE_STRCASECMP=1 -DHAVE_STRTOL=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -Wall -pedantic -std=gnu11 -I../../../src -I/mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/usr/include/libnl3 -DXTABLES_DISABLED -MT wargp/libjoolargp_la-pool4.lo -MD -MP -MF wargp/.deps/libjoolargp_la-pool4.Tpo -c wargp/pool4.c -o wargp/libjoolargp_la-pool4.o >/dev/null 2>&1

mv -f wargp/.deps/libjoolargp_la-pool4.Tpo wargp/.deps/libjoolargp_la-pool4.Plo

/bin/bash ../../../libtool  --tag=CC   --mode=compile arm-openwrt-linux-muslgnueabi-gcc -DPACKAGE_NAME=\"Jool\" -DPACKAGE_TARNAME=\"jool\" -DPACKAGE_VERSION=\"4.1.6\" -DPACKAGE_STRING=\"Jool\ 4.1.6\" -DPACKAGE_BUGREPORT=\"jool@nic.mx\" -DPACKAGE_URL=\"\" -DPACKAGE=\"jool\" -DVERSION=\"4.1.6\" -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_ARPA_INET_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1 -DHAVE_INET_NTOA=1 -DHAVE_MEMSET=1 -DHAVE_STRCASECMP=1 -DHAVE_STRTOL=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I.    -Wall -pedantic -std=gnu11 -I../../../src -I/mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/usr/include/libnl3  -DXTABLES_DISABLED  -MT wargp/libjoolargp_la-session.lo -MD -MP -MF wargp/.deps/libjoolargp_la-session.Tpo -c -o wargp/libjoolargp_la-session.lo `test -f 'wargp/session.c' || echo './'`wargp/session.c

OpenWrt-libtool: compile:  arm-openwrt-linux-muslgnueabi-gcc -DPACKAGE_NAME=\"Jool\" -DPACKAGE_TARNAME=\"jool\" -DPACKAGE_VERSION=\"4.1.6\" "-DPACKAGE_STRING=\"Jool 4.1.6\"" -DPACKAGE_BUGREPORT=\"jool@nic.mx\" -DPACKAGE_URL=\"\" -DPACKAGE=\"jool\" -DVERSION=\"4.1.6\" -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_ARPA_INET_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1 -DHAVE_INET_NTOA=1 -DHAVE_MEMSET=1 -DHAVE_STRCASECMP=1 -DHAVE_STRTOL=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -Wall -pedantic -std=gnu11 -I../../../src -I/mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/usr/include/libnl3 -DXTABLES_DISABLED -MT wargp/libjoolargp_la-session.lo -MD -MP -MF wargp/.deps/libjoolargp_la-session.Tpo -c wargp/session.c  -fPIC -DPIC -o wargp/.libs/libjoolargp_la-session.o

OpenWrt-libtool: compile:  arm-openwrt-linux-muslgnueabi-gcc -DPACKAGE_NAME=\"Jool\" -DPACKAGE_TARNAME=\"jool\" -DPACKAGE_VERSION=\"4.1.6\" "-DPACKAGE_STRING=\"Jool 4.1.6\"" -DPACKAGE_BUGREPORT=\"jool@nic.mx\" -DPACKAGE_URL=\"\" -DPACKAGE=\"jool\" -DVERSION=\"4.1.6\" -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_ARPA_INET_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1 -DHAVE_INET_NTOA=1 -DHAVE_MEMSET=1 -DHAVE_STRCASECMP=1 -DHAVE_STRTOL=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -Wall -pedantic -std=gnu11 -I../../../src -I/mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/usr/include/libnl3 -DXTABLES_DISABLED -MT wargp/libjoolargp_la-session.lo -MD -MP -MF wargp/.deps/libjoolargp_la-session.Tpo -c wargp/session.c -o wargp/libjoolargp_la-session.o >/dev/null 2>&1

mv -f wargp/.deps/libjoolargp_la-session.Tpo wargp/.deps/libjoolargp_la-session.Plo

/bin/bash ../../../libtool  --tag=CC   --mode=compile arm-openwrt-linux-muslgnueabi-gcc -DPACKAGE_NAME=\"Jool\" -DPACKAGE_TARNAME=\"jool\" -DPACKAGE_VERSION=\"4.1.6\" -DPACKAGE_STRING=\"Jool\ 4.1.6\" -DPACKAGE_BUGREPORT=\"jool@nic.mx\" -DPACKAGE_URL=\"\" -DPACKAGE=\"jool\" -DVERSION=\"4.1.6\" -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_ARPA_INET_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1 -DHAVE_INET_NTOA=1 -DHAVE_MEMSET=1 -DHAVE_STRCASECMP=1 -DHAVE_STRTOL=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I.    -Wall -pedantic -std=gnu11 -I../../../src -I/mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/usr/include/libnl3  -DXTABLES_DISABLED  -MT wargp/libjoolargp_la-stats.lo -MD -MP -MF wargp/.deps/libjoolargp_la-stats.Tpo -c -o wargp/libjoolargp_la-stats.lo `test -f 'wargp/stats.c' || echo './'`wargp/stats.c

OpenWrt-libtool: compile:  arm-openwrt-linux-muslgnueabi-gcc -DPACKAGE_NAME=\"Jool\" -DPACKAGE_TARNAME=\"jool\" -DPACKAGE_VERSION=\"4.1.6\" "-DPACKAGE_STRING=\"Jool 4.1.6\"" -DPACKAGE_BUGREPORT=\"jool@nic.mx\" -DPACKAGE_URL=\"\" -DPACKAGE=\"jool\" -DVERSION=\"4.1.6\" -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_ARPA_INET_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1 -DHAVE_INET_NTOA=1 -DHAVE_MEMSET=1 -DHAVE_STRCASECMP=1 -DHAVE_STRTOL=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -Wall -pedantic -std=gnu11 -I../../../src -I/mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/usr/include/libnl3 -DXTABLES_DISABLED -MT wargp/libjoolargp_la-stats.lo -MD -MP -MF wargp/.deps/libjoolargp_la-stats.Tpo -c wargp/stats.c  -fPIC -DPIC -o wargp/.libs/libjoolargp_la-stats.o

OpenWrt-libtool: compile:  arm-openwrt-linux-muslgnueabi-gcc -DPACKAGE_NAME=\"Jool\" -DPACKAGE_TARNAME=\"jool\" -DPACKAGE_VERSION=\"4.1.6\" "-DPACKAGE_STRING=\"Jool 4.1.6\"" -DPACKAGE_BUGREPORT=\"jool@nic.mx\" -DPACKAGE_URL=\"\" -DPACKAGE=\"jool\" -DVERSION=\"4.1.6\" -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_ARPA_INET_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1 -DHAVE_INET_NTOA=1 -DHAVE_MEMSET=1 -DHAVE_STRCASECMP=1 -DHAVE_STRTOL=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -Wall -pedantic -std=gnu11 -I../../../src -I/mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/usr/include/libnl3 -DXTABLES_DISABLED -MT wargp/libjoolargp_la-stats.lo -MD -MP -MF wargp/.deps/libjoolargp_la-stats.Tpo -c wargp/stats.c -o wargp/libjoolargp_la-stats.o >/dev/null 2>&1

mv -f wargp/.deps/libjoolargp_la-stats.Tpo wargp/.deps/libjoolargp_la-stats.Plo

/bin/bash ../../../libtool  --tag=CC   --mode=link arm-openwrt-linux-muslgnueabi-gcc -Wall -pedantic -std=gnu11 -I../../../src -I/mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/usr/include/libnl3  -DXTABLES_DISABLED    -o libjoolargp.la  libjoolargp_la-command.lo libjoolargp_la-dns.lo libjoolargp_la-log.lo libjoolargp_la-main.lo libjoolargp_la-requirements.lo libjoolargp_la-userspace-types.lo libjoolargp_la-wargp.lo libjoolargp_la-xlator_type.lo wargp/libjoolargp_la-address.lo wargp/libjoolargp_la-bib.lo wargp/libjoolargp_la-denylist4.lo wargp/libjoolargp_la-eamt.lo wargp/libjoolargp_la-file.lo wargp/libjoolargp_la-global.lo wargp/libjoolargp_la-instance.lo wargp/libjoolargp_la-joold.lo wargp/libjoolargp_la-pool4.lo wargp/libjoolargp_la-session.lo wargp/libjoolargp_la-stats.lo ../util/libjoolutil.la ../nl/libjoolnl.la -lm 

OpenWrt-libtool: link: (cd .libs/libjoolargp.lax/libjoolutil.a && ar x "/mnt/sdb/ss_mod/build_dir/target-arm_cortex-a9+neon_musl_eabi/linux-mvebu_cortexa9/jool-nftables/jool-2022-01-17-f948dfba/src/usr/argp/../util/.libs/libjoolutil.a")

OpenWrt-libtool: link: (cd .libs/libjoolargp.lax/libjoolnl.a && ar x "/mnt/sdb/ss_mod/build_dir/target-arm_cortex-a9+neon_musl_eabi/linux-mvebu_cortexa9/jool-nftables/jool-2022-01-17-f948dfba/src/usr/argp/../nl/.libs/libjoolnl.a")

copying selected object files to avoid basename conflicts...

OpenWrt-libtool: link: ln .libs/libjoolargp.lax/libjoolnl.a/libjoolutil_la-cJSON.o .libs/libjoolargp.lax/lt1-libjoolutil_la-cJSON.o || cp .libs/libjoolargp.lax/libjoolnl.a/libjoolutil_la-cJSON.o .libs/libjoolargp.lax/lt1-libjoolutil_la-cJSON.o

OpenWrt-libtool: link: ln .libs/libjoolargp.lax/libjoolnl.a/libjoolutil_la-file.o .libs/libjoolargp.lax/lt2-libjoolutil_la-file.o || cp .libs/libjoolargp.lax/libjoolnl.a/libjoolutil_la-file.o .libs/libjoolargp.lax/lt2-libjoolutil_la-file.o

OpenWrt-libtool: link: ln .libs/libjoolargp.lax/libjoolnl.a/libjoolutil_la-result.o .libs/libjoolargp.lax/lt3-libjoolutil_la-result.o || cp .libs/libjoolargp.lax/libjoolnl.a/libjoolutil_la-result.o .libs/libjoolargp.lax/lt3-libjoolutil_la-result.o

OpenWrt-libtool: link: ln .libs/libjoolargp.lax/libjoolnl.a/libjoolutil_la-str_utils.o .libs/libjoolargp.lax/lt4-libjoolutil_la-str_utils.o || cp .libs/libjoolargp.lax/libjoolnl.a/libjoolutil_la-str_utils.o .libs/libjoolargp.lax/lt4-libjoolutil_la-str_utils.o

OpenWrt-libtool: link: ar cru .libs/libjoolargp.a .libs/libjoolargp_la-command.o .libs/libjoolargp_la-dns.o .libs/libjoolargp_la-log.o .libs/libjoolargp_la-main.o .libs/libjoolargp_la-requirements.o .libs/libjoolargp_la-userspace-types.o .libs/libjoolargp_la-wargp.o .libs/libjoolargp_la-xlator_type.o wargp/.libs/libjoolargp_la-address.o wargp/.libs/libjoolargp_la-bib.o wargp/.libs/libjoolargp_la-denylist4.o wargp/.libs/libjoolargp_la-eamt.o wargp/.libs/libjoolargp_la-file.o wargp/.libs/libjoolargp_la-global.o wargp/.libs/libjoolargp_la-instance.o wargp/.libs/libjoolargp_la-joold.o wargp/.libs/libjoolargp_la-pool4.o wargp/.libs/libjoolargp_la-session.o wargp/.libs/libjoolargp_la-stats.o .libs/libjoolargp.lax/libjoolutil.a/libjoolutil_la-cJSON.o .libs/libjoolargp.lax/libjoolutil.a/libjoolutil_la-file.o .libs/libjoolargp.lax/libjoolutil.a/libjoolutil_la-result.o .libs/libjoolargp.lax/libjoolutil.a/libjoolutil_la-str_utils.o .libs/libjoolargp.lax/libjoolnl.a/libjoolnl_la-address.o .libs/libjoolargp.lax/libjoolnl.a/libjoolnl_la-attribute.o .libs/libjoolargp.lax/libjoolnl.a/libjoolnl_la-bib.o .libs/libjoolargp.lax/libjoolnl.a/libjoolnl_la-common.o .libs/libjoolargp.lax/libjoolnl.a/libjoolnl_la-core.o .libs/libjoolargp.lax/libjoolnl.a/libjoolnl_la-denylist4.o .libs/libjoolargp.lax/libjoolnl.a/libjoolnl_la-eamt.o .libs/libjoolargp.lax/libjoolnl.a/libjoolnl_la-file.o .libs/libjoolargp.lax/libjoolnl.a/libjoolnl_la-global.o .libs/libjoolargp.lax/libjoolnl.a/libjoolnl_la-instance.o .libs/libjoolargp.lax/libjoolnl.a/libjoolnl_la-joold.o .libs/libjoolargp.lax/libjoolnl.a/libjoolnl_la-json.o .libs/libjoolargp.lax/libjoolnl.a/libjoolnl_la-pool4.o .libs/libjoolargp.lax/libjoolnl.a/libjoolnl_la-session.o .libs/libjoolargp.lax/libjoolnl.a/libjoolnl_la-stats.o .libs/libjoolargp.lax/libjoolnl.a/libjoolnl_la-wrapper-config.o .libs/libjoolargp.lax/libjoolnl.a/libjoolnl_la-wrapper-global.o .libs/libjoolargp.lax/libjoolnl.a/libjoolnl_la-wrapper-types.o .libs/libjoolargp.lax/lt1-libjoolutil_la-cJSON.o .libs/libjoolargp.lax/lt2-libjoolutil_la-file.o .libs/libjoolargp.lax/lt3-libjoolutil_la-result.o .libs/libjoolargp.lax/lt4-libjoolutil_la-str_utils.o

ar: `u' modifier ignored since `D' is the default (see `U')

OpenWrt-libtool: link: ranlib .libs/libjoolargp.a

OpenWrt-libtool: link: rm -fr .libs/libjoolargp.lax .libs/libjoolargp.lax

OpenWrt-libtool: link: ( cd ".libs" && rm -f "libjoolargp.la" && ln -s "../libjoolargp.la" "libjoolargp.la" )

make[5]: Leaving directory '/mnt/sdb/ss_mod/build_dir/target-arm_cortex-a9+neon_musl_eabi/linux-mvebu_cortexa9/jool-nftables/jool-2022-01-17-f948dfba/src/usr/argp'

Making all in siit

make[5]: Entering directory '/mnt/sdb/ss_mod/build_dir/target-arm_cortex-a9+neon_musl_eabi/linux-mvebu_cortexa9/jool-nftables/jool-2022-01-17-f948dfba/src/usr/siit'

arm-openwrt-linux-muslgnueabi-gcc -DPACKAGE_NAME=\"Jool\" -DPACKAGE_TARNAME=\"jool\" -DPACKAGE_VERSION=\"4.1.6\" -DPACKAGE_STRING=\"Jool\ 4.1.6\" -DPACKAGE_BUGREPORT=\"jool@nic.mx\" -DPACKAGE_URL=\"\" -DPACKAGE=\"jool\" -DVERSION=\"4.1.6\" -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_ARPA_INET_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1 -DHAVE_INET_NTOA=1 -DHAVE_MEMSET=1 -DHAVE_STRCASECMP=1 -DHAVE_STRTOL=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I.    -Wall -pedantic -std=gnu11 -I../../../src  -MT jool_siit-main-siit.o -MD -MP -MF .deps/jool_siit-main-siit.Tpo -c -o jool_siit-main-siit.o `test -f 'main-siit.c' || echo './'`main-siit.c

mv -f .deps/jool_siit-main-siit.Tpo .deps/jool_siit-main-siit.Po

/bin/bash ../../../libtool  --tag=CC   --mode=link arm-openwrt-linux-muslgnueabi-gcc -Wall -pedantic -std=gnu11 -I../../../src    -o jool_siit jool_siit-main-siit.o ../argp/libjoolargp.la -lm 

OpenWrt-libtool: link: arm-openwrt-linux-muslgnueabi-gcc -Wall -pedantic -std=gnu11 -I../../../src -o jool_siit jool_siit-main-siit.o  ../argp/.libs/libjoolargp.a -L/mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/usr/lib -lnl-genl-3 -lnl-3 -lm

/mnt/sdb/ss_mod/staging_dir/toolchain-arm_cortex-a9+neon_gcc-11.2.0_musl_eabi/lib/gcc/arm-openwrt-linux-muslgnueabi/11.2.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld: ../argp/.libs/libjoolargp.a(libjoolargp_la-wargp.o): in function `wargp_parse':

wargp.c:(.text+0x754): undefined reference to `argp_parse'

collect2: error: ld returned 1 exit status

make[5]: *** [Makefile:433: jool_siit] Error 1

make[5]: Leaving directory '/mnt/sdb/ss_mod/build_dir/target-arm_cortex-a9+neon_musl_eabi/linux-mvebu_cortexa9/jool-nftables/jool-2022-01-17-f948dfba/src/usr/siit'

make[4]: *** [Makefile:357: all-recursive] Error 1

make[4]: Leaving directory '/mnt/sdb/ss_mod/build_dir/target-arm_cortex-a9+neon_musl_eabi/linux-mvebu_cortexa9/jool-nftables/jool-2022-01-17-f948dfba/src/usr'

make[3]: *** [Makefile:425: all-recursive] Error 1

make[3]: Leaving directory '/mnt/sdb/ss_mod/build_dir/target-arm_cortex-a9+neon_musl_eabi/linux-mvebu_cortexa9/jool-nftables/jool-2022-01-17-f948dfba'

make[2]: *** [Makefile:229: /mnt/sdb/ss_mod/build_dir/target-arm_cortex-a9+neon_musl_eabi/linux-mvebu_cortexa9/jool-nftables/jool-2022-01-17-f948dfba/.built] Error 2

make[2]: Leaving directory '/mnt/sdb/ss_mod/feeds/packages/net/jool'

time: package/feeds/packages/jool/nftables/compile#54.48#8.97#77.36

    ERROR: package/feeds/packages/jool failed to build (build variant: nftables).

make[1]: *** [package/Makefile:116: package/feeds/packages/jool/compile] Error 1

make[1]: Leaving directory '/mnt/sdb/ss_mod'

make: *** [/mnt/sdb/ss_mod/include/toplevel.mk:230: package/jool/compile] Error 2
ydahhrk commented 2 years ago

(Note: This issue branched off #273.)

I have came into an issue, where OpenWrt has libtool 2.4.2 and jool is requiring 2.4.6. Is there a requirement for this or can I patch jool to support the 2.4.2 version?

My guess is 2.4.2 should be fine. I used 2.4.6 because it's the one I had.

How come you're only having this problem now? It has always been 2.4.6.

I have patched jool to 4.6.2 and I get the following error:

Did you mean 2.4.2?

Please send me your new Makefile; your output doesn't really tell me anything on its own.

tiagogaspar8 commented 2 years ago

How come you're only having this problem now? It has always been 2.4.6.

Because before, the makefile as compiling from tarball, now I'm trying to compile from the actual github source so we're not bound to a specific release, and for test cases like this one.

Did you mean 2.4.2?

Yes, sorry πŸ˜„

Here's the makefile:

#
# Copyright (C) 2016-2017 Dan Luedtke <mail@danrl.com>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.

include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=jool
PKG_RELEASE:=$(AUTORELEASE)

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/tiagogaspar8/Jool.git
PKG_SOURCE_DATE:=2022-01-17
PKG_SOURCE_VERSION:=f948dfba7ebe2e0399fb29ab64cd701ff2fd478f

PKG_MAINTAINER:=
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=COPYING

PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=!USE_GLIBC:argp-standalone

include $(INCLUDE_DIR)/package.mk

define Build/Prepare
    $(call Build/Prepare/Default)
endef

define Build/Configure
    $(call Build/Configure/Default)
    (cd $(PKG_BUILD_DIR); \
    autoreconf --install; \
    ./configure \
        --with-xtables=no \
    )
endef

define Build/Compile
    $(MAKE) -C "$(LINUX_DIR)" \
        KERNEL_DIR="$(LINUX_DIR)" \
        ARCH="$(LINUX_KARCH)" \
        CROSS_COMPILE="$(TARGET_CROSS)" \
        M="$(PKG_BUILD_DIR)/src/mod/common" \
        V="$(V)" \
        CFLAGS_MODULE="$(NOXTABLES)" \
        modules
    $(MAKE) -C "$(LINUX_DIR)" \
        KERNEL_DIR="$(LINUX_DIR)" \
        ARCH="$(LINUX_KARCH)" \
        CROSS_COMPILE="$(TARGET_CROSS)" \
        M="$(PKG_BUILD_DIR)/src/mod/nat64" \
        V="$(V)" \
        CFLAGS_MODULE="$(NOXTABLES)" \
        modules
    $(MAKE) -C "$(LINUX_DIR)" \
        KERNEL_DIR="$(LINUX_DIR)" \
        ARCH="$(LINUX_KARCH)" \
        CROSS_COMPILE="$(TARGET_CROSS)" \
        M="$(PKG_BUILD_DIR)/src/mod/siit" \
        V="$(V)" \
        CFLAGS_MODULE="$(NOXTABLES)" \
        modules
    $(call Build/Compile/Default)
endef

define Package/jool/Default
  SECTION:=net
  CATEGORY:=Network
  URL:=https://www.jool.mx
  DEPENDS:=+libnl
endef

define Package/jool/Default/description
  Jool is an Open Source SIIT and NAT64 for Linux.
endef

define KernelPackage/jool/Default
  SECTION:=kernel
  CATEGORY:=Kernel modules
  SUBMENU:=Network Support
  TITLE:=Jool kernel module
  DEPENDS:= \
    @IPV6 \
    +kmod-crypto-md5 \
    +kmod-nf-conntrack \
    +kmod-nf-conntrack6
  FILES:= \
    $(PKG_BUILD_DIR)/src/mod/common/jool_common.$(LINUX_KMOD_SUFFIX) \
    $(PKG_BUILD_DIR)/src/mod/nat64/jool.$(LINUX_KMOD_SUFFIX) \
    $(PKG_BUILD_DIR)/src/mod/siit/jool_siit.$(LINUX_KMOD_SUFFIX)
  JOOL_AUTOLOAD:= \
    jool \
    jool_siit
  AUTOLOAD:=$(call AutoLoad,46,jool_common)
  AUTOLOAD:=$(call AutoLoad,48,$(JOOL_AUTOLOAD))
endef

define KernelPackage/jool/Default/description
  $(call Package/jool/Default/description)

  This package provides the kernel module for Jool.
endef

define KernelPackage/jool-iptables
    $(call KernelPackage/jool/Default)
  DEPENDS:= \
        +kmod-nf-ipt
  VARIANT:=iptables
endef

define KernelPackage/jool-iptables/description
  $(call KernelPackage/jool/Default/description)

  This package provides the kernel module for Jool with iptables support.
endef

define KernelPackage/jool-nftables
    $(call KernelPackage/jool/Default)
  DEPENDS:= \
        +kmod-nft-core
  VARIANT:=nftables
endef

define KernelPackage/jool-nftables/description
  $(call KernelPackage/jool/Default/description)

  This package provides the kernel module for Jool with nftables support.
endef

define Package/jool-tools-iptables
  $(call Package/jool/Default)
  TITLE:=Jool userspace control programs (iptables)
  DEPENDS:=+kmod-jool-iptables +libxtables
endef

define Package/jool-tools-iptables/description
  $(call Package/jool/Default/description)

  This package provides the userspace control programs for Jool with iptables support.
endef

define Package/jool-tools-nftables
  $(call Package/jool/Default)
  TITLE:=Jool userspace control programs- (nftables)
  DEPENDS:=+kmod-jool-nftables +libnftnl
endef

define Package/jool-tools-nftables/description
  $(call Package/jool/Default/description)

  This package provides the userspace control programs for Jool with nftables support.
endef

CONFIGURE_ARGS += \
    --disable-shared \
    --without-bash-completion-dir

CONFIGURE_VARS += \
    ac_cv_func_memset=yes \
    ac_cv_func_strcasecmp=yes

JOOL_AUTOLOAD:= \
    jool_common \
    jool \
    jool_siit

ifeq ($(BUILD_VARIANT),iptables)
    CONFIGURE_ARGS += --with-xtables=yes
endif

ifeq ($(BUILD_VARIANT),nftables)
    CONFIGURE_ARGS += --with-xtables=no
    NOXTABLES:=-DXTABLES_DISABLED
endif

define Package/jool-tools/Default
    $(INSTALL_DIR) $(1)/usr/bin/
    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jool      $(1)/usr/bin/
    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/joold     $(1)/usr/bin/
    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jool_siit $(1)/usr/bin/

    $(INSTALL_DIR) $(1)/etc/config
    $(INSTALL_CONF) ./files/jool.config $(1)/etc/config/jool

    $(INSTALL_DIR) $(1)/etc/init.d
    $(INSTALL_BIN) ./files/jool.init $(1)/etc/init.d/jool

    $(INSTALL_DIR) $(1)/etc/jool
    $(INSTALL_DATA) ./files/jool-nat64.conf.json $(1)/etc/jool/jool-nat64.conf.json.default
    $(INSTALL_DATA) ./files/jool-siit.conf.json $(1)/etc/jool/jool-siit.conf.json.default
    $(INSTALL_DATA) ./files/readme.md $(1)/etc/jool/readme.md
endef

define Package/jool-tools-iptables/install
    $(call Package/jool-tools/Default)
    $(INSTALL_DIR) $(1)/usr/lib/iptables
    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/iptables/libxt_JOOL_SIIT.so \
        $(1)/usr/lib/iptables
    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/iptables/libxt_JOOL.so \
        $(1)/usr/lib/iptables
endef

define Package/jool-tools-nftables/install
    $(call Package/jool-tools/Default)
endef

$(eval $(call KernelPackage,jool-iptables))
$(eval $(call KernelPackage,jool-nftables))
$(eval $(call BuildPackage,jool-tools-iptables))
$(eval $(call BuildPackage,jool-tools-nftables))
ydahhrk commented 2 years ago

Because before, the makefile as compiling from tarball, now I'm trying to compile from the actual github source so we're not bound to a specific release, and for test cases like this one.

By the way: If the problem is that you don't have a tarball, you can simply create one by running make dist in the root directory, in a less constrictive environment:

./autogen.sh
./configure
make dist
# You now have a jool-4.1.6.tar.gz in your root directory,
# identical as if I had made it, and based on the current commit.

That way, you might be able to skip Openwrt's libtool.

Here's the makefile:

One thing that strikes me as odd is that you only define one Build/Configure, and it configures with --with-xtables=no.

This configure will probably be fine when you're running Package/jool-tools-nftables/install, but not when running Package/jool-tools-iptables/install. This is because Package/jool-tools-iptables/install attempts to copy the iptables .so files.

--with-xtables=no prevents the .so files from being created, because they belong to iptables, and need the iptables dependency.


Also, I have a pedantic observation: "jool-nftables" and "jool-tools-nftables" are misleading names, because these versions of Jool have nothing to do with nftables.

I suggest you call them "jool-netfilter" and "jool-tools-netfilter".

ydahhrk commented 2 years ago

USE_GLIBC:argp-standalone

Did you tweak this dependency in some way?

The error messages are complaining about argp_parse(), which is an argp function.

tiagogaspar8 commented 2 years ago

By the way: If the problem is that you don't have a tarball, you can simply create one by running make dist in the root directory, in a less constrictive environment

Either way that would be more difficult for testing and for example now that this optional iptables-free variant without a release it would be great if it was compiled from source.

--with-xtables=no prevents the .so files from being created, because they belong to iptables, and need the iptables dependency.

Yeah I know, this is just temporary, as soon as it builds I can start breaking it and testing some stuff. I'm trying to locate where each flag should be added and where to put the "if"'s and variables, etc.

I suggest you call them "jool-netfilter" and "jool-tools-netfilter".

That is indeed a great suggestion, I'll do that.

Did you tweak this dependency in some way?

I did not, I left it as it was, I just tried deleting that but the error is the same... should I change it to something else?

ydahhrk commented 2 years ago

I did not, I left it as it was, I just tried deleting that but the error is the same... should I change it to something else?

Well... argp is such a basic dependency, most distributions don't expect programs to declare it explicitly.

But I remember at some point dealing with one in which this wasn't the case. Maybe it was Openwrt.

I'm mentioning this because the error is clearly telling us that it's not finding the argp dependency. And you don't seem to declare it explicitly:

DEPENDS:=+kmod-jool-nftables +libnftnl

Also, what does the exclamation mark mean here?

PKG_BUILD_DEPENDS:=!USE_GLIBC:argp-standalone

Is it negation? Are you, by any chance, explicitly asking it to exclude argp?

tiagogaspar8 commented 2 years ago

DEPENDS:=+kmod-jool-nftables +libnftnl

These are for the built and compiled package, and from what you're telling me the issue is that it can't find argp while building, correct?

Is it negation? Are you, by any chance, explicitly asking it to exclude argp?

I really have no idea, this seems to make no effect on the build process, I'm trying to compare it with other packages but to no avail, seems I'm out of my depth...

ydahhrk commented 2 years ago

These are for the built and compiled package, and from what you're telling me the issue is that it can't find argp while building, correct?

Yeah. "undefined reference to `XXX'" is the typical error we get during linking, when a function is declared and referenced, but not defined anywhere.

tiagogaspar8 commented 2 years ago

Hi @ydahhrk I was thinking, after I test this and confirm it's working will you do a new a release? If you are I can switch back to the old makefile based on the tarball and for the testing phase do a hack as you suggested. though this will make further improvements harder I believe it's what I CAN do with my knowledge. So what do you think?

ydahhrk commented 2 years ago

Sure.

tiagogaspar8 commented 2 years ago

So, I've been investigating and I have noticed that if to build the tarball I have to do "./configure" this won't allow me to build with xtables disabled, correct?

ydahhrk commented 2 years ago

No. Remember that, once you have the tarball, you have to do another configure inside.

You'd disable xtables then.

On Wed, Jan 19, 2022, 12:38 PM Tiago Gaspar @.***> wrote:

So, I've been investigating and I have noticed that if to build the tarball I have to do "./configure" this won't allow me to build with xtables disabled, correct?

β€” Reply to this email directly, view it on GitHub https://github.com/NICMx/Jool/issues/372#issuecomment-1016757091, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASHNF3IE2QSAYRNHMBGPS3UW4ALRANCNFSM5MF4EJAQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

tiagogaspar8 commented 2 years ago

Then I'm at a loss again, because I pulled the old makefile and just replaced it with the new tarball, created as you explained and added the flag to disable xtables in the kernel modules, yet the pragma (if that is the correct word) you added to mention the disabled xtables doesn't appear, even though I believe I see the flag passed correctly. I'm currently out but when I get home I'll show you the output.

ydahhrk commented 2 years ago

Ok, forget the pragma message. The programs and modules now print the status on startup:

$ jool --version
(Xtables disabled)
4.1.6.1
$ sudo modprobe jool
$ dmesg -t
(Xtables disabled)
NAT64 Jool v4.1.6.1 module inserted.
$ 
$ jool_siit --version
(Xtables disabled)
4.1.6.1
$ sudo modprobe jool_siit
$ dmesg -t
(Xtables disabled)
SIIT Jool v4.1.6.1 module inserted.

Note, if xtables is enabled, it should print

(Xtables enabled)

If you don't even get that, maybe you're compiling the wrong branch.

tiagogaspar8 commented 2 years ago

Hey @ydahhrk

Sorry for the long delay in answering. I've managed to do it, but I ended up adding only the netfilter one since openwrt will drop iptables soon. Could you take a look and see what you think? https://github.com/tiagogaspar8/packages/tree/jool-netfilter

Thanks for everything!

ydahhrk commented 2 years ago

Please hang on for a few days; I have covid.

tiagogaspar8 commented 2 years ago

The pull request has been merged, here it is: https://github.com/openwrt/packages/commit/28ac3a6997524d9642c9707b389b626b76b09c1d

But first, I hope you get well soon! Focus on getting better! πŸ˜„

tiagogaspar8 commented 2 years ago

Hi, I know you're not available but it'll stay here for when you get back. I have been successfully running nftables + jool-netlink, but one thing I notice is that conntrack has no idea of the connection state when going trough jool. Shouldn't jool use conntrack to keep the connection state?

Thanks and I hope you're getting better!

ydahhrk commented 2 years ago

Could you take a look and see what you think?

Why did you change your sample configuration files?

https://github.com/tiagogaspar8/packages/commit/b24864f66c86b1442eb4c51702bb2bb9999469a9#diff-aefea90b17c49972efc7def1206a531e27630d4fb770eea208a5c4c5fe07a97f https://github.com/tiagogaspar8/packages/commit/b24864f66c86b1442eb4c51702bb2bb9999469a9#diff-5140877da19007f4b688eadd118f07aaf531dce60433f4eefad009c0538d31fc

Their suggested configuration now sucks.

I have been successfully running nftables + jool-netlink, but one thing I notice is that conntrack has no idea of the connection state when going trough jool. Shouldn't jool use conntrack to keep the connection state?

Yes, that would be the smart thing to do. But conntrack is nftables. Jool has nothing to do with nftables at present. Ergo, Jool has nothing to do with conntrack.

Jool's connection tracking gimmic is BIB and session.

tiagogaspar8 commented 2 years ago

Their suggested configuration now sucks.

I actually got them from the atomic configuration examples in jool.mx websiteπŸ˜…

Jool has nothing to do with nftables at present. Ergo, Jool has nothing to do with conntrack.

I see, that makes sense, but before, in OpenWrt with the ip6tables firewall, I used jool netfilter too and I seem to recall conntrack had the states of connection, at least in bwmon I could see ipv4 Vs ipv6 traffic counting, does this make sense or is my memory bad?

Also, on a sidenote, nf-conntrack is independent of iptables or nftables, it is a module common to both, I recently even merged a commit making conntrack independent from iptables. Is this correct? Or am I missing something?

Hope you're better 😁

ydahhrk commented 2 years ago

Jool 4.1.7 is released now; closing.

I see, that makes sense, but before, in OpenWrt with the ip6tables firewall, I used jool netfilter too and I seem to recall conntrack had the states of connection, at least in bwmon I could see ipv4 Vs ipv6 traffic counting, does this make sense or is my memory bad?

I'm guessing you were measuring something else. Jool hasn't interfaced with conntrack since very early development (more than a decade ago).

Also, on a sidenote, nf-conntrack is independent of iptables or nftables, it is a module common to both, I recently even merged a commit making conntrack independent from iptables. Is this correct? Or am I missing something?

I guess.

tiagogaspar8 commented 2 years ago

I'm guessing you were measuring something else. Jool hasn't interfaced with conntrack since very early development (more than a decade ago).

Oh wow, weird

Should I revert the config file examples?

ydahhrk commented 2 years ago

Sorry for taking so long to respond.

I'm going to upload better and updated configuration examples to the documentation over the course of the day. If you want, you can copy that.

ydahhrk commented 2 years ago

Updated: https://www.jool.mx/en/config-atomic.html. You might need to press F5 to flush the cache.

In my opinion, the examples are better now. Most of the globals now include their default values, so it's harder to end up with a misbehaving translator.

tiagogaspar8 commented 2 years ago

Hi, I hope you're better! I have submited the changes to the openwrt feed, thanks for the help!