2

Error building os=android CPU=arm

asked 2014-04-29 12:12:38 -0700

ry.jones gravatar image
Linux Foundation Staff

This is the same issue discussed here.

This happens on a clean machine set up following the Android documentation.

Install file: "alljoyn_c/build/android/arm/debug/obj/liballjoyn_c.a" as "build/android/arm/debug/dist/c/lib/liballjoyn_c.a"
arm-linux-androideabi-gcc -o alljoyn_c/build/android/arm/debug/obj/samples/basic/basic_c_client -no-canonical-prefixes -Wl,-z,noexecstack -Wl,--no-undefined --sysroot=/srv/jenkins/android-ndk-r9d/platforms/android-19/arch-arm -Wl,-rpath-link=/srv/jenkins/android-ndk-r9d/platforms/android-19/arch-arm/usr/lib -Wl,--gc-sections -Wl,-z,nocopyreloc -Wl,--fix-cortex-a8 alljoyn_c/build/android/arm/debug/obj/samples/basic/basic_c_client.o -Lbuild/android/arm/debug/dist/cpp/lib -Lbuild/android/arm/debug/dist/c/lib -L/srv/jenkins/android-ndk-r9d/platforms/android-19/arch-arm/usr/lib -L/srv/jenkins/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi -L/srv/jenkins/android-source/out/target/product/generic/system/lib build/android/arm/debug/dist/cpp/lib/BundledRouter.o -lajrouter build/android/arm/debug/dist/c/lib/liballjoyn_c.a -lalljoyn -lm -lc -lstdc++ -lcrypto -llog -lgcc -lssl -lgnustl_static
/srv/jenkins/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /srv/jenkins/android-source/out/target/product/generic/system/lib/libcrypto.so: error: undefined reference to '__strlen_chk'
/srv/jenkins/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /srv/jenkins/android-source/out/target/product/generic/system/lib/libcrypto.so: error: undefined reference to '__memcpy_chk'
/srv/jenkins/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /srv/jenkins/android-source/out/target/product/generic/system/lib/libcrypto.so: error: undefined reference to '__memset_chk'
/srv/jenkins/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /srv/jenkins/android-source/out/target/product/generic/system/lib/libcrypto.so: error: undefined reference to '__strchr_chk'
/srv/jenkins/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /srv/jenkins/android-source/out/target/product/generic/system/lib/libcrypto.so: error: undefined reference to '__strcat_chk'
collect2: ld returned 1 exit status
scons: *** [alljoyn_c/build/android/arm/debug/obj/samples/basic/basic_c_client] Error 1
scons: building terminated because of errors.
Build step 'Execute shell' marked build as failure
[ssh-agent] Stopped.
Finished: FAILURE
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
3

answered 2014-05-02 11:02:37 -0700

stevek gravatar image

This is a known issue. AllJoyn depends on libcrypto.so (from OpenSSL) for certain cryptographic functions. Android has never made OpenSSL part of their public APIs. This is why AllJoyn needs access to built source (or libcrypto.so copied from a phone) in order to build. When the KitKat version of Android was delivered, they changed certain linking conditions for the libcrypto.so library. The source code of KitKat has a C runtime library that includes the symbols "__strlen_chk", "__memcpy_chk", etc. The C runtime library in the NDK does not have those symbols. When AllJoyn builds, it links against the NDK version of the C runtime library. Until this gets resolved, you will need to build against the Ice Cream Sandwich sources (Jellybean should be fine too).

edit flag offensive delete publish link more

Comments

2

FYI, AOSP jellybean has this problem, but ICS does not. To build android-4.0.4_r2.1, you have to use Ubuntu 10.04 or follow the following guide to make it build on 12.04: http://aleksmaus.blogspot.ca/2012/05/bulding-aosp-on-ubuntu-1204.html

mricon ( 2014-05-07 10:21:46 -0700 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2014-04-29 12:12:38 -0700

Seen: 765 times

Last updated: May 02 '14