Hi All,
I'm testing/validating Crypto++ on Android form the command line
(http://www.cryptopp.com/wiki/Android_(Command_Line)).
The Crypto++ library has a driver program named cryptest.exe that
exercises its algorithms. cryptest.exe needs libcryptopp (either
libcryptopp.a or libcryptopp.so); and libcryptopp needs libstlport
(either libstlport_static.a or libstlport_shared.so).
If I use at least one static library (either libcryptopp.a or
libstlport_static.a), then everything works as expected.
If I use all shared objects (libcryptopp.so and libstlport_shared.so),
I get a failure when attempting to run on the device:
shell [ at ] android:/data/local/tmp $ LD_LIBRARY_PATH=./; ./cryptest.exe v
link_image[1936]: 5431 could not load needed library
'./libcryptopp.so' for './cryptest.exe' (reloc_library[1285]: 5431
cannot locate '_ZNSt12__node_alloc11_M_allocateERj'...
)CANNOT LINK EXECUTABLE
And when I check libstlport_shared.so, I see the symbol is there:
riemann::cryptopp$ echo $ANDROID_STL_LIB
/opt/android-ndk-r9/sources/cxx-stl/stlport/libs/armeabi/libstlport_shared.so
riemann::cryptopp$ arm-linux-androideabi-nm -D --defined-only
"$ANDROID_STL_LIB" | grep ZNSt12__node_alloc11_M_allocateERj
00047db4 T _ZNSt12__node_alloc11_M_allocateERj
All components are present on the device:
$ ls -al
drwxrwxr-x shell shell 2013-07-27 22:13 TestData
drwxrwxr-x shell shell 2013-07-27 22:14 TestVectors
-rwxrwxrwx shell shell 15815980 2013-07-28 03:14 cryptest.exe
-rwxrwxrwx shell shell 22659952 2013-07-28 03:13 libcryptopp.so
-rwxrwxrwx shell shell 619972 2013-07-10 22:37 libstlport_shared.so
Any ideas why the runtime link/loader is not finding
ZNSt12__node_alloc11_M_allocateERj from libstlport_shared.so?
Jeff
I'm testing/validating Crypto++ on Android form the command line
(http://www.cryptopp.com/wiki/Android_(Command_Line)).
The Crypto++ library has a driver program named cryptest.exe that
exercises its algorithms. cryptest.exe needs libcryptopp (either
libcryptopp.a or libcryptopp.so); and libcryptopp needs libstlport
(either libstlport_static.a or libstlport_shared.so).
If I use at least one static library (either libcryptopp.a or
libstlport_static.a), then everything works as expected.
If I use all shared objects (libcryptopp.so and libstlport_shared.so),
I get a failure when attempting to run on the device:
shell [ at ] android:/data/local/tmp $ LD_LIBRARY_PATH=./; ./cryptest.exe v
link_image[1936]: 5431 could not load needed library
'./libcryptopp.so' for './cryptest.exe' (reloc_library[1285]: 5431
cannot locate '_ZNSt12__node_alloc11_M_allocateERj'...
)CANNOT LINK EXECUTABLE
And when I check libstlport_shared.so, I see the symbol is there:
riemann::cryptopp$ echo $ANDROID_STL_LIB
/opt/android-ndk-r9/sources/cxx-stl/stlport/libs/armeabi/libstlport_shared.so
riemann::cryptopp$ arm-linux-androideabi-nm -D --defined-only
"$ANDROID_STL_LIB" | grep ZNSt12__node_alloc11_M_allocateERj
00047db4 T _ZNSt12__node_alloc11_M_allocateERj
All components are present on the device:
$ ls -al
drwxrwxr-x shell shell 2013-07-27 22:13 TestData
drwxrwxr-x shell shell 2013-07-27 22:14 TestVectors
-rwxrwxrwx shell shell 15815980 2013-07-28 03:14 cryptest.exe
-rwxrwxrwx shell shell 22659952 2013-07-28 03:13 libcryptopp.so
-rwxrwxrwx shell shell 619972 2013-07-10 22:37 libstlport_shared.so
Any ideas why the runtime link/loader is not finding
ZNSt12__node_alloc11_M_allocateERj from libstlport_shared.so?
Jeff