Hi all,
I am building a simple package for my openwrt instance running on a small pc, however currently i am stuck with missing library file problem:
libc.so.6
Using attitude adjustment sdk from: http://downloads.openwrt.org/attitude_a … 6/generic/
My linux environment: Linux qq-VirtualBox 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:41:14 UTC 2012 i686 i686 i386 GNU/Linux
This is what i did to get the problem:
Download the sdk, extracted and place my package folder under /buildroot/package, create a makefile as instructed:
================================Makefile============================================
include $(TOPDIR)/rules.mk
PKG_NAME:memwatch
PKG_VERSION:=1.0.0
PKG_RELASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/memwatch
SECTION:=utils
CATEGORY:=Utilities
TITLE:=MemoryWatcher
endef
define Package/$(PKG_NAME)/description
this is a memory watch utility
endef
define Build/Prepare
@echo -----------------------------------running build/prepare...
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
define Package/memwatch/install
@echo
@echo -----------------------------------running Package/memwatch/install ...
$(INSTALL_DIR) $(1)/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/memwatch $(1)/bin/
@echo
@echo -----------------------------------installation finished
@echo
endef
$(eval $(call BuildPackage,memwatch))
====================================end Makefile===========================================
got the following error during make V=s:
========================================make V=s========================================================
tmp/.config-package.in:11:warning: 'select' used by config symbol 'PACKAGE_memwatch' refer to undefined symbol 'PACKAGE_libc'
tmp/.config-package.in:12:warning: 'select' used by config symbol 'PACKAGE_memwatch' refer to undefined symbol 'PACKAGE_librt'
tmp/.config-package.in:13:warning: 'select' used by config symbol 'PACKAGE_memwatch' refer to undefined symbol 'PACKAGE_libpthread'
#
# using defaults found in .config
#
*** End of OpenWrt configuration.
*** Execute 'make' to build the OpenWrt or try 'make help'.
make[1]: Entering directory `/home/qq/Downloads/OpenWrt-SDK-x86-for-linux-i486-gcc-4.6-linaro_uClibc-0.9.33.2'
make[2]: Entering directory `/home/qq/Downloads/OpenWrt-SDK-x86-for-linux-i486-gcc-4.6-linaro_uClibc-0.9.33.2'
make[3]: Entering directory `/home/qq/Downloads/OpenWrt-SDK-x86-for-linux-i486-gcc-4.6-linaro_uClibc-0.9.33.2/package/memwatch'
mkdir -p /home/qq/Downloads/OpenWrt-SDK-x86-for-linux-i486-gcc-4.6-linaro_uClibc-0.9.33.2/bin//packages /home/qq/Downloads/OpenWrt-SDK-x86-for-linux-i486-gcc-4.6-linaro_uClibc-0.9.33.2/build_dir/target-_-/-1.0.0/ipkg-/memwatch/CONTROL /home/qq/Downloads/OpenWrt-SDK-x86-for-linux-i486-gcc-4.6-linaro_uClibc-0.9.33.2/staging_dir/target-_-/pkginfo
-----------------------------------running Package/memwatch/install ...
install -d -m0755 /home/qq/Downloads/OpenWrt-SDK-x86-for-linux-i486-gcc-4.6-linaro_uClibc-0.9.33.2/build_dir/target-_-/-1.0.0/ipkg-/memwatch/bin
install -m0755 /home/qq/Downloads/OpenWrt-SDK-x86-for-linux-i486-gcc-4.6-linaro_uClibc-0.9.33.2/build_dir/target-_-/-1.0.0/memwatch /home/qq/Downloads/OpenWrt-SDK-x86-for-linux-i486-gcc-4.6-linaro_uClibc-0.9.33.2/build_dir/target-_-/-1.0.0/ipkg-/memwatch/bin/
-----------------------------------installation finished
find /home/qq/Downloads/OpenWrt-SDK-x86-for-linux-i486-gcc-4.6-linaro_uClibc-0.9.33.2/build_dir/target-_-/-1.0.0/ipkg-/memwatch -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf
Package memwatch is missing dependencies for the following libraries:
libc.so.6
libstdc++.so.6
make[3]: *** [/home/qq/Downloads/OpenWrt-SDK-x86-for-linux-i486-gcc-4.6-linaro_uClibc-0.9.33.2/bin//packages/memwatch_1.0.0_.ipk] Error 1
make[3]: Leaving directory `/home/qq/Downloads/OpenWrt-SDK-x86-for-linux-i486-gcc-4.6-linaro_uClibc-0.9.33.2/package/memwatch'
make[2]: *** [package/memwatch/compile] Error 2
make[2]: Leaving directory `/home/qq/Downloads/OpenWrt-SDK-x86-for-linux-i486-gcc-4.6-linaro_uClibc-0.9.33.2'
make[1]: *** [/home/qq/Downloads/OpenWrt-SDK-x86-for-linux-i486-gcc-4.6-linaro_uClibc-0.9.33.2/staging_dir/target-_-/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/qq/Downloads/OpenWrt-SDK-x86-for-linux-i486-gcc-4.6-linaro_uClibc-0.9.33.2'
make: *** [world] Error 2
============================================end make V=s====================================================
Make is complaining about missing library so files, which I belive creating symlinks could possibly resolve the problem, but I want to know for sure where in the makefile is actually stating where to look for these so files...
I managed to trace to the following under buildroot/include/package-defaults.mk, which has these dependency defined:
PKG_DEFAULT_DEPENDS = +libc +USE_EGLIBC:librt +USE_EGLIBC:libpthread
however I am not sure whether this line is of any relation with the missing libc.so.6 file?
how does the makefile converts these dependency lines into the actual filenames?
please help