Error building OS=android CPU=arm BINDINGS=cpp,java on Linux

asked 2014-07-22 12:41:40 -0700

jdelliot gravatar image

updated 2014-07-22 12:42:41 -0700

I can build just fine running:

scons BINDINGS=cpp WS=off

However, when attempt to build targeting Android by running:

scons OS=android CPU=arm BINDINGS=cpp,java ANDROID_SDK=~/Development/adt-bundle-linux-x86-20140702/sdk ANDROID_NDK=~/Development/android-ndk-r9d ANDROID_SRC=~/Development/Android-Source WS=off`

I get the following error:

[CXX]     common/os/posix/SslSocket.cc
In file included from common/os/posix/SslSocket.cc:35:0:
common/os/posix/../../crypto/openssl/OpenSsl.h:25:25: fatal error: openssl/aes.h: No such file or directory
compilation terminated.
scons: *** [common/build/android/arm/debug/obj/os/SslSocket.o] Error 1
scons: building terminated because of errors.

I have libssl-dev installed. I could imagine link errors, but not an error finding this header file.

What am I missing?

Thanks in advance, John

P.S. I am running Ubuntu 14.04 LTS. I have also tried this on OSX Mavericks with similar results.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-07-22 15:08:52 -0700

msanu gravatar image

updated 2014-07-22 16:44:46 -0700

Do you have the built Android source in ~/Development/Android-Source? I think the instructions in https://allseenalliance.org/docs-and-downloads/documentation/alljoyn-android-environment-setup-guide#unique_16 expect the built Android source.

I'm able to build by copying only libcrypto.so and libssl.so to ~/Development/Android-Source/out/target/product/generic/system/lib/ and copying the openssl include files to ~/Development/Android-Source/external/openssl/include/openssl/.

To work around the NDK issue, I pulled libc.so from the device and temporarily replaced the libc.so in the ndk with the one from the device e.g. cp libc.so ~/Development/android-ndk-r9d/platforms/android-19/arch-arm/usr/lib/libc.so after saving a copy of the original libc.so in the ndk.

edit flag offensive delete publish link more


:) I was hoping to avoid that if at all possible, both for size and organizational policy concerns. What am I getting as output from that build? Can I work around this in any manner?

jdelliot ( 2014-07-22 15:12:08 -0700 )edit

The libcrypto.so and libssl.so files can be pulled of the device by doing a adb pull /system/lib/libcrypto.so libcrypto.so and adb pull /system/lib/libssl.so libssl.so and the header files can be copied as mentioned by msanu That should do the trick.

Nikhil Dabhade ( 2014-07-22 15:45:33 -0700 )edit

Thanks! That got me a long way, but it still fails with this issue: https://ask.allseenalliance.org/question/337/error-building-osandroid-cpuarm/ Is there another way (other than downloading an building the Android source) to get the proper libc? If I roll back to an older NDK would it work?

jdelliot ( 2014-07-22 16:15:58 -0700 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2014-07-22 12:41:40 -0700

Seen: 631 times

Last updated: Jul 22 '14