Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLITE_OMIT_DEPRECATED build flag on Android #82

Open
brodycj opened this issue Dec 31, 2018 · 0 comments
Open

SQLITE_OMIT_DEPRECATED build flag on Android #82

brodycj opened this issue Dec 31, 2018 · 0 comments

Comments

@brodycj
Copy link
Collaborator

brodycj commented Dec 31, 2018

When I tried this flag on sqlcipher / android-database-sqlcipher I got the following errors:

/Users/brodybits/Documents/cbwork/android-database-sqlcipher/android-database-sqlcipher/src/main/obj/local/armeabi/objs/sqlcipher/net_sqlcipher_database_SQLiteDatabase.o: In function `sqlcipher::dbclose(_JNIEnv*, _jobject*)':
/Users/brodybits/Documents/cbwork/android-database-sqlcipher/android-database-sqlcipher/src/main/cpp/net_sqlcipher_database_SQLiteDatabase.cpp:303: undefined reference to `sqlite3_trace'
/Users/brodybits/Documents/cbwork/android-database-sqlcipher/android-database-sqlcipher/src/main/cpp/net_sqlcipher_database_SQLiteDatabase.cpp:308: undefined reference to `sqlite3_profile'
/Users/brodybits/Documents/cbwork/android-database-sqlcipher/android-database-sqlcipher/src/main/obj/local/armeabi/objs/sqlcipher/net_sqlcipher_database_SQLiteDatabase.o: In function `sqlcipher::enableSqlTracing(_JNIEnv*, _jobject*, _jstring*)':
/Users/brodybits/Documents/cbwork/android-database-sqlcipher/android-database-sqlcipher/src/main/cpp/net_sqlcipher_database_SQLiteDatabase.cpp:280: undefined reference to `sqlite3_trace'
/Users/brodybits/Documents/cbwork/android-database-sqlcipher/android-database-sqlcipher/src/main/obj/local/armeabi/objs/sqlcipher/net_sqlcipher_database_SQLiteDatabase.o: In function `sqlcipher::enableSqlProfiling(_JNIEnv*, _jobject*, _jstring*)':
/Users/brodybits/Documents/cbwork/android-database-sqlcipher/android-database-sqlcipher/src/main/cpp/net_sqlcipher_database_SQLiteDatabase.cpp:292: undefined reference to `sqlite3_profile'

As described in https://www.sqlite.org/c3ref/profile.html the solution is for sqlcipher / android-database-sqlcipher to use sqlite3_trace_v2 with SQLITE_TRACE_ constants (https://www.sqlite.org/c3ref/c_trace.html) instead of sqlite3_trace and sqlite3_profile in android-database-sqlcipher/src/main/cpp/net_sqlcipher_database_SQLiteDatabase.cpp .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant