OpenWrt Forum Archive

Topic: Missing dependency for libc.so, libgcc_s.so.1

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

I am trying to compile a hello world package (renamed to adapter), and get the following error:

zy@zy-OptiPlex-745:~/openwrt/OpenWrt-SDK-ar71xx-generic_gcc-5.2.0_musl-1.1.11.Linux-i686$ make V=99
#
# configuration written to .config
#
make[1]: Entering directory `/home/zy/openwrt/OpenWrt-SDK-ar71xx-generic_gcc-5.2.0_musl-1.1.11.Linux-i686'
make[2]: Entering directory `/home/zy/openwrt/OpenWrt-SDK-ar71xx-generic_gcc-5.2.0_musl-1.1.11.Linux-i686'
make[3]: Entering directory `/home/zy/openwrt/OpenWrt-SDK-ar71xx-generic_gcc-5.2.0_musl-1.1.11.Linux-i686/package/adapter'
mkdir -p /home/zy/openwrt/OpenWrt-SDK-ar71xx-generic_gcc-5.2.0_musl-1.1.11.Linux-i686/bin/ar71xx/packages /home/zy/openwrt/OpenWrt-SDK-ar71xx-generic_gcc-5.2.0_musl-1.1.11.Linux-i686/build_dir/target-mips_34kc_musl-1.1.11/adapter/ipkg-ar71xx/adapter/CONTROL /home/zy/openwrt/OpenWrt-SDK-ar71xx-generic_gcc-5.2.0_musl-1.1.11.Linux-i686/staging_dir/target-mips_34kc_musl-1.1.11/pkginfo
install -d -m0755 /home/zy/openwrt/OpenWrt-SDK-ar71xx-generic_gcc-5.2.0_musl-1.1.11.Linux-i686/build_dir/target-mips_34kc_musl-1.1.11/adapter/ipkg-ar71xx/adapter/bin
install -m0755 /home/zy/openwrt/OpenWrt-SDK-ar71xx-generic_gcc-5.2.0_musl-1.1.11.Linux-i686/build_dir/target-mips_34kc_musl-1.1.11/adapter/adapter /home/zy/openwrt/OpenWrt-SDK-ar71xx-generic_gcc-5.2.0_musl-1.1.11.Linux-i686/build_dir/target-mips_34kc_musl-1.1.11/adapter/ipkg-ar71xx/adapter/bin
find /home/zy/openwrt/OpenWrt-SDK-ar71xx-generic_gcc-5.2.0_musl-1.1.11.Linux-i686/build_dir/target-mips_34kc_musl-1.1.11/adapter/ipkg-ar71xx/adapter -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf
Package adapter is missing dependencies for the following libraries:
libc.so
libgcc_s.so.1
make[3]: *** [/home/zy/openwrt/OpenWrt-SDK-ar71xx-generic_gcc-5.2.0_musl-1.1.11.Linux-i686/bin/ar71xx/packages/base/adapter_1_ar71xx.ipk] Error 1
make[3]: Leaving directory `/home/zy/openwrt/OpenWrt-SDK-ar71xx-generic_gcc-5.2.0_musl-1.1.11.Linux-i686/package/adapter'
make[2]: *** [package/adapter/compile] Error 2
make[2]: Leaving directory `/home/zy/openwrt/OpenWrt-SDK-ar71xx-generic_gcc-5.2.0_musl-1.1.11.Linux-i686'
make[1]: *** [/home/zy/openwrt/OpenWrt-SDK-ar71xx-generic_gcc-5.2.0_musl-1.1.11.Linux-i686/staging_dir/target-mips_34kc_musl-1.1.11/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/zy/openwrt/OpenWrt-SDK-ar71xx-generic_gcc-5.2.0_musl-1.1.11.Linux-i686'
make: *** [world] Error 2
zy@zy-OptiPlex-745:~/openwrt/OpenWrt-SDK-ar71xx-generic_gcc-5.2.0_musl-1.1.11.Linux-i686$ 

and my Makefile is:

include $(TOPDIR)/rules.mk
PKG_NAME:=adapter
PKG_RELEASE:=1

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)

include $(INCLUDE_DIR)/package.mk

define Package/adapter
    SECTION:=utils
    CATEGORY:=Utilities
    TITLE:=adapter --prints a dummy message
    DEPENDS:=+libstdcpp +libc
endef

define Build/Prepare
    mkdir -p $(PKG_BUILD_DIR)
    $(CP) ./src/* $(PKG_BUILD_DIR)
endef

define Build/Compile
    $(MAKE) -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS)
endef

define Package/adapter/install
    $(INSTALL_DIR) $(1)/bin
    $(INSTALL_BIN) $(PKG_BUILD_DIR)/adapter $(1)/bin
endef

$(eval $(call BuildPackage,adapter)) 

Would really appreciate it if someone can advise.

(Last edited by fred.chou.nd on 27 Jan 2016, 03:00)

You said you were trying to compile a hello world package, but both your Makefile and buildroot log indicated the package is adapter. Am I missing something?

Forgot to mention that I changed the package name to 'adapter', but the src code and Makefile follow the hello world example.

Your package is not actually getting compiled since it likely has stray precompiled binsries and object files in its src directory. Clean the adapter source djrectory and retry.

I am also seeing this error while trying to compile uclibcxx in OpenWrt-SDK-ar71xx-generic_gcc-5.2.0_musl-1.1.11.Linux-x86_64:

Package uclibcxx is missing dependencies for the following libraries:
libc.so
libgcc_s.so.1

This is after running

make package/uclibc++/{clean,prepare,compile} -j1 V=s

I am trying to compile uclibcxx in order to compile yate, which currently fails in the configure stage with

../mips-openwrt-linux-musl/bin/ld: cannot find -luClibc++

in the config.log. I see that uclibcxx is a dependency of yate via the CXX_DEPENDS macro which expands to uclibcxx (although in adapter's Makefile I see you are depending on libstdcpp instead).

So far I've only added yate and uclibc++ to the package directory of the SDK. Is there another package needed? I would think not since libc.so and libgcc_s.so.1 are already in staging_dir/toolchain-mips_34kc_gcc-5.2.0_musl-1.1.11/lib/, but I'm not sure how to get them found by the build system.

Package uclibcxx is missing dependencies for the following libraries:
libc.so
libgcc_s.so.1

This went away after I compiled and installed the package "toolchain".

Hi Cel,

I have been facing the same issue. Could you explain how you sorted this problem. How did you compile and install the package toolchain

anish.churi

You should be able to solve that problem by executing in your SDK directory

./scripts/feeds update
./scripts/feeds install uclibcxx

I think you can use libc instead of uclibc, but this is lighter, I am not an expert, this is what I have read and used

(Last edited by VirtualEvan on 20 Apr 2017, 14:27)

The discussion might have continued from here.