OpenWrt Forum Archive

Topic: Compile problem for arping, version of Thomas Habets

The content of this topic has been archived on 18 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello, I currently compile openwrt 15.05 on ubuntu 16.04. And i am going to build the arping into the image (since i want to lookup ip from mac address). At first of my compile it shows error says i don't have libnet 1.1.x (detail as below).

...
configure: error: libnet 1.1.x not found
Makefile:51: recipe for target '/home/chungyi/codeBase/wirelessap_station/build_dir/target-x86_64_uClibc-0.9.33.2/arping-2.17/.configured_yyynynnnn' failed
make[3]: *** [/home/chungyi/codeBase/wirelessap_station/build_dir/target-x86_64_uClibc-0.9.33.2/arping-2.17/.configured_yyynynnnn] Error 1
make[3]: Leaving directory '/home/chungyi/codeBase/wirelessap_station/feeds/packages/net/arping'
package/Makefile:191: recipe for target 'package/feeds/packages/arping/compile' failed
make[2]: *** [package/feeds/packages/arping/compile] Error 2
make[2]: Leaving directory '/home/chungyi/codeBase/wirelessap_station'
package/Makefile:188: recipe for target '/home/chungyi/codeBase/wirelessap_station/staging_dir/target-x86_64_uClibc-0.9.33.2/stamp/.package_compile' failed
make[1]: *** [/home/chungyi/codeBase/wirelessap_station/staging_dir/target-x86_64_uClibc-0.9.33.2/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/chungyi/codeBase/wirelessap_station'
/home/chungyi/codeBase/wirelessap_station/include/toplevel.mk:181: recipe for target 'world' failed
make: *** [world] Error 2

Then i googled and found the old libnet version from here:

 dev.openwrt.org/browser/packages/libs/libnet-1.1.x?rev=5448

And build successfully, so i compile the openwrt with arping again. But i still get error as first time. Could anyone help me what i am wrong.

My arping package's Makefile as below

include $(TOPDIR)/rules.mk

PKG_NAME:=arping
PKG_VERSION:=2.17
PKG_RELEASE:=12
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Thomas Habets <thomas@habets.se>

PKG_SOURCE_URL:=w.habets.pp.se/synscan/files/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz

include $(INCLUDE_DIR)/package.mk
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)

define Package/arping
  SECTION:=net
  CATEGORY:=Network
  TITLE:=ARPing
  DEPENDS:=+libnet                                                                                                                                                                                                                           
  URL:=w.habets.pp.se/synscan/files
  PKG_MAINTAINER:=Thomas Habets <thomas@habets.se>
endef

define Package/arping/description
    ARP scanner Thomas Habets version, which can find IP by MAC address.
endef

CONFIGURE_ARGS += \
        --enable-static \
        --enable-shared

define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
            DESTDIR="$(PKG_INSTALL_DIR)"
endef

define Package/arping/install
    $(INSTALL_DIR) $(1)/usr/bin
    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/arping $(1)/usr/bin/
endef

$(eval $(call BuildPackage,arping))

dev.openwrt.org/browser/packages/libs/libnet-1.1.x?rev=5448 
this makefile install lib & head file in wrong path

define Build/InstallDev
            mkdir -p $(STAGING_DIR)/usr/lib/libnet-1.1.x/bin
            $(CP) $(PKG_INSTALL_DIR)/usr/bin/libnet-config $(STAGING_DIR)/usr/lib/libnet-1.1.x/bin/
            mkdir -p $(STAGING_DIR)/usr/lib/libnet-1.1.x/include
            $(CP) $(PKG_INSTALL_DIR)/usr/include/libnet* $(STAGING_DIR)/usr/lib/libnet-1.1.x/include/
            mkdir -p $(STAGING_DIR)/usr/lib/libnet-1.1.x/lib
            $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.{a,so*} $(STAGING_DIR)/usr/lib/libnet-1.1.x/lib/
    endef

should be:

define Build/InstallDev
        $(INSTALL_DIR) $(STAGING_DIR)/usr/include
        $(CP) $(PKG_INSTALL_DIR)/usr/include/libnet* $(STAGING_DIR)/usr/include
        $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.{a,la,so*} $(STAGING_DIR)/usr/lib/
endef

The discussion might have continued from here.