SQLite for android

596 views
Skip to first unread message

Iliya Koreshev

unread,
Apr 20, 2017, 10:55:45 AM4/20/17
to android-ndk
Hey all,
Just recently started having issues pre-compiling sqlite with ndk-build.

/Users/ik/Library/Android/sdk/ndk-bundle/ndk-build


Android NDK: APP_PLATFORM not set. Defaulting to minimum supported version android-14.    


make[1]: Entering directory `/Users/ik/Downloads/sqlite3-android-master'


[armeabi] Compile thumb  : sqlite3-dynamic-cli <= shell.c


[armeabi] Compile thumb  : sqlite3-dynamic-cli <= sqlite3.c


jni/../build/sqlite3.c:30300:42: error: use of undeclared identifier 'mmap'


  { "mmap",         (sqlite3_syscall_ptr)mmap,            0 },


                                         ^


jni/../build/sqlite3.c:30377:22: error: invalid application of 'sizeof' to an incomplete type 'struct unix_syscall []'


    for(i=0; i<sizeof(aSyscall)/sizeof(aSyscall[0]); i++){


                     ^~~~~~~~~~


jni/../build/sqlite3.c:30386:22: error: invalid application of 'sizeof' to an incomplete type 'struct unix_syscall []'


    for(i=0; i<sizeof(aSyscall)/sizeof(aSyscall[0]); i++){


                     ^~~~~~~~~~


jni/../build/sqlite3.c:30413:20: error: invalid application of 'sizeof' to an incomplete type 'struct unix_syscall []'


  for(i=0; i<sizeof(aSyscall)/sizeof(aSyscall[0]); i++){


                   ^~~~~~~~~~


jni/../build/sqlite3.c:30430:16: error: invalid application of 'sizeof' to an incomplete type 'struct unix_syscall []'


    for(i=0; i<ArraySize(aSyscall)-1; i++){


               ^~~~~~~~~~~~~~~~~~~


jni/../build/sqlite3.c:12057:38: note: expanded from macro 'ArraySize'


#define ArraySize(X)    ((int)(sizeof(X)/sizeof(X[0])))


                                     ^~~


jni/../build/sqlite3.c:30434:14: error: invalid application of 'sizeof' to an incomplete type 'struct unix_syscall []'


  for(i++; i<ArraySize(aSyscall); i++){


             ^~~~~~~~~~~~~~~~~~~


jni/../build/sqlite3.c:12057:38: note: expanded from macro 'ArraySize'


#define ArraySize(X)    ((int)(sizeof(X)/sizeof(X[0])))


                                     ^~~


6 errors generated.


make[1]: *** [obj/local/armeabi/objs/sqlite3-dynamic-cli/__/build/sqlite3.o] Error 1


make[1]: Leaving directory `/Users/ik/Downloads/sqlite3-android-master'


make: *** [libs/armeabi/sqlite3-static] Error 2


Any tips/suggestions on what might be breaking sqlite with ndk-build, specifically why it can no longer find mmap? Nothing has changed on my end, as far as I can tell, other than updating ndk a week or so ago.

Dan Albert

unread,
Apr 20, 2017, 3:32:05 PM4/20/17
to android-ndk

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+unsubscribe@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/fb250364-4f33-4baf-bd93-13af39d24977%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages