Issue with libtool while building a package

Hi!

I have no idea of what I'm doing wrong... I want to make the jool package build from source but it gives me an error with libtool
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/NICMx/Jool.git
PKG_SOURCE_DATE:=2022-01-17
PKG_SOURCE_VERSION:=81d6ad1d57236d458d6ce41ed4f970ea42ac89fb

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

PKG_LIBTOOL_PATHS:=.
PKG_FIXUP:=libtool
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=!USE_GLIBC:argp-standalone


include $(INCLUDE_DIR)/package.mk

define Build/Configure
	(cd $(PKG_BUILD_DIR); ./autogen.sh );
	$(call Build/Configure/Default)
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 \
	--with-libtool

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))

Output:

ubnt@ubnt:/mnt/sdb/ss_mod$ make package/jool/compile V=sc

Collecting package info: done

WARNING: Makefile 'package/kernel/mac80211/Makefile' has a dependency on 'kmod-qcom-qmi-helpers', which does not exist

WARNING: Makefile 'package/kernel/mac80211/Makefile' has a dependency on 'kmod-qrtr-smd', which does not exist

WARNING: Makefile 'package/kernel/mac80211/Makefile' has a dependency on 'kmod-qrtr-mhi', which does not exist

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

make[2]: Entering directory '/mnt/sdb/ss_mod/package/libs/toolchain'

echo "libc" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/toolchain.default.install

echo "libgcc" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/toolchain.default.install

echo "libpthread" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/toolchain.default.install

echo "librt" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/toolchain.default.install

make[2]: Leaving directory '/mnt/sdb/ss_mod/package/libs/toolchain'

time: package/libs/toolchain/compile#0.13#0.06#0.18

make[2]: Entering directory '/mnt/sdb/ss_mod/package/firmware/linux-firmware'

echo "mwifiex-sdio-firmware" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux-firmware.default.install

make[2]: Leaving directory '/mnt/sdb/ss_mod/package/firmware/linux-firmware'

time: package/firmware/linux-firmware/compile#0.96#0.13#1.07

make[2]: Entering directory '/mnt/sdb/ss_mod/package/firmware/prism54-firmware'

make[2]: Nothing to be done for 'compile'.

make[2]: Leaving directory '/mnt/sdb/ss_mod/package/firmware/prism54-firmware'

time: package/firmware/prism54-firmware/compile#0.32#0.04#0.35

make[2]: Entering directory '/mnt/sdb/ss_mod/package/kernel/gpio-button-hotplug'

echo "kmod-gpio-button-hotplug" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/gpio-button-hotplug.default.install

make[2]: Leaving directory '/mnt/sdb/ss_mod/package/kernel/gpio-button-hotplug'

time: package/kernel/gpio-button-hotplug/compile#0.17#0.05#0.21

make[2]: Entering directory '/mnt/sdb/ss_mod/package/kernel/linux'

echo "kernel" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-crypto-aead" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-crypto-ccm" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-crypto-cmac" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-crypto-crc32c" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-crypto-ctr" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-crypto-ecb" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-crypto-ecdh" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-crypto-gcm" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-crypto-gf128" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-crypto-ghash" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-crypto-hash" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-crypto-hmac" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-crypto-kpp" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-crypto-manager" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-crypto-md5" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-crypto-null" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-crypto-rng" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-crypto-seqiv" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-crypto-sha256" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-hid" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-input-core" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-input-evdev" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-lib-crc16" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-lib-crc32c" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-ifb" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-nf-reject" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-nf-reject6" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-nf-ipt" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-nf-ipt6" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-ipt-core" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-nf-conntrack" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-nf-conntrack6" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-nf-nat" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-nf-flow" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-ipt-conntrack" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-ipt-conntrack-extra" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-ipt-offload" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-ipt-ipopt" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-ipt-nat" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-ipt-raw" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-ip6tables" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-nfnetlink" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-nf-conntrack-netlink" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

WARNING: kmod-nft-core is not available in the kernel config - generating empty package

echo "kmod-nft-core" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-bonding" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-sched-core" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-sched-cake" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-tcp-bbr" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-sctp" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-nls-base" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-bluetooth" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-btmrvl" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-mmc" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-regmap-core" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

echo "kmod-usb-core" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/linux.default.install

make[2]: Leaving directory '/mnt/sdb/ss_mod/package/kernel/linux'

