I’m developing (in Qt/ C++) a simple application that will run in mobile devices.
The goal of this future app is to give, in "real
time", the pk of a roadway based on GPS location and a table of routes.
Until now we work with PostgreSQL/Postgis (desktop only), but we want to start using Sqlite/Spatialite for mobile.
I don't have experience neither background in c/c++ programming.
The problem is building Spatialite for Android.
Well, because I'm developing in C++, I just only need to Cross Compile Spatialite (target aarch64 in my case)...
It's very important to have the latest binaries because of this issue https://www.gaia-gis.it/fossil/libspatialite/info/6763032337d71a2a
I've followed the NDK instructions from de NDK developers page https://developer.android.com/ndk/guides/other_build_systems for Autoconf projects.
I' ve setup a Linux VM (CentOS7) with Development Tools and Android NDK installed.
In that machine I've already build (cross compile) with success simple libraries (without dependencies), like sqlite. Thus, it’s a good sign... :-)
I've already cross compiled geos library (version 3.7.2) with success.
When trying to build librttopo (that depends of libgeos), the configure script exits with error " configure: error: could not find libgeos_c (or obsolete 'libgeos_c' < v.3.5.0 found) - you may need to specify the directory of a geos-config file using --with-geosconfig"
I'm absolute sure that geos is version 3.7.2...
The invocation of configure script was:
./configure --prefix=/home/pgalrica/build_local_android --with-geosconfig=/home/pgalrica/build_local_android/bin/geos-config --host aarch64-linux-android
Digging through configure.log, I see 2 different problems:
First problem:
"/home/pgalrica/sources/librttopo/conftest.c:65: undefined reference to `GEOSContext_setErrorMessageHandler_r'
clang: error: linker command failed with exit code 1 (use -v to see invocation)"
Second problem: warnings that libc++_shared.so and libm.so were not found followed by a bunch of undefined references associated to libgeos_c.so
"/home/pgalrica/LocalTools/android-ndk-r20/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: warning: libc++_shared.so, needed by /home/pgalrica/build_local_android/lib/libgeos_c.so, not found (try using -rpath or -rpath-link)
/home/pgalrica/LocalTools/android-ndk-r20/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: warning: libm.so, needed by /home/pgalrica/build_local_android/lib/libgeos_c.so, not found (try using -rpath or -rpath-link)
/home/pgalrica/build_local_android/lib/libgeos_c.so: undefined reference to `std::__ndk1::ctype<char>::id' "
(....... and so on so on .....)
Can you help me? Some tips to cross compile or update spatialite library for the latest sources.
Thank you very much
Pedro
The problem is building Spatialite for Android.Well, because I'm developing in C++, I just only need to Cross Compile Spatialite (target aarch64 in my case)...
It's very important to have the latest binaries because of this issue https://www.gaia-gis.it/fossil/libspatialite/info/6763032337d71a2a
I've followed the NDK instructions from de NDK developers page https://developer.android.com/ndk/guides/other_build_systems for Autoconf projects.
I' ve setup a Linux VM (CentOS7) with Development Tools and Android NDK installed.
In that machine I've already build (cross compile) with success simple libraries (without dependencies), like sqlite. Thus, it’s a good sign... :-)
I've already cross compiled geos library (version 3.7.2) with success.
When trying to build librttopo (that depends of libgeos), the configure script exits with error " configure: error: could not find libgeos_c (or obsolete 'libgeos_c' < v.3.5.0 found) - you may need to specify the directory of a geos-config file using --with-geosconfig"
I'm absolute sure that geos is version 3.7.2...
The invocation of configure script was:
./configure --prefix=/home/pgalrica/build_local_android --with-geosconfig=/home/pgalrica/build_local_android/bin/geos-config --host aarch64-linux-android
Digging through configure.log, I see 2 different problems:
First problem:
"/home/pgalrica/sources/librttopo/conftest.c:65: undefined reference to `GEOSContext_setErrorMessageHandler_r'
clang: error: linker command failed with exit code 1 (use -v to see invocation)"
Second problem: warnings that libc++_shared.so and libm.so were not found followed by a bunch of undefined references associated to libgeos_c.so
"/home/pgalrica/LocalTools/android-ndk-r20/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: warning: libc++_shared.so, needed by /home/pgalrica/build_local_android/lib/libgeos_c.so, not found (try using -rpath or -rpath-link)
/home/pgalrica/LocalTools/android-ndk-r20/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: warning: libm.so, needed by /home/pgalrica/build_local_android/lib/libgeos_c.so, not found (try using -rpath or -rpath-link)
/home/pgalrica/build_local_android/lib/libgeos_c.so: undefined reference to `std::__ndk1::ctype<char>::id' "
(....... and so on so on .....)
Can you help me? Some tips to cross compile or update spatialite library for the latest sources.
Thank you very much
Pedro
--
You received this message because you are subscribed to the Google Groups "geopaparazzi-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geopaparazzi-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geopaparazzi-devel/b8298780-23c0-4a31-8d3e-b5baaa53e140%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Pedro,[...]
To unsubscribe from this group and stop receiving emails from it, send an email to geopaparazzi-devel+unsub...@googlegroups.com.
Hi Pedro,[...]
To unsubscribe from this group and stop receiving emails from it, send an email to geopaparazzi-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geopaparazzi-devel/b8298780-23c0-4a31-8d3e-b5baaa53e140%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "geopaparazzi-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geopaparazzi-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geopaparazzi-devel/cafe6a29-750e-44ba-b0ad-ab15c826e03b%40googlegroups.com.
Hi Pedro,[...]
To unsubscribe from this group and stop receiving emails from it, send an email to geopaparazzi-devel+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geopaparazzi-devel/b8298780-23c0-4a31-8d3e-b5baaa53e140%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "geopaparazzi-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geopaparazzi-devel+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geopaparazzi-devel/CACck5jNr4NNW%2BgUt-Nn0b5cysKk18WrhnpYcZbTeLdeh0u23EA%40mail.gmail.com.
>>>>>>> To unsubscribe from this group and stop receiving emails from it, send an email to geopaparazzi-devel+unsub...@googlegroups.com.
>>>>>>> To view this discussion on the web visit https://groups.google.com/d/msgid/geopaparazzi-devel/b8298780-23c0-4a31-8d3e-b5baaa53e140%40googlegroups.com.
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google Groups "geopaparazzi-devel" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send an email to geopaparazzi-devel+unsub...@googlegroups.com.
>>>>> To view this discussion on the web visit https://groups.google.com/d/msgid/geopaparazzi-devel/cafe6a29-750e-44ba-b0ad-ab15c826e03b%40googlegroups.com.
>>>>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups "geopaparazzi-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to geopaparazzi-devel+unsub...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/geopaparazzi-devel/af346d5a-047a-451b-abfb-f63dec1532bb%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "geopaparazzi-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geopaparazzi-devel+unsub...@googlegroups.com.