Breaker

OpenWRT 15.05 Chaos Calmer on Mac OS X El Capitan 10.11

When I try to build new OpenWRT release 15.05 Chaos Calmer on OSX 10.11 mkimage build fails with following error:
Undefined symbols for architecture x86_64:
“_ERR_remove_thread_state”, referenced from:
_rsa_sign in rsa-sign.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[5]: *** [tools/dumpimage] Error 1
make[4]: *** [tools-only] Error 2
make[3]: *** [/Volumes/OpenWRT/openwrt/build_dir/host/u-boot-2014.10/.built] Error 2
make[3]: Leaving directory `/Volumes/OpenWRT/openwrt/tools/mkimage’
make[2]: *** [tools/mkimage/compile] Error 2
make[2]: Leaving directory `/Volumes/OpenWRT/openwrt’
make[1]: *** [/Volumes/OpenWRT/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.tools_install_yynyynynynyyyyyyyyyyyyyyyyyyynyyyyynnyyynyyynnnyy] Error 2
make[1]: Leaving directory `/Volumes/OpenWRT/openwrt’
make: *** [world] Error 2

So, I replaced openssl with the one comes with homebrew build. Replaced Host/Compile section in tools/mkimage/Makefile, solves the issue.

define Host/Compile

$(MAKE) -C $(HOST_BUILD_DIR) defconfig

HOSTCFLAGS=”$(HOST_CFLAGS) -I/usr/local/Cellar/openssl/1.0.2d_1/include” \
HOSTLDFLAGS=”$(HOST_STATIC_LINKING) $(HOST_LDFLAGS) -L/usr/local/Cellar/openssl/1.0.2d_1/lib” \
$(MAKE) -C $(HOST_BUILD_DIR) tools-only
endef

merturk

One thought on “OpenWRT 15.05 Chaos Calmer on Mac OS X El Capitan 10.11

  • Paul

    I had this exact error and tried your fix, but I’m getting

    *** Default configuration is based on ‘sandbox_defconfig’
    HOSTCFLAGS=”-O2 -I/Volumes/OpenWrt/openwrt/staging_dir/host/include -I/Volumes/OpenWrt/openwrt/staging_dir/host/usr/include -I/usr/local/Cellar/openssl/1.0.2h_1/include” HOSTLDFLAGS=” -L/Volumes/OpenWrt/openwrt/staging_dir/host/lib -L/Volumes/OpenWrt/openwrt/staging_dir/host/usr/lib -L/usr/local/Cellar/openssl/1.0.2h_1/lib”
    bash: -I/Volumes/OpenWrt/openwrt/staging_dir/host/include: No such file or directory
    make[3]: *** [/Volumes/OpenWrt/openwrt/build_dir/host/u-boot-2014.10/.built] Error 127
    make[3]: Leaving directory `/Volumes/OpenWrt/openwrt/tools/mkimage’
    make[2]: *** [tools/mkimage/compile] Error 2
    make[2]: Leaving directory `/Volumes/OpenWrt/openwrt’
    make[1]: *** [/Volumes/OpenWrt/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.tools_install_yynyynynynyyyyyyyyyyyyyyyyyyyynyyyyynnyyynyyynnnyyyy] Error 2
    make[1]: Leaving directory `/Volumes/OpenWrt/openwrt’
    make: *** [world] Error 2

    Looking at some of the directories being added in to the HOSTCFLAGS= & HOSTLDFLAGS= lines, the following dirs on’t actually exist

    /Volumes/OpenWrt/openwrt/staging_dir/host/usr/include
    /Volumes/OpenWrt/openwrt/staging_dir/host/usr/lib

    So I tried hard coding the lines without the $(HOST_LDFLAGS) etc, omitting those 2 directory paths and I still get the same error.

    Any assistance would be greatly appreciated

Leave a Reply

Your email address will not be published. Required fields are marked *