DHCP 'ebtables-dhcpsnooping' make error

Hi, I'm trying to add 'ebtables-dhcpsnooping' package into OpenWrt code. But I'm receiving the ERROR "configure: error: missing 'libnet.h', please install libnet package". Could you please support me to add 'ebtables-dhcpsnooping' package into my OpenWrt code. Thanks.

@michael-dev @skids @jpereira @aboaboit @anon45274024 @gareth41 @jow

checking how to run the C preprocessor... arm-openwrt-linux-uclibcgnueabi-gcc -E
checking for grep that handles long lines and -e... /home/wlc/dhcp_snooping/sercom_data_2/ipq4019-ilq-6-1-1-1_qca_oem.git/qsdk/staging_dir/host/bin/grep
checking for egrep... /home/wlc/dhcp_snooping/sercom_data_2/ipq4019-ilq-6-1-1-1_qca_oem.git/qsdk/staging_dir/host/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking libnet.h usability... no
checking libnet.h presence... no
checking for libnet.h... no
configure: error: missing 'libnet.h', please install libnet package
Makefile:40: recipe for target '/home/wlc/dhcp_snooping/sercom_data_2/ipq4019-ilq-6-1-1-1_qca_oem.git/qsdk/build_dir/target-arm_cortex-a7_uClibc-1.0.14_eabi/ebtables-dhcpsnooping-master/.configured_yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy' failed
make[3]: *** [/home/wlc/dhcp_snooping/sercom_data_2/ipq4019-ilq-6-1-1-1_qca_oem.git/qsdk/build_dir/target-arm_cortex-a7_uClibc-1.0.14_eabi/ebtables-dhcpsnooping-master/.configured_yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy] Error 1
make[3]: Leaving directory '/home/wlc/dhcp_snooping/sercom_data_2/ipq4019-ilq-6-1-1-1_qca_oem.git/qsdk/package/network/utils/ebtables-dhcpsnooping'
package/Makefile:191: recipe for target 'package/feeds/packages/ebtables-dhcpsnooping/compile' failed
make[2]: *** [package/feeds/packages/ebtables-dhcpsnooping/compile] Error 2
make[2]: Leaving directory '/home/wlc/dhcp_snooping/sercom_data_2/ipq4019-ilq-6-1-1-1_qca_oem.git/qsdk'
package/Makefile:188: recipe for target '/home/wlc/dhcp_snooping/sercom_data_2/ipq4019-ilq-6-1-1-1_qca_oem.git/qsdk/staging_dir/target-arm_cortex-a7_uClibc-1.0.14_eabi/stamp/.package_compile' failed
make[1]: *** [/home/wlc/dhcp_snooping/sercom_data_2/ipq4019-ilq-6-1-1-1_qca_oem.git/qsdk/staging_dir/target-arm_cortex-a7_uClibc-1.0.14_eabi/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/wlc/dhcp_snooping/sercom_data_2/ipq4019-ilq-6-1-1-1_qca_oem.git/qsdk'
/home/wlc/dhcp_snooping/sercom_data_2/ipq4019-ilq-6-1-1-1_qca_oem.git/qsdk/include/toplevel.mk:186: recipe for target 'world' failed
make: *** [world] Error 2

Here is my "Makefile"

include $(TOPDIR)/rules.mk

PKG_NAME:=ebtables-dhcpsnooping
PKG_VERSION:=master
PKG_RELEASE:=3

PKG_SOURCE_PROTO:=git
PKG_BUILD_DIR:=$(BUILD_DIR)/ebtables-dhcpsnooping-$(PKG_VERSION)
PKG_SOURCE_URL:=https://github.com/michael-dev/ebtables-dhcpsnooping.git
PKG_SOURCE_DATE:=2019-08-17
PKG_SOURCE_VERSION:=480603c0f098df6277bf3f2e6ed304c3aa55cb04
PKG_MAINTAINER:=Michael Braun <michael-dev@fami-braun.de>

#PKG_MIRROR_HASH:=skip
PKG_FIXUP:=autoreconf
#make package/network/services/ebtables-dhcpsnoopingd/download V=s
#make package/network/services/ebtables-dhcpsnoopingd/check FIXUP=1 V=s

include $(INCLUDE_DIR)/package.mk

define Package/ebtables-dhcpsnooping
        SECTION:=net
        CATEGORY:=Network
        SUBMENU:=Firewall
        DEPENDS:=+ebtables +libnet-1.2.x
        TITLE:=DHCP snooping daemon using nflog and ebtables.
        URL:=https://github.com/michael-dev/
endef

define Package/ebtables-snooping/description
        DHCP snooping daemon using nflog and ebtables.
endef

define Package/ebtables-dhcpsnooping/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
endef

$(eval $(call BuildPackage,ebtables-dhcpsnooping))

I'm not familiar with the build process, sorry.

1 Like