我正在尝试为Android构建libspatialite.source来自https://www.gaia-gis.it/fossil/libspatialite/index,可通过libspatialite-4.4.0-RC0.tar.gz获得.PROJ,GEOS,SQLite3之类的所有依赖项均已成功安装在linux上。

./configure --build=x86_64-pc-linux-gnu --host=arm-linux-eabi
Errors

checking for sqlite3_prepare_v2 in -lsqlite3... no
configure: error: 'libsqlite3' is required but it doesn't seem to be installed on this system
However, I can see the libsqlite3 in libs directory.

[root@euro libspatialite-4.4.0-RC1]# locate libsqlite3
/home/gis/Desktop/Softwares/FWTools-linux-x86_64-3.0.6/usr/lib64/libsqlite3.so.0
/home/gis/Desktop/Softwares/FWTools-linux-x86_64-3.0.6/usr/lib64/libsqlite3.so.0.8.6
/home/gis/spatialdb/libspatialite-4.4.0-RC1/libsqlite3.la
/home/gis/spatialdb/sqlite-autoconf-3140000/libsqlite3.la
/home/gis/spatialdb/sqlite-autoconf-3140000/.libs/libsqlite3.a
/home/gis/spatialdb/sqlite-autoconf-3140000/.libs/libsqlite3.la
/home/gis/spatialdb/sqlite-autoconf-3140000/.libs/libsqlite3.lai
/usr/lib/libsqlite3.a
/usr/lib/libsqlite3.la
/usr/lib/libsqlite3.so.0
/usr/lib/libsqlite3.so.0.8.6
/usr/lib64/libsqlite3.so
/usr/lib64/libsqlite3.so.0
/usr/lib64/libsqlite3.so.0.8.6
/usr/local/lib/libsqlite3.a
/usr/local/lib/libsqlite3.la
[root@euro libspatialite-4.4.0-RC1]#

最佳答案

根据提到的错误,看来编译器无法解决依赖性。尝试像这样导出环境变量并重新配置。

export CROSS_COMPILE="arm-linux-eabi"
export AR=${CROSS_COMPILE}-ar
export AS=${CROSS_COMPILE}-as
export LD=${CROSS_COMPILE}-ld
export RANLIB=${CROSS_COMPILE}-ranlib
export CC=${CROSS_COMPILE}-gcc
export NM=${CROSS_COMPILE}-nm
export LDFLAGS="-L/home/ak/<lib_1>/lib -L/home/ak/<lib_2>/lib"
export LIBS="-l1 -l2"

在编译curl代码时,我也遇到了问题。通过提供这些详细信息,我能够成功构建。

关于linux - libspatialite在Linux上生成错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/39176924/

10-13 05:23