3

Trying to run Android sample 'Events and Actions' downloaded from https://allseenalliance.org/framework/download

Downloaded 'Core SDK - debug' which has sample eventaction and .apk in bin folder.

Installed it, but doesn't work. Is anyone able to run it?

Edit: Exception in the Logcat:

08-29 09:06:16.978 29314 29328 E AndroidRuntime: Process: org.allseen.sample.eventaction, PID: 29314 08-29 09:06:16.978 29314 29328 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__exidx_end" referenced by "/data/app/org.allseen.sample.eventaction-1/lib/arm/libMyAllJoynCode.so"...

I have tried building the library MyAllJoynCode.so using Android ndk, but I couldn't able to build it. I get below exception

root@jay-dev:~/alljoyn/core/alljoyn/alljoyn_core/samples/eventaction/Android# ndk-build [arm64-v8a] Compile++ : MyAllJoynCode <= AndroidJNIBridge.cc In file included from /root/alljoyn/core/alljoyn/build/linux/x86_64/debug/dist/cpp/inc/qcc/atomic.h:30:0, from /root/alljoyn/core/alljoyn/build/linux/x86_64/debug/dist/cpp/inc/qcc/ManagedObj.h:38, from /root/alljoyn/core/alljoyn/build/linux/x86_64/debug/dist/cpp/inc/alljoyn/Message.h:30, from /root/alljoyn/core/alljoyn/build/linux/x86_64/debug/dist/cpp/inc/alljoyn/AuthListener.h:32, from /root/alljoyn/core/alljoyn/build/linux/x86_64/debug/dist/cpp/inc/alljoyn/BusAttachment.h:34, from jni/event/AndroidJNIBridge.cc:19: /root/alljoyn/core/alljoyn/build/linux/x86_64/debug/dist/cpp/inc/qcc/posix/atomic.h:30:25: fatal error: sys/atomics.h: No such file or directory #include ^ compilation terminated. /root/android-ndk-r12b/android-ndk-r12b/build/core/build-binary.mk:474: recipe for target 'obj/local/arm64-v8a/objs/MyAllJoynCode/event/AndroidJNIBridge.o' failed make: *** [obj/local/arm64-v8a/objs/MyAllJoynCode/event/AndroidJNIBridge.o] Error 1

Jayasagar
  • 2,046
  • 19
  • 22

1 Answers1

0

It looks like you were using Android NDK level 20 (or later). The NDK's android-20 platform directory no longer contains the atomics.h file (they removed it), which caused the AllJoyn build failure you saw:

dist/cpp/inc/qcc/posix/atomic.h:30:25: fatal error: sys/atomics.h: No such file or directory

Prior to AllJoyn release 16.10, a workaround is simply to copying the NDK's android-19 atomics.h file to its android-20 (or later) platform directory.

However, the AllJoyn-related issue has been fixed as of September 2016 (i.e. no longer dependent on atomics.h), and the fix is included in AllJoyn release 16.10.

More information is provided in JIRA https://jira.allseenalliance.org/browse/ASACORE-3216

P. Sigurdson
  • 151
  • 4