time: package/kernel/linux/compile#1.74#0.12#1.87

make[2]: Entering directory '/mnt/sdb/ss_mod/package/libs/libiconv'

make[2]: Leaving directory '/mnt/sdb/ss_mod/package/libs/libiconv'

time: package/libs/libiconv/compile#0.35#0.05#0.38

make[2]: Entering directory '/mnt/sdb/ss_mod/package/libs/libmnl'

echo "libmnl" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/libmnl.default.install

make[2]: Leaving directory '/mnt/sdb/ss_mod/package/libs/libmnl'

time: package/libs/libmnl/compile#0.27#0.06#0.32

make[2]: Entering directory '/mnt/sdb/ss_mod/package/libs/libnftnl'

echo "libnftnl" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/libnftnl.default.install

make[2]: Leaving directory '/mnt/sdb/ss_mod/package/libs/libnftnl'

time: package/libs/libnftnl/compile#0.18#0.07#0.24

make[2]: Entering directory '/mnt/sdb/ss_mod/package/libs/libtool'

echo "libltdl" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/libtool.default.install

make[2]: Leaving directory '/mnt/sdb/ss_mod/package/libs/libtool'

time: package/libs/libtool/compile#0.28#0.03#0.29

make[2]: Entering directory '/mnt/sdb/ss_mod/package/network/utils/iptables'

echo "libxtables" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/iptables.default.install

echo "libip4tc" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/iptables.default.install

echo "libip6tc" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/iptables.default.install

echo "iptables" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/iptables.default.install

echo "iptables-mod-conntrack-extra" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/iptables.default.install

echo "iptables-mod-ipopt" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/iptables.default.install

echo "ip6tables" >> /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/pkginfo/iptables.default.install

make[2]: Leaving directory '/mnt/sdb/ss_mod/package/network/utils/iptables'

time: package/network/utils/iptables/compile#0.20#0.06#0.25

make[2]: Entering directory '/mnt/sdb/ss_mod/package/libs/argp-standalone'

make[2]: Leaving directory '/mnt/sdb/ss_mod/package/libs/argp-standalone'

time: package/libs/argp-standalone/compile#0.19#0.05#0.23

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

mkdir -p /mnt/sdb/ss_mod/dl

