It looks as if the value from faketime may be causing an issue with your build. Could you try removing faketime from your PATH and attempt a new build?
Can you run specific sub tasks? What is the output from executing make build-external? Do you have a specific need for building SQLCipher for Android from source, or is the distributed .aar package acceptable?
Hello,
Below is the output of executing ‘make build-external’.
Because our APP using sqlcipher crashed at Android 6.0, so we try to find the latest version of sqlcipher, but there is no binary file to download from sqlcipher official website.
What is the distributed .aar package? Could you give me some infomation about this.
Many thanks
which: no faketime in (/usr/local/rvm/gems/ruby-1.9.3-p547/bin:/usr/local/rvm/gems/ruby-1.9.3-p547@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p547/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/rvm/bin:/home/adminuser/bin:/home/adminuser/Documents/sqlcipher/jdk1.7.0_80/bin:/home/adminuser/Documents/sqlcipher/android-ndk-r9d:/home/adminuser/Documents/sqlcipher/android-sdk-linux/build-tools/23.0.2:/home/adminuser/Documents/sqlcipher/android-sdk-linux/tools)
cd /home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external &&
make -f Android.mk build-local-hack &&
ndk-build NDK_LIBS_OUT=/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/libs &&
make -f Android.mk copy-libs-hack
make[1]: Entering directory /home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external' make[1]: Nothing to be done forbuild-local-hack’.
make[1]: Leaving directory /home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external' Android NDK: WARNING:/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/Android.mk:icui18n: LOCAL_LDLIBS is always ignored for static libraries Android NDK: WARNING:/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/Android.mk:icui18n: non-system libraries in linker flags: -lpthread Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the Android NDK: current module Android NDK: WARNING:/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/Android.mk:icuuc: LOCAL_LDLIBS is always ignored for static libraries Android NDK: WARNING:/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/Android.mk:icuuc: non-system libraries in linker flags: -lpthread Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the Android NDK: current module Android NDK: WARNING:/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/Android.mk:sqlcipher: LOCAL_LDFLAGS is always ignored for static libraries make[1]: Entering directory/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external’
/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/Android.mk:16: warning: overriding commands for target sqlcipher/sqlite3.c' /home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/Android.mk:16: warning: ignoring old commands for targetsqlcipher/sqlite3.c’
/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/Android.mk:20: warning: overriding commands for target copy-libs-hack' /home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/Android.mk:20: warning: ignoring old commands for targetcopy-libs-hack’
Android NDK: WARNING:/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/Android.mk:icui18n: LOCAL_LDLIBS is always ignored for static libraries
Android NDK: WARNING:/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/Android.mk:icui18n: non-system libraries in linker flags: -lpthread
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
Android NDK: WARNING:/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/Android.mk:icuuc: LOCAL_LDLIBS is always ignored for static libraries
Android NDK: WARNING:/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/Android.mk:icuuc: non-system libraries in linker flags: -lpthread
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
Android NDK: WARNING:/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/Android.mk:sqlcipher: LOCAL_LDFLAGS is always ignored for static libraries
/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/Android.mk:16: warning: overriding commands for target sqlcipher/sqlite3.c' /home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/Android.mk:16: warning: ignoring old commands for targetsqlcipher/sqlite3.c’
/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/Android.mk:20: warning: overriding commands for target copy-libs-hack' /home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/Android.mk:20: warning: ignoring old commands for targetcopy-libs-hack’
Android NDK: WARNING:/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/Android.mk:icui18n: LOCAL_LDLIBS is always ignored for static libraries
Android NDK: WARNING:/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/Android.mk:icui18n: non-system libraries in linker flags: -lpthread
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
Android NDK: WARNING:/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/Android.mk:icuuc: LOCAL_LDLIBS is always ignored for static libraries
Android NDK: WARNING:/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/Android.mk:icuuc: non-system libraries in linker flags: -lpthread
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
Android NDK: WARNING:/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/Android.mk:sqlcipher: LOCAL_LDFLAGS is always ignored for static libraries
[armeabi] Compile++ thumb: sqlcipher_android <= sqlite3_android.cpp
In file included from /home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/android-sqlite/android/sqlite3_android.cpp:30:0:
/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/android-sqlite/android/sqlite3_android.h:26:32: error: ‘sqlite3’ was not declared in this scope
/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/android-sqlite/android/sqlite3_android.h:26:42: error: ‘handle’ was not declared in this scope
/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/android-sqlite/android/sqlite3_android.h:26:50: error: expected primary-expression before ‘int’
/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/android-sqlite/android/sqlite3_android.h:26:66: error: expression list treated as compound expression in initializer [-fpermissive]
/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/android-sqlite/android/sqlite3_android.h:28:34: error: ‘sqlite3’ was not declared in this scope
/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/android-sqlite/android/sqlite3_android.h:28:43: error: ‘handle’ was not declared in this scope
/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/android-sqlite/android/sqlite3_android.h:28:51: error: expected primary-expression before ‘const’
/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/android-sqlite/android/sqlite3_android.h:28:77: error: expected primary-expression before ‘int’
/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/android-sqlite/android/sqlite3_android.h:28:93: error: expression list treated as compound expression in initializer [-fpermissive]
/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/android-sqlite/android/sqlite3_android.cpp:80:5: error: variable or field ‘get_phonebook_index’ declared void
/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/android-sqlite/android/sqlite3_android.cpp:80:5: error: ‘sqlite3_context’ was not declared in this scope
/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/android-sqlite/android/sqlite3_android.cpp:80:23: error: ‘context’ was not declared in this scope
/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/android-sqlite/android/sqlite3_android.cpp:80:32: error: expected primary-expression before ‘int’
/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/android-sqlite/android/sqlite3_android.cpp:80:42: error: ‘sqlite3_value’ was not declared in this scope
/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external/android-sqlite/android/sqlite3_android.cpp:80:59: error: ‘argv’ was not declared in this scope
make[1]: *** [/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/obj/local/armeabi/objs/sqlcipher_android/android-sqlite/android/sqlite3_android.o] Error 1
make[1]: Leaving directory `/home/adminuser/Documents/sqlcipher/android-database-sqlcipher/external’
make: *** [build-external] Error 2
The community version is now distributed as an AAR package. More information about our latest release using AAR can be found here. Would you try deleting the SQLCipher for Android directory and clone it again, to verify there wasn’t an issue with the initial clone? I’m wondering if there was an issue when you initialized the submodules.
Hello,
Thank you for your reply. I clean all file and try make init, make again. This time it works. Finally it outputs the files we want. I guess at my first time, the build procedure is failed many times and I just add the missing library like glibc, ant etc. and try again.
Now I have another problem, when I build a sqlcipher sample project , it will work perfectly. But my app will load two NDK library, one is sqlcipher, the other is a VoIP library. In my project sqlcipher still have the same error below. Could you have any idea to help me to solve this situation?
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol “_ZN7android25gDarwinCantLoadAllObjectsE” referenced by “/data/app/com.cht.chtphone-1/lib/arm/libsqlcipher_android.so”…