libspatialite在linux上构建错误

时间:2016-08-27 02:37:51

标签: linux build compiler-errors

我正在尝试为Android构建libspatialite。源代码来自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]# 

1 个答案:

答案 0 :(得分:0)

基于提到的错误,似乎编译器无法解析依赖性。尝试导出这样的环境变量并重新配置。

db.collection('notifications').update(
    { "_id": notificationId, "notificationDetails.isRed": true },
    { "$set": { "notificationDetails.$.isRed": false } },
    function(err, results) {
        callback();
    }
);

我在编译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" 代码时也遇到了问题。通过提供这些详细信息,我能够成功构建。