Re: [sqlite] __gnu_strerror_r undefined when building for android api-24, no issue with api-22

2018-04-13 Thread Frank van Vugt
L.S.

Op vrijdag 13 april 2018 12:18:52 CEST schreef Frank van Vugt:
> Probably the unified headers in NDK are to blame as well, but:
> * when using ndk r16b to build sqlite for api-24 then the resulting library
> has __gnu_strerror_r unresolved

Oh, one addition: the toolchain used has been built using '--stl=libc++', since 
gnustl has 
been deprecated for a while now and beginning with NDKr16 libc++ should be used.






Best, 



Frank.

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] __gnu_strerror_r undefined when building for android api-24, no issue with api-22

2018-04-13 Thread Frank van Vugt
L.S.

Probably the unified headers in NDK are to blame as well, but:

* when using ndk r16b to build sqlite for api-22 then the resulting library 
has no issues

* when using ndk r16b to build sqlite for api-24 then the resulting library 
has __gnu_strerror_r unresolved


Relevant info on building:

export CC=clang 
export CPPFLAGS="-DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_STAT4 -
DSQLITE_DEFAULT_FOREIGN_KEYS=1 -DSQLITE_ENABLE_JSON1=1 -
DSQLITE_ENABLE_COLUMN_METADATA=1" 

$SQLITESRCDIR/configure --host=arm-linux-androideabi --enable-threadsafe



The relevant part of /sysroot/usr/include/string.h:129

#if defined(__USE_GNU) && __ANDROID_API__ >= 23 
char* strerror_r(int __errno_value, char* __buf, size_t __n) 
__RENAME(__gnu_strerror_r) __INTRODUCED_IN(23); 
#else /* POSIX */ 
int strerror_r(int __errno_value, char* __buf, size_t __n); 
#endif


The relevant parts in sqlite.c can be found by looking for strerror_r



Obviously it'd be nice to be able to build and use sqlite in serialized mode 
for Android api-24 and up 'just like that' ;)



-- 

Best,




Frank.

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users