Alljoyn compile error in OpenWRT

asked 2014-04-30 20:03:09 -0700

mmrasheed gravatar image

Hi, While compiling alljoyn samples for OpenWRT, I face the following compile error-

scons: Entering directory /Volumes/openwrt/openwrt/build_dir/target-mips_34kc_uClibc-' scons: Reading SConscript files ... BD has been replaced by BR, setting BR to off scons: done reading SConscript files. scons: Building targets ... [CXX] cpp/samples/ACServerSample/ACServerSample.cc [CXX] cpp/samples/ACServerSample/OptParser.cc [CXX] cpp/samples_common/AnnounceHandlerImpl.cc [CXX] cpp/samples_common/AsyncSessionJoiner.cc [CXX] cpp/samples_common/CommonBusListener.cc [CXX] cpp/samples_common/CommonSampleUtil.cc [CXX] cpp/samples_common/GuidUtil.cc [CXX] cpp/samples_common/IniParser.cc [CXX] cpp/samples_common/PropertyStoreImpl.cc [CXX] cpp/samples_common/SessionListenerImpl.cc [CXX] cpp/samples_common/SrpKeyXListener.cc [CXX] cpp/samples/ACServerSample/ConfigServiceListenerImpl.cc [CXX] cpp/samples/ACServerSample/generated/ControlPanelGenerated.cc [CXX] cpp/samples/ACServerSample/generated/MyDeviceAc_mode.cc [CXX] cpp/samples/ACServerSample/generated/MyDeviceCurrentHumidityStringProperty.cc [CXX] cpp/samples/ACServerSample/generated/MyDeviceCurrentTempStringProperty.cc [CXX] cpp/samples/ACServerSample/generated/MyDeviceFan_speed.cc [CXX] cpp/samples/ACServerSample/generated/MyDeviceSet_temperature.cc [CXX] cpp/samples/ACServerSample/generated/MyDeviceStatusStringProperty.cc [CXX] cpp/samples/ACServerSample/provided/ControlPanelProvided.cc [CXX] cpp/samples/ACServerSample/OnboardingControllerImpl.cc [LINK] build/openwrt/openwrt/release/obj/cpp/samples/ACServerSample/ACServerSample /Volumes/openwrt/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc- build/openwrt/openwrt/release/obj/cpp/samples/ACServerSample/OnboardingControllerImpl.o: undefined reference to symbol 'json_object_get_int' /Volumes/openwrt/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc- note: 'json_object_get_int' is defined in DSO /Volumes/openwrt/openwrt/staging_dir/target-mips_34kc_uClibc- so try adding it to the linker command line /Volumes/openwrt/openwrt/staging_dir/target-mips_34kc_uClibc- could not read symbols: Invalid operation collect2: error: ld returned 1 exit status scons: *** [build/openwrt/openwrt/release/obj/cpp/samples/ACServerSample/ACServerSample] Error 1 scons: building terminated because of errors. make[3]: *** [/Volumes/openwrt/openwrt/build_dir/target-mips_34kc_uClibc-] Error 2 make[3]: Leaving directory /Volumes/openwrt/openwrt/feeds/alljoyn/alljoyn-sample_apps' make[2]: * [package/feeds/alljoyn/alljoyn-sample_apps/compile] Error 2 make[2]: Leaving directory /Volumes/openwrt/openwrt' make[1]: *** [/Volumes/openwrt/openwrt/staging_dir/target-mips_34kc_uClibc-] Error 2 make[1]: Leaving directory /Volumes/openwrt/openwrt' make: * [world] Error 2

I tried "make clean && make -j4 V=s" with no luck. As it seems, the issue is json related, I added json and json-c library in "make menuconfig", but the problem remains same. Any idea on how to solve this issue?

edit retag flag offensive close merge delete


did you resolve?

alphaemmeo ( 2014-05-14 03:15:38 -0700 )edit

@alphaemmeo , yeah, I resolved it finally. I reset everything, deleted all the openwrt binaries and reviewed the configuration to find out that I was actually installing alljoyn's attitude_adjustment feed for the master branch (barrier_breaker).

mmrasheed ( 2014-05-15 21:51:14 -0700 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2014-05-05 08:59:38 -0700

stevek gravatar image

Which version of OpenWrt are you trying to build? Is it the 12.09 tagged release? Is it the head of the Attitude Adjustment branch? Is it the head of the development branch (aka Barrier Breaker)? Also which version of the AllJoyn feed are you bringing in? Is it the attitude_adjustment branch or the barrier_breaker branch?

If you are building the official 12.09 tagged release of OpenWrt, then you must use the attitude_adjustment version of the AllJoyn feed. Also, and this is very important, you must patch the OpenSSL package with this patch: http://patchwork.openwrt.org/patch/4802/

If you are building the head of that Attitude Adjustment branch or the Barrier Breaker branch, then you must use the barrier_breaker version of the AllJoyn feed. This is because of changes that were made to the libjson package after the 12.09 tagged release. (The head of the Attitude Adjustment and Barrier Breaker branches already have the mentioned patch applied so you don't need to worry about that.)

edit flag offensive delete publish link more


Thanks @stevek! It's my bad. While compiling the master branch (barrier breaker) of openwrt, I was installing alljoyn feed for attitude adjustment. :(

mmrasheed ( 2014-05-15 21:31:15 -0700 )edit

answered 2014-05-08 01:43:51 -0700

Try ./scripts/feeds install -a

edit flag offensive delete publish link more


This will only make every single package defined for OpenWrt available for configuring into the build. OpenWrt has already been configured for building AllJoyn as can be seen by the build errors. The question is with respect to why including the different json packages does not fix the build.

stevek ( 2014-05-15 16:50:06 -0700 )edit

Sorry, I did not read log very carefully. As it said you should adding /Volumes/openwrt/openwrt/staging_dir/target-mips_34kc_uClibc- to the linker command line. By the way, I build AllJoyn 14.2 sucessfully in Attitude Adjustment . In the file feeds/alljoyn/alljoyn-sample_apps/Makefile , set JSON_LIB:=json-c

shecenon ( 2014-05-16 22:24:57 -0700 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2014-04-30 20:03:09 -0700

Seen: 953 times

Last updated: May 08 '14