Crypto++ for Android NDK r10

128 views
Skip to first unread message

Yi Huang

unread,
Sep 3, 2014, 2:48:00 PM9/3/14
to cryptop...@googlegroups.com
Hi All,

I am having difficulty cross compiling crypto++ for Android NDK r10, arch-arm, arm-linux-androideabi-4.8, android-19. Basically I am following the wiki page http://www.cryptopp.com/wiki/Android_(Command_Line) to set up environments and copied over stuff in cryptopp-mobile.zip to the source folder.

I believe I set environment variables right:
$ printenv | grep ANDROID | sort
ANDROID_EABI=/Users/yihuang/nfd/android-compile/android-ndk-r10/toolchains/arm-linux-androideabi-4.8
ANDROID_NDK_ROOT=/Users/yihuang/nfd/android-compile/android-ndk-r10
ANDROID_STL_INC=/Users/yihuang/nfd/android-compile/android-ndk-r10/sources/cxx-stl/stlport/stlport/
ANDROID_STL_LIB=/Users/yihuang/nfd/android-compile/android-ndk-r10/sources/cxx-stl/stlport/libs/armeabi/libstlport_shared.so
ANDROID_SYSROOT=/Users/yihuang/nfd/android-compile/android-ndk-r10/platforms/android-19/arch-arm
ANDROID_TOOLCHAIN=/Users/yihuang/nfd/android-compile/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin
IS_ANDROID=1

However, when I tried to "make static dynamic cryptest.exe",
ld returned with error code 1:
...
android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: fipstest.o:1:1: invalid character
collect2: error: ld returned 1 exit status
make: *** [libcryptopp.so] Error 1

This happens for every single .o file. libcryptopp.a is created, but libcryptopp.so and cryptest.exe still does not exist because of the ld error.

I don't have much experience on cross compiling and does not have any clue on this. Can any one help me with this?

Thanks,

--
Yi Huang

Yi Huang

unread,
Sep 3, 2014, 5:49:21 PM9/3/14
to cryptop...@googlegroups.com
Solved. Sorry for bothering.

在 2014年9月3日星期三UTC-7上午11时48分00秒,Yi Huang写道:

Jeffrey Walton

unread,
Sep 6, 2014, 2:09:03 PM9/6/14
to cryptop...@googlegroups.com
Hi Yi,

Solved. Sorry for bothering.
What was the issue if you don't mind me asking?

I work on OS X too, and I don't recall seeing it in the past.

Jeff

Imdad Daud

unread,
Feb 8, 2015, 2:46:04 AM2/8/15
to cryptop...@googlegroups.com
Hi, Jeff,

Did you solve it? I'm having the same problem. May I know if you solved it. I'm on OSX too.

Jeffrey Walton

unread,
Feb 15, 2015, 8:23:21 PM2/15/15
to cryptop...@googlegroups.com


On Sunday, February 8, 2015 at 2:46:04 AM UTC-5, Imdad Daud wrote:
Hi, Jeff,

Did you solve it? I'm having the same problem. May I know if you solved it. I'm on OSX too.

I have never encountered the problem, so I don't know what the problem is.

Jeff

Reply all
Reply to author
Forward
0 new messages