OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Georgi Valkov - 06.09.2020

FS#3328 - ucert: dyld: Library not loaded: libjson-c.5.dylib on macOS

Supply the following if possible:
- Device problem occurs on
macOS X 10.15.6

- Software versions of OpenWrt/LEDE release, packages, etc.
OpenWRT master 252197f014932c03cea7c080d8ab90e0a963a281
ucert 2020-05-24 00b921d80ac0dc47339305d803f865ff43c56d63
json-c 0.14

- Steps to reproduce
Clone the OpenWRT.git and try to compile it on macOS X 10.15.6

cd /Volumes/WRT3200.test
rm -rf openwrt
git clone
cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
make menuconfig
# Select any target, e.g. Target System = Marvel EBU Armada, Target Profile = Linksys WRT3200ACM
# the multi-threaded build fails, but saves some time
make -j 12
make V=sc

make[3]: Entering directory '/Volumes/WRT3200.test/openwrt/package/base-files'
[ -s /Volumes/WRT3200.test/openwrt/key-build.ucert ] || /Volumes/WRT3200.test/openwrt/staging_dir/host/bin/ucert -I -c /Volumes/WRT3200.test/openwrt/key-build.ucert -p /Volumes/WRT3200.test/openwrt/ -s /Volumes/WRT3200.test/openwrt/key-build
dyld: Library not loaded: libjson-c.5.dylib
  Referenced from: /Volumes/WRT3200.test/openwrt/staging_dir/host/bin/ucert
  Reason: image not found
bash: line 1: 22681 Abort trap: 6           /Volumes/WRT3200.test/openwrt/staging_dir/host/bin/ucert -I -c /Volumes/WRT3200.test/openwrt/key-build.ucert -p /Volumes/WRT3200.test/openwrt/ -s /Volumes/WRT3200.test/openwrt/key-build
make[3]: *** [Makefile:229: /Volumes/WRT3200.test/openwrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/linux-mvebu_cortexa9/base-files/.configured_4a9c46a6557bf47f111f9c7c4b182824_8e081b74cf069e1e6800a5bbcbb282f0] Error 134
make[3]: Leaving directory '/Volumes/WRT3200.test/openwrt/package/base-files'
time: package/base-files/compile#0.50#0.28#0.85
make[2]: *** [package/Makefile:113: package/base-files/compile] Error 2
make[2]: Leaving directory '/Volumes/WRT3200.test/openwrt'
make[1]: *** [package/Makefile:107: /Volumes/WRT3200.test/openwrt/staging_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/stamp/.package_compile] Error 2
make[1]: Leaving directory '/Volumes/WRT3200.test/openwrt'
make: *** [/Volumes/WRT3200.test/openwrt/include/ world] Error 2

Dependancies for ucert

otool -L staging_dir/host/bin/ucert 
	@rpath/libubox.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/libblobmsg_json.dylib (compatibility version 0.0.0, current version 0.0.0)
	libjson-c.5.dylib (compatibility version 5.0.0, current version 5.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)

ls -l staging_dir/host/lib/libjson-c*
-rwxr-xr-x  1 g  staff  65680 Sep  6 23:12 staging_dir/host/lib/libjson-c.5.0.0.dylib
lrwxr-xr-x  1 g  staff     21 Sep  6 23:12 staging_dir/host/lib/libjson-c.5.dylib -> libjson-c.5.0.0.dylib
lrwxr-xr-x  1 g  staff     17 Sep  6 23:12 staging_dir/host/lib/libjson-c.dylib -> libjson-c.5.dylib


cp staging_dir/host/lib/libjson-c.5.dylib package/base-files/
make -j 12
Georgi Valkov commented on 07.09.2020 21:15

Caused by libjson-c which did not include RPATH, so the ucert tool did not know how to locate the library. Attached is a patch that allows RPATH to be embedded and corrects the build errors on macOS. Please merge!

Georgi Valkov commented on 08.09.2020 08:48


Available keyboard shortcuts


Task Details

Task Editing