working... package has: DEPENDS:= +uglylogging +libmodbus link runs, (and succeeds): mips-openwrt-linux-musl-gcc main.o mbhelpers.o -L/home/karlp/src/smartgate_firmware/owrt-master/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/usr/lib -L/home/karlp/src/smartgate_firmware/owrt-master/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib -znow -zrelro -luglylogging -lmodbus -L../../libs/dist64 -o modbus_debugger libmodbus is _not_ in either of the two -L paths, but is in staging/target/*** not working #DEPENDS+=+libcares +cJSON DEPENDS+=+libcares +cjson linker runs (and fails, withmips-openwrt-linux-musl-gcc -L/home/karlp/src/smartgate_firmware/owrt-master/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/usr/lib -L/home/karlp/src/smartgate_firmware/owrt-master/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib -znow -zrelro mosquitto_ctrl.o client.o dynsec.o dynsec_client.o dynsec_group.o dynsec_role.o get_password.o memory_mosq.o memory_public.o options.o password_mosq.o -o mosquitto_ctrl -lcrypto ../../lib/libmosquitto.so.1 -lcjson -ldl /home/karlp/src/smartgate_firmware/owrt-master/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: cannot find -lcjson collect2: error: ld returned 1 exit status either syntax of cjson) $ ls -l staging_dir/target-mips_24kc_musl/usr/lib/libcj* lrwxrwxrwx 1 karlp karlp 18 Dec 4 15:28 staging_dir/target-mips_24kc_musl/usr/lib/libcjson.so.1 -> libcjson.so.1.7.14 -rwxr-xr-x 1 karlp karlp 32452 Dec 4 15:28 staging_dir/target-mips_24kc_musl/usr/lib/libcjson.so.1.7.14