SHELL= flock /mnt/sdb/ss_mod/tmp/.jool-2022-01-17-81d6ad1d.tar.xz.flock -c '  	 /mnt/sdb/ss_mod/scripts/dl_github_archive.py --dl-dir="/mnt/sdb/ss_mod/dl" --url="https://github.com/NICMx/Jool.git" --version="81d6ad1d57236d458d6ce41ed4f970ea42ac89fb" --subdir="jool-2022-01-17-81d6ad1d" --source="jool-2022-01-17-81d6ad1d.tar.xz" --hash="x" || ( 	echo "Checking out files from the git repository..."; mkdir -p /mnt/sdb/ss_mod/tmp/dl && cd /mnt/sdb/ss_mod/tmp/dl && rm -rf jool-2022-01-17-81d6ad1d && [ \! -d jool-2022-01-17-81d6ad1d ] && git clone  https://github.com/NICMx/Jool.git jool-2022-01-17-81d6ad1d && (cd jool-2022-01-17-81d6ad1d && git checkout 81d6ad1d57236d458d6ce41ed4f970ea42ac89fb && git submodule update --init --recursive) && echo "Packing checkout..." && export TAR_TIMESTAMP=`cd jool-2022-01-17-81d6ad1d && git log -1 --format='\''@%ct'\''` && rm -rf jool-2022-01-17-81d6ad1d/.git && 	tar --numeric-owner --owner=0 --group=0 --mode=a-s --sort=name ${TAR_TIMESTAMP:+--mtime="$TAR_TIMESTAMP"} -c jool-2022-01-17-81d6ad1d | 	xz -zc -7e > /mnt/sdb/ss_mod/tmp/dl/jool-2022-01-17-81d6ad1d.tar.xz && mv /mnt/sdb/ss_mod/tmp/dl/jool-2022-01-17-81d6ad1d.tar.xz /mnt/sdb/ss_mod/dl/ && rm -rf jool-2022-01-17-81d6ad1d; );     '

jool-2022-01-17-81d6ad1d.tar.xz: Download from https://github.com/NICMx/Jool.git failed

jool-2022-01-17-81d6ad1d.tar.xz: Requires sha256sum for verification

Checking out files from the git repository...

Cloning into 'jool-2022-01-17-81d6ad1d'...

remote: Enumerating objects: 29842, done.

remote: Counting objects: 100% (572/572), done.

remote: Compressing objects: 100% (415/415), done.

remote: Total 29842 (delta 283), reused 323 (delta 157), pack-reused 29270

Receiving objects: 100% (29842/29842), 13.07 MiB | 7.69 MiB/s, done.

Resolving deltas: 100% (20391/20391), done.

Note: switching to '81d6ad1d57236d458d6ce41ed4f970ea42ac89fb'.



You are in 'detached HEAD' state. You can look around, make experimental

changes and commit them, and you can discard any commits you make in this

state without impacting any branches by switching back to a branch.



If you want to create a new branch to retain commits you create, you may

do so (now or later) by using -c with the switch command. Example:



  git switch -c <new-branch-name>



Or undo this operation with:



  git switch -



Turn off this advice by setting config variable advice.detachedHead to false



HEAD is now at 81d6ad1d Autotools: Add --with-xtables

Packing checkout...

touch /mnt/sdb/ss_mod/build_dir/target-arm_cortex-a9+neon_musl_eabi/linux-mvebu_cortexa9/jool-nftables/jool-2022-01-17-81d6ad1d/.prepared_03d99adfba94d831ffd9fe466a45d240_6664517399ebbbc92a37c5bb081b5c53_check

. /mnt/sdb/ss_mod/include/shell.sh; xzcat /mnt/sdb/ss_mod/dl/jool-2022-01-17-81d6ad1d.tar.xz | tar -C /mnt/sdb/ss_mod/build_dir/target-arm_cortex-a9+neon_musl_eabi/linux-mvebu_cortexa9/jool-nftables/jool-2022-01-17-81d6ad1d/.. -xf -

[ ! -d ./src/ ] || cp -fpR ./src/. /mnt/sdb/ss_mod/build_dir/target-arm_cortex-a9+neon_musl_eabi/linux-mvebu_cortexa9/jool-nftables/jool-2022-01-17-81d6ad1d

touch /mnt/sdb/ss_mod/build_dir/target-arm_cortex-a9+neon_musl_eabi/linux-mvebu_cortexa9/jool-nftables/jool-2022-01-17-81d6ad1d/.prepared_03d99adfba94d831ffd9fe466a45d240_6664517399ebbbc92a37c5bb081b5c53

rm -f /mnt/sdb/ss_mod/build_dir/target-arm_cortex-a9+neon_musl_eabi/linux-mvebu_cortexa9/jool-nftables/jool-2022-01-17-81d6ad1d/.configured_*

rm -f /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/stamp/.jool.nftables_installed

(cd /mnt/sdb/ss_mod/build_dir/target-arm_cortex-a9+neon_musl_eabi/linux-mvebu_cortexa9/jool-nftables/jool-2022-01-17-81d6ad1d; rm -f aclocal.m4; if [ -f ./configure.ac ] || [ -f ./configure.in ]; then [ -d ./autom4te.cache ] && rm -rf autom4te.cache; [ -e ./config.rpath ] || ln -s /mnt/sdb/ss_mod/scripts/config.rpath ./config.rpath; touch NEWS AUTHORS COPYING ABOUT-NLS ChangeLog; AUTOM4TE=/mnt/sdb/ss_mod/staging_dir/host/bin/autom4te AUTOCONF=/mnt/sdb/ss_mod/staging_dir/host/bin/autoconf AUTOMAKE=/mnt/sdb/ss_mod/staging_dir/host/bin/automake ACLOCAL=/mnt/sdb/ss_mod/staging_dir/host/bin/aclocal AUTOHEADER=/mnt/sdb/ss_mod/staging_dir/host/bin/autoheader LIBTOOLIZE=/mnt/sdb/ss_mod/staging_dir/host/bin/libtoolize LIBTOOL=/mnt/sdb/ss_mod/staging_dir/host/bin/libtool M4=/mnt/sdb/ss_mod/staging_dir/host/bin/m4 AUTOPOINT=true LIBTOOLIZE='/mnt/sdb/ss_mod/staging_dir/host/bin/libtoolize --install' /mnt/sdb/ss_mod/staging_dir/host/bin/autoreconf -v -f -i -s -B /mnt/sdb/ss_mod/staging_dir/host/share/aclocal -I /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/host/share/aclocal -I /mnt/sdb/ss_mod/staging_dir/hostpkg/share/aclocal -I /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/usr/share/aclocal -I m4 -I . . || true; fi; );

autoreconf: Entering directory `.'

autoreconf: configure.ac: not using Gettext

autoreconf: running: /mnt/sdb/ss_mod/staging_dir/host/bin/aclocal -I /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/host/share/aclocal -I /mnt/sdb/ss_mod/staging_dir/hostpkg/share/aclocal -I /mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/usr/share/aclocal -I m4 -I . --force -I m4

configure.ac:8: error: Libtool version 2.4.6 or higher is required

/mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/../host/share/aclocal/libtool.m4:48: LT_PREREQ is expanded from...

configure.ac:8: the top level

autom4te: /mnt/sdb/ss_mod/staging_dir/host/bin/m4 failed with exit status: 63

aclocal.real: error: echo failed with exit status: 63

autoreconf: /mnt/sdb/ss_mod/staging_dir/host/bin/aclocal failed with exit status: 63

(cd /mnt/sdb/ss_mod/build_dir/target-arm_cortex-a9+neon_musl_eabi/linux-mvebu_cortexa9/jool-nftables/jool-2022-01-17-81d6ad1d; ./autogen.sh );

configure.ac:8: error: Libtool version 2.4.6 or higher is required

/mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/../host/share/aclocal/libtool.m4:48: LT_PREREQ is expanded from...

configure.ac:8: the top level

autom4te: /mnt/sdb/ss_mod/staging_dir/host/bin/m4 failed with exit status: 63

aclocal.real: error: echo failed with exit status: 63

configure.ac:8: error: Libtool version 2.4.6 or higher is required

/mnt/sdb/ss_mod/staging_dir/target-arm_cortex-a9+neon_musl_eabi/../host/share/aclocal/libtool.m4:48: LT_PREREQ is expanded from...

configure.ac:8: the top level

autom4te: /mnt/sdb/ss_mod/staging_dir/host/bin/m4 failed with exit status: 63

aclocal.real: error: echo failed with exit status: 63

autoreconf: aclocal failed with exit status: 63

make[2]: *** [Makefile:222: /mnt/sdb/ss_mod/build_dir/target-arm_cortex-a9+neon_musl_eabi/linux-mvebu_cortexa9/jool-nftables/jool-2022-01-17-81d6ad1d/.configured_68b329da9893e34099c7d8ad5cb9c940] Error 63

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

time: package/feeds/packages/jool/nftables/compile#8.21#1.18#11.86

    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

I have searched the whole internet to no avail, can someone give me a hand?

Thanks!

Try PKG_FIXUP:=patch-libtool, PKG_FIXUP:=libtool isn't a real thing :slight_smile:

Thank you very much for the help but unfortunately I have tried that and the outcome is the same :slightly_frowning_face:
I was just so desperate I used everything I saw on openwrt's packages repo :sweat_smile:

Well, that was easy once I actually looked at the error :smiley:

configure.ac:8: error: Libtool version 2.4.6 or higher is required

and from ./tools/libtool/Makefile:

PKG_VERSION:=2.4.2

Looks like you've got a versioning conflict.. I don't know if that is something that can/should be ignored or not though.

Wooowwww, I'm so tired I didn't notice the version....

I've asked the package maintainer if this is an issue, or if I can patch the source code.

Thank you very much! I'll keep this thread open if that's ok, I'm new to makefiles and I'd rather use this one instead of creating a new one :grin:

Locally, you can change the PKG_VERSION:=2.4.6 and the PKG_HASH:=skip

Then make tools/libtool/download && make V=sc tools/libtool/check FIXUP=1

This will update your libtool locally.. you can then test at least

Hi,

I tried to update libtool but the patches were all wrong and I decided to try to change the requirement, and it was working until this came around:

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

Any idea?

Upgrading libtool to 2.4.6 has been already officially tried once in September 2021, and caused problems. Reverted...

Much more complicated than just bumping the version. (Bumping libtool affects pretty much every package built).

The current bump proposal (two commits) can be found from @ldir 's staging repo.

1 Like

I see that, I hope we can get it done as soon as possible.

I have managed to make it build but there are issues with argp not being found/linked. Can anyone give me a hand?
This is 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_FIXUP:=autoreconf
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))

Cc @danrl who authored book package