libmx3 / mx3

a sample project showcasing/collecting cross platform techniques on mobile
MIT License
1.17k stars 149 forks source link

Android build failure #53

Closed dixitpeeyush closed 9 years ago

dixitpeeyush commented 9 years ago

make android is failing with below error:

[x86_64] Compile++      : mx3_android <= native_api.cpp
../../deps/sqlite3/sqlite3.c: In function 'sqlite3TempInMemory':
../../deps/sqlite3/sqlite3.c:121876:55: error: unused parameter 'db' [-Werror=unused-parameter]
SQLITE_PRIVATE int sqlite3TempInMemory(const sqlite3 *db){
                                                   ^
 [mips64] Compile++      : mx3_android <= jni_main.cpp
../../deps/sqlite3/sqlite3.c: In function 'sqlite3TempInMemory':
../../deps/sqlite3/sqlite3.c:121876:55: error: unused parameter 'db' [-Werror=unused-parameter]
 SQLITE_PRIVATE int sqlite3TempInMemory(const sqlite3 *db){
                                                   ^

[armeabi] Compile++ thumb: mx3_android <= native_api.cpp
../../deps/sqlite3/sqlite3.c: In function 'sqlite3TempInMemory':
../../deps/sqlite3/sqlite3.c:121876:55: error: unused parameter 'db' [-Werror=unused-parameter]
SQLITE_PRIVATE int sqlite3TempInMemory(const sqlite3 *db){
                                                   ^

../../deps/sqlite3/sqlite3.c: At top level:
cc1: error: unrecognized command line option "-Wno-unused-const-variable" [-Werror]
cc1: all warnings being treated as errors

SQLITE_TEMP_STORE=3 define is triggering the unused parameter warning which -Werror is forcing as error. Wno-unused-const-variable is unrecognized. As a workaround, I tried removing -Werror from common.gypi and was able to build successfully but with unused parameter warnings.

skabbes commented 9 years ago

Thank you. Really wish travis-ci supported android ndk. I updated with a fix here:

https://github.com/libmx3/mx3/commit/39e449a9250bb6c8c3eac599f3c10beeb009f01f