Libconfig wont link and scratching my head!

Hi,

I'm not that familiar with what I'm doing so probably a stupid error as my understanding is not great (coming from a win32 background!).

I'm trying to build a custom package and previous efforts have been fine as I have been using the standard c++ with g++ linking just by -llibsdtc++ . However I've added in libconfig to the make menu build, but ld does not seem to be 'seeing it' the library.

There are libconfig objects (openwrt main build outputs for ATH9 and netgrear wndr3700) in 'openwrt/staging_dir/target-mips_24kc_musl/usr/lib/' of libconfig.so, libconfig.so.11 and libconfig.11.0.2 and I can see that from the verbose build settings that that ld has a search here but to no avail.

Could someone please explain what is going on, I dont know what else I have to do to force ld to pick up the .so files?

Any advice really appreciated
thanks
nick

Add libconfig to your dependencies and your package will link successfully.

https://openwrt.org/docs/guide-developer/dependencies

Thanks Juppin, but it still did not fix it :frowning:

The build for my package now shows the dependancy check with

*make[2]: Entering directory '/home/nickonlite/openwrt/package/libs/libconfig'*
*echo "libconfig" >> /home/nickonlite/openwrt/staging_dir/target-mips_24kc_musl/pkginfo/libconfig.default.install*
*make[2]: Leaving directory '/home/nickonlite/openwrt/package/libs/libconfig'*
*time: package/libs/libconfig/compile#0.17#0.06#0.21*

My inner make file (in the package src dir) has these statements

TARGET_LDFLAGS += -libconfig
LDFLAGS = -llibconfig

and the outer make file with your suggestion has

define Package/perftester
 .........
  DEPENDS:=+libconfig
endef

and the build comes up with the normal chain of errors after the first of
.....undefined reference tolibconfig::Config::Config()`

Any further ideas or checks?

Thanks again
nick

Why only -libconfig for TARGET_LDFLAGS instead of -llibconfig?

Can you post the verbose build output?
make package/xxx/{clean,compile} V=s -j1

Do you have your package online available at github or there like?

Hi Juppin,

Many thanks for helping out. I'm still struggling to understand what is the real issue. Adding explicit -l/..path.../libconfig or DEPENDS:=+libconfig fails. Just using the DEPENDS results in a non linakge. Using the explicit -l/..path../libconfig results in linker not 'finding' the library.

The build log shows the depends statement is active as it checks/builds the libconfig library. The linker just does not 'see' the library as being present and yet I can 'nm /..path.../libconfig.so and see the exported functions. I think there is some sort of bigger config issue going on but no idea what!

The clean/compile out put is below.

 nickonlite  ~  openwrt  make package/utils/perftester/{clean,compile} V=s -j1
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a build dependency on 'libpam', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libgnutls', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libopenldap', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libidn2', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libssh2', which does not exist
WARNING: Makefile 'package/boot/kexec-tools/Makefile' has a dependency on 'liblzma', which does not exist
WARNING: Makefile 'package/network/services/lldpd/Makefile' has a dependency on 'libnetsnmp', which does not exist
make[1]: Entering directory '/home/nickonlite/openwrt'
make[2]: Entering directory '/home/nickonlite/openwrt/package/utils/perftester'
rm -rf /home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester
rm -f /home/nickonlite/openwrt/staging_dir/target-mips_24kc_musl/stamp/.perftester_installed
rm -f /home/nickonlite/openwrt/staging_dir/target-mips_24kc_musl/packages/perftester.list
make[2]: Leaving directory '/home/nickonlite/openwrt/package/utils/perftester'
time: package/utils/perftester/clean#0.11#0.04#0.14
make[1]: Leaving directory '/home/nickonlite/openwrt'
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a build dependency on 'libpam', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libgnutls', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libopenldap', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libidn2', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libssh2', which does not exist
WARNING: Makefile 'package/boot/kexec-tools/Makefile' has a dependency on 'liblzma', which does not exist
WARNING: Makefile 'package/network/services/lldpd/Makefile' has a dependency on 'libnetsnmp', which does not exist
make[1]: Entering directory '/home/nickonlite/openwrt'
make[2]: Entering directory '/home/nickonlite/openwrt/package/libs/toolchain'
echo "libc" >> /home/nickonlite/openwrt/staging_dir/target-mips_24kc_musl/pkginfo/toolchain.default.install
echo "libgcc" >> /home/nickonlite/openwrt/staging_dir/target-mips_24kc_musl/pkginfo/toolchain.default.install
echo "libpthread" >> /home/nickonlite/openwrt/staging_dir/target-mips_24kc_musl/pkginfo/toolchain.default.install
make[2]: Leaving directory '/home/nickonlite/openwrt/package/libs/toolchain'
time: package/libs/toolchain/compile#0.16#0.07#0.21
make[2]: Entering directory '/home/nickonlite/openwrt/package/libs/libconfig'
echo "libconfig" >> /home/nickonlite/openwrt/staging_dir/target-mips_24kc_musl/pkginfo/libconfig.default.install
make[2]: Leaving directory '/home/nickonlite/openwrt/package/libs/libconfig'
time: package/libs/libconfig/compile#0.17#0.06#0.20
make[2]: Entering directory '/home/nickonlite/openwrt/package/utils/perftester'
touch /home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester/.prepared_489594af4946d59df351c2429a729428_6664517399ebbbc92a37c5bb081b5c53_check
true
[ ! -d ./src/ ] || cp -fpR ./src/. /home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester
touch /home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester/.prepared_489594af4946d59df351c2429a729428_6664517399ebbbc92a37c5bb081b5c53
rm -f /home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester/.configured_*
rm -f /home/nickonlite/openwrt/staging_dir/target-mips_24kc_musl/stamp/.perftester_installed
touch /home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester/.configured_68b329da9893e34099c7d8ad5cb9c940
rm -f /home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester/.built
touch /home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester/.built_check
make -C /home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester CXX="mips-openwrt-linux-musl-g++" CXXFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -ffile-prefix-map=/home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester=perftester -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/usr/include -Wall" LDFLAGS="-L/home/nickonlite/openwrt/staging_dir/target-mips_24kc_musl/usr/lib -L/home/nickonlite/openwrt/staging_dir/target-mips_24kc_musl/lib -L/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/usr/lib -L/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib -znow -zrelro --verbose"
make[3]: Entering directory '/home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester'
mips-openwrt-linux-musl-g++ -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -ffile-prefix-map=/home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester=perftester -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/usr/include -Wall -c -o Configurator.o Configurator.cpp
Configurator.cpp: In member function 'bool Configurator::AnyConfig()':
Configurator.cpp:83:8: warning: unused variable 'ifc_type' [-Wunused-variable]
    int ifc_type;
        ^~~~~~~~
Configurator.cpp:84:9: warning: unused variable 'use_it' [-Wunused-variable]
    bool use_it;
         ^~~~~~
Configurator.cpp:145:32: warning: catching polymorphic type 'const class std::exception' by value [-Wcatch-value=]
   catch (const std::exception  ex )
                                ^~
mips-openwrt-linux-musl-g++ -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -ffile-prefix-map=/home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester=perftester -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/usr/include -Wall -c -o Logger.o Logger.cpp
mips-openwrt-linux-musl-g++ -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -ffile-prefix-map=/home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester=perftester -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/usr/include -Wall -c -o NetMsg.o NetMsg.cpp
mips-openwrt-linux-musl-g++ -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -ffile-prefix-map=/home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester=perftester -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/usr/include -Wall -c -o Exceptions.o Exceptions.cpp
mips-openwrt-linux-musl-g++ -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -ffile-prefix-map=/home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester=perftester -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/usr/include -Wall -c -o main.o main.cpp
mips-openwrt-linux-musl-g++ -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -ffile-prefix-map=/home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester=perftester -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/usr/include -Wall -c -o RunCommand.o RunCommand.cpp
mips-openwrt-linux-musl-g++ -L/home/nickonlite/openwrt/staging_dir/target-mips_24kc_musl/usr/lib -L/home/nickonlite/openwrt/staging_dir/target-mips_24kc_musl/lib -L/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/usr/lib -L/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib -znow -zrelro --verbose -o perftester Configurator.o  Logger.o  NetMsg.o Exceptions.o    main.o    RunCommand.o
Reading specs from /home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib/gcc/mips-openwrt-linux-musl/8.4.0/specs
COLLECT_GCC=mips-openwrt-linux-musl-g++
COLLECT_LTO_WRAPPER=/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/libexec/gcc/mips-openwrt-linux-musl/8.4.0/lto-wrapper
Target: mips-openwrt-linux-musl
Configured with: /home/nickonlite/openwrt/build_dir/toolchain-mips_24kc_gcc-8.4.0_musl/gcc-8.4.0/configure --with-bugurl=http://bugs.openwrt.org/ --with-pkgversion='OpenWrt GCC 8.4.0 unknown' --prefix=/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=mips-openwrt-linux-musl --with-gnu-ld --enable-target-optspace --disable-libgomp --disable-libmudflap --disable-multilib --disable-libmpx --disable-nls --without-isl --without-cloog --with-host-libstdcxx=-lstdc++ --with-float=soft --with-gmp=/home/nickonlite/openwrt/staging_dir/host --with-mpfr=/home/nickonlite/openwrt/staging_dir/host --with-mpc=/home/nickonlite/openwrt/staging_dir/host --disable-decimal-float --with-diagnostics-color=auto-if-env --with-mips-plt --disable-libssp --enable-__cxa_atexit --with-headers=/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/include --enable-languages=c,c++ --enable-shared --enable-threads --with-slibdir=/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib --enable-lto --with-libelf=/home/nickonlite/openwrt/staging_dir/host --disable-libsanitizer
Thread model: posix
gcc version 8.4.0 (OpenWrt GCC 8.4.0 unknown) 
COMPILER_PATH=/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/libexec/gcc/mips-openwrt-linux-musl/8.4.0/:/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/libexec/gcc/mips-openwrt-linux-musl/8.4.0/:/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/libexec/gcc/mips-openwrt-linux-musl/:/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib/gcc/mips-openwrt-linux-musl/8.4.0/:/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib/gcc/mips-openwrt-linux-musl/:/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib/gcc/mips-openwrt-linux-musl/8.4.0/../../../../mips-openwrt-linux-musl/bin/
LIBRARY_PATH=/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib/gcc/mips-openwrt-linux-musl/8.4.0/:/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib/gcc/mips-openwrt-linux-musl/8.4.0/../../../../mips-openwrt-linux-musl/lib/
COLLECT_GCC_OPTIONS='-L/home/nickonlite/openwrt/staging_dir/target-mips_24kc_musl/usr/lib' '-L/home/nickonlite/openwrt/staging_dir/target-mips_24kc_musl/lib' '-L/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/usr/lib' '-L/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib' '-z' 'now' '-z' 'relro' '-v' '-o' 'perftester' '-shared-libgcc' '-msoft-float' '-mllsc' '-mplt' '-mno-shared' '-EB' '-mabi=32'
 /home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/libexec/gcc/mips-openwrt-linux-musl/8.4.0/collect2 -plugin /home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/libexec/gcc/mips-openwrt-linux-musl/8.4.0/liblto_plugin.so -plugin-opt=/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/libexec/gcc/mips-openwrt-linux-musl/8.4.0/lto-wrapper -plugin-opt=-fresolution=/home/nickonlite/openwrt/tmp/ccw3ATSM.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s --eh-frame-hdr -EB -dynamic-linker /lib/ld-musl-mips-sf.so.1 -melf32btsmip -o perftester -z now -z relro /home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib/gcc/mips-openwrt-linux-musl/8.4.0/../../../../mips-openwrt-linux-musl/lib/crt1.o /home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib/gcc/mips-openwrt-linux-musl/8.4.0/../../../../mips-openwrt-linux-musl/lib/crti.o /home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib/gcc/mips-openwrt-linux-musl/8.4.0/crtbegin.o -L/home/nickonlite/openwrt/staging_dir/target-mips_24kc_musl/usr/lib -L/home/nickonlite/openwrt/staging_dir/target-mips_24kc_musl/lib -L/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/usr/lib -L/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib -L /home/nickonlite/openwrt/staging_dir/target-mips_24kc_musl/usr/lib -rpath-link /home/nickonlite/openwrt/staging_dir/target-mips_24kc_musl/usr/lib -L/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib/gcc/mips-openwrt-linux-musl/8.4.0 -L/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib/gcc/mips-openwrt-linux-musl/8.4.0/../../../../mips-openwrt-linux-musl/lib Configurator.o Logger.o NetMsg.o Exceptions.o main.o RunCommand.o -lstdc++ -lm -lssp_nonshared -lgcc_s -lc -lgcc_s /home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib/gcc/mips-openwrt-linux-musl/8.4.0/crtend.o /home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib/gcc/mips-openwrt-linux-musl/8.4.0/../../../../mips-openwrt-linux-musl/lib/crtn.o
/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib/gcc/mips-openwrt-linux-musl/8.4.0/../../../../mips-openwrt-linux-musl/bin/ld: Configurator.o: in function `Configurator::AnyConfig()':
Configurator.cpp:(.text+0x2f6): undefined reference to `config_init'
collect2: error: ld returned 1 exit status
makefile:11: recipe for target 'perftester' failed
make[3]: *** [perftester] Error 1
make[3]: Leaving directory '/home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester'
Makefile:39: recipe for target '/home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester/.built' failed
make[2]: *** [/home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester/.built] Error 2
make[2]: Leaving directory '/home/nickonlite/openwrt/package/utils/perftester'
time: package/utils/perftester/compile#2.73#0.21#2.89
package/Makefile:111: recipe for target 'package/utils/perftester/compile' failed
make[1]: *** [package/utils/perftester/compile] Error 2
make[1]: Leaving directory '/home/nickonlite/openwrt'
/home/nickonlite/openwrt/include/toplevel.mk:225: recipe for target 'package/utils/perftester/compile' failed
make: *** [package/utils/perftester/compile] Error 2
 nickonlite  ~  openwrt 

The verbose build and link output just relying on the DEPENDS library inclusion is here. Not sure is this indicates to you of any fundamental issues or errors

Why?:

Usually -lconfig (omit lib prefix). And I don't see neither -liconfig nor -lconfig at linking stage of your project:

Definition

only force opkg to install package libconfig along with your package perftester.
So

  1. Correctly add -lconfig parameter into linking stage of your project.
  2. Check existance of libconfig.so.* library in one of already included paths:
    -L/home/nickonlite/openwrt/staging_dir/target-mips_24kc_musl/usr/lib
    -L/home/nickonlite/openwrt/staging_dir/target-mips_24kc_musl/lib
    -L/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/usr/lib
    -L/home/nickonlite/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib
1 Like

Hi,

Thanks to everyone for your help,
123Serge123, using -lconfig and not -llibconfig did the trick, never would have known about that (although having checked the ld docs do state that the lib is not required!)

It now links fully but wont produce the package, it complains with

Package perftester is missing dependencies for the following libraries:
libconfig++.so.11
libstdc++.so.6

Googling about it seems that it should be fixed with DEPENDS:=+libconfig, +libstdc++ but this does not seem to make any difference.

Do you have any ideas on this?
Thanks again
nick

The tail end of the build log gives this

*make[3]: Leaving directory '/home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester'*
*touch /home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester/.built*
*rm -rf /home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester/.pkgdir/perftester.installed /home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester/.pkgdir/perftester*
*mkdir -p /home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester/.pkgdir/perftester*
*install -d -m0755 /home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester/.pkgdir/perftester/usr/sbin*
*install -m0755 /home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester/perftester /home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester/.pkgdir/perftester/usr/sbin/*
*touch /home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester/.pkgdir/perftester.installed*
*mkdir -p /home/nickonlite/openwrt/staging_dir/target-mips_24kc_musl/root-ar71xx/stamp*
*SHELL= flock /home/nickonlite/openwrt/tmp/.root-copy.flock -c 'cp -fpR /home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester/.pkgdir/perftester/. /home/nickonlite/openwrt/staging_dir/target-mips_24kc_musl/root-ar71xx/'*
*touch /home/nickonlite/openwrt/staging_dir/target-mips_24kc_musl/root-ar71xx/stamp/.perftester_installed*
*mkdir -p /home/nickonlite/openwrt/bin/targets/ar71xx/generic/packages /home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester/ipkg-mips_24kc/perftester/CONTROL /home/nickonlite/openwrt/staging_dir/target-mips_24kc_musl/pkginfo*
*install -d -m0755 /home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester/ipkg-mips_24kc/perftester/usr/sbin*
*install -m0755 /home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester/perftester /home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester/ipkg-mips_24kc/perftester/usr/sbin/*
*find /home/nickonlite/openwrt/build_dir/target-mips_24kc_musl/perftester/ipkg-mips_24kc/perftester -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf*
*Package perftester is missing dependencies for the following libraries:*
*libconfig++.so.11*
*libstdc++.so.6*
*Makefile:39: recipe for target '/home/nickonlite/openwrt/bin/packages/mips_24kc/base/perftester_1_mips_24kc.ipk' failed*
*make[2]: *** [/home/nickonlite/openwrt/bin/packages/mips_24kc/base/perftester_1_mips_24kc.ipk] Error 1*
*make[2]: Leaving directory '/home/nickonlite/openwrt/package/utils/perftester'*
*time: package/utils/perftester/compile#2.97#0.30#3.20*
*package/Makefile:111: recipe for target 'package/utils/perftester/compile' failed*
*make[1]: *** [package/utils/perftester/compile] Error 2*
*make[1]: Leaving directory '/home/nickonlite/openwrt'*
*/home/nickonlite/openwrt/include/toplevel.mk:225: recipe for target 'package/utils/perftester/compile' failed*

This

means that the libraries are available at compile time but no explicit dependencies at run time.
DEPENDS := +libconfig +libstdcpp
But I don't know which package contain libconfig++.so.11

Hi,

I dont understand what is required here, I'm hoping you can help!

  I fully understand that the libs (libstdc++ and libconfig) are

dynamic and have to be loaded by the target device before the
program can be executed.

That said, the DEPENDS statement is a bit of a mystery.

  The build system 'knows' the libs are dynamic as it has linked to

them and therefore has a local copy (of the correct elf) that can
be bundled in the xxx.ipk file. So why the explicit need for the
DEPENDS statement other than for the first building of the libs
for the custom package?

  Thanks for your 'DEPENDS := +libconfig +libstdcpp', that has just

left the error for libconfig++.so.11

  I have tried 'libconfigcpp', 'libconfig++' and 'libconfig' all

give the same error! I have been poking around with objdump and
peering into libconfig++.so.11 for some clues, but cant find any
:frowning:

  Where does the name the DEPENDS statement is looking for come

from and how is it satisfied?

Thanks again

nick

As I understand libconfig++.so.11 exist in library search path (what is the path exactly?). So it's possible that libconfig++.so.11 and libconfig.so are compile both but only C version is included into libconfig package. Check libconfig package just in case.

Thanks 123 for all your help :), I have manged to sort this just using standard libconfig, using the -lconfig at the link stage and using ```DEPENDS := +libconfig

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.