由于libgeos.so,qgis链接错误

时间:2015-03-31 10:18:52

标签: cmake cross-compiling linker-errors qgis geos

当我尝试使用cmake在linux上构建qgis-2.8.1 for arm时,我收到以下错误:

Linking CXX shared module ../../../output/lib/qgis/plugins/libspatialiteprovider.so
[ 54%] Built target spatialiteprovider
Scanning dependencies of target crssync
[ 54%] Building CXX object src/crssync/CMakeFiles/crssync.dir/main.cpp.o
Linking CXX executable ../../output/bin/crssync
/home/lib/trunk/qgis/../geos/geos-3.3.9-imx53-shared/lib/libgeos_c.so: undefined reference to `std::auto_ptr<geos::geom::Envelope>::auto_ptr(std::auto_ptr_ref<geos::geom::Envelope>)'
/home/lib/trunk/qgis/../geos/geos-3.3.9-imx53-shared/lib/libgeos_c.so: undefined reference to `_ZNSt8auto_ptrIN4geos4geom8EnvelopeEEcvSt12auto_ptr_refIT_EIS2_EEv'

我尝试使用此配置构建qgis:

cmake -G "Unix Makefiles"  
-DCMAKE_SYSTEM_NAME=Linux 
-DCMAKE_INSTALL_PREFIX=/home/lib/trunk/qgis/qgis-2.8.1-imx53-shared
 -DCMAKE_BUILD_TYPE=RELEASE 
-DENABLE_TESTS=NO 
-DWITH_POSTGRESQL=NO 
-DWITH_GRASS=NO 
-DWITH_PY_COMPILE=NO 
-DWITH_BINDINGS=NO 
-DENABLE_QT5=NO 
-DWITH_QWTPOLAR=TRUE 
-DWITH_QSPATIALITE=FALSE 
-DWITH_PYSPATIALITE=FALSE 
-DPROJ_INCLUDE_DIR=/home/lib/trunk/qgis/../proj/proj-4.8.0-imx53-shared/include 
-DPROJ_LIBRARY=/home/lib/trunk/qgis/../proj/proj-4.8.0-imx53-shared/lib/libproj.so 
-DGEOS_CONFIG=/home/lib/trunk/qgis/../geos/geos-3.3.9-imx53-shared/bin/geos-config 
-DGEOS_INCLUDE_DIR=/home/lib/trunk/qgis/../geos/geos-3.3.9-imx53-shared/include 
-DGEOS_LIBRARY=/home/lib/trunk/qgis/../geos/geos-3.3.9-imx53-shared/lib/libgeos_c.so;/home/lib/trunk/qgis/../geos/geos-3.3.9-imx53-shared/lib/libgeos.so 
-DGDAL_CONFIG=/home/lib/trunk/qgis/../gdal/gdal-1.11.2-imx53-shared/bin/gdal-config 
-DGDAL_INCLUDE_DIR=/home/lib/trunk/qgis/../gdal/gdal-1.11.2-imx53-shared/include 
-DGDAL_LIBRARY=/home/lib/trunk/qgis/../gdal/gdal-1.11.2-imx53-shared/lib/libgdal.so;/home/lib/trunk/qgis/../libpng/libpng-1.6.3-imx53-shared/lib/libpng.so;/home/lib/trunk/qgis/../libjpeg/jpeg-6b-imx53-shared/lib/libjpeg.so;/home/lib/trunk/qgis/../libxml2/libxml2-2.7.8-imx53-shared/lib/libxml2.so 
-DGSL_CONFIG=/home/lib/trunk/qgis/../gsl/gsl-1.9-imx53-shared/bin/gsl-config 
-DGSL_INCLUDE_DIR=/home/lib/trunk/qgis/../gsl/gsl-1.9-imx53-shared/include 
-DGSL_LIBRARY=/home/lib/trunk/qgis/../gsl/gsl-1.9-imx53-shared/lib/libgsl.so;/home/lib/trunk/qgis/../gsl/gsl-1.9-imx53-shared/lib/libgslcblas.so 
-DSQLITE3_INCLUDE_DIR=/home/lib/trunk/qgis/../sqlite3/sqlite-3080803-imx53-shared/include 
-DSQLITE3_LIBRARY=/home/lib/trunk/qgis/../sqlite3/sqlite-3080803-imx53-shared/lib/libsqlite3.so 
-DSPATIALITE_INCLUDE_DIR=/home/lib/trunk/qgis/../libspatialite/libspatialite-4.2.0-imx53-shared/include 
-DSPATIALITE_LIBRARY=/home/lib/trunk/qgis/../libspatialite/libspatialite-4.2.0-imx53-shared/lib/libspatialite.so;/home/lib/trunk/qgis/../libspatialite/libspatialite-4.2.0-imx53-shared/lib/mod_spatialite.so;/home/lib/trunk/qgis/../sqlite3/sqlite-3080803-imx53-shared/lib/libsqlite3.so;/home/lib/trunk/qgis/../libiconv/libiconv-1.14-imx53-shared/lib/libcharset.so;/home/lib/trunk/qgis/../libiconv/libiconv-1.14-imx53-shared/lib/libiconv.so 
-DSPATIALINDEX_INCLUDE_DIR=/home/lib/trunk/qgis/../spatialindex/spatialindex-1.7.0-imx53-shared/include 
-DSPATIALINDEX_LIBRARY=/home/lib/trunk/qgis/../spatialindex/spatialindex-1.7.0-imx53-shared/lib/libspatialindex.so;/home/lib/trunk/qgis/../spatialindex/spatialindex-1.7.0-imx53-shared/lib/libspatialindex_c.so 
-DEXPAT_INCLUDE_DIR=/home/lib/trunk/qgis/../expat/expat-2.1.0-imx53-shared/include 
-DEXPAT_LIBRARY=/home/lib/trunk/qgis/../expat/expat-2.1.0-imx53-shared/lib/libexpat.so 
-DQWT_INCLUDE_DIR=/home/lib/trunk/qgis/../qwt/qwt-6.1.1-emb_imx53-shared/include 
-DQWT_LIBRARY=/home/lib/trunk/qgis/../qwt/qwt-6.1.1-emb_imx53-shared/lib/libqwt.so;/home/lib/trunk/qgis/../qwt/qwt-6.1.1-emb_imx53-shared/lib/libqwtmathml.so 
-DQWTPOLAR_INCLUDE_DIR=/home/lib/trunk/qgis/../qwtpolar/qwtpolar-1.1.1-imx53-shared/include 
-DQWTPOLAR_LIBRARY=/home/lib/trunk/qgis/../qwtpolar/qwtpolar-1.1.1-imx53-shared/lib/libqwtpolar.so 
-DCMAKE_SYSTEM_PROCESSOR=/home/toolchain/imx53 -DCMAKE_AR=/home/toolchain/imx53/bin/arm-cortex_a8-linux-gnueabi-ar 
-DCMAKE_RANLIB=/home/toolchain/imx53/bin/arm-cortex_a8-linux-gnueabi-ranlib 
-DCMAKE_NM=/home/toolchain/imx53/bin/arm-cortex_a8-linux-gnueabi-nm 
-DCMAKE_OBJCOPY=/home/toolchain/imx53/bin/arm-cortex_a8-linux-gnueabi-objcopy 
-DCMAKE_OBJDUMP=/home/toolchain/imx53/bin/arm-cortex_a8-linux-gnueabi-objdump 
-DCMAKE_STRIP=/home/toolchain/imx53/bin/arm-cortex_a8-linux-gnueabi-strip 
-DCMAKE_C_COMPILER=/home/toolchain/imx53/bin/arm-cortex_a8-linux-gnueabi-gcc 
-DCMAKE_CXX_COMPILER=/home/toolchain/imx53/bin/arm-cortex_a8-linux-gnueabi-g++

另外,我用这种配置构建了geos-3.3.9:

cmake -G "Unix Makefiles"  
-DCMAKE_SYSTEM_NAME=Linux 
-DCMAKE_INSTALL_PREFIX=/home/lib/trunk/geos/geos-3.3.9-imx53-shared 
-DCMAKE_BUILD_TYPE=RELEASE 
-DGEOS_ENABLE_TESTS=OFF 
-DBUILD_TESTING=OFF 
-DHAVE_LONG_LONG_INT_64=OFF 
-DCMAKE_SYSTEM_PROCESSOR=/home/toolchain/imx53 
-DCMAKE_AR=/home/toolchain/imx53/bin/arm-cortex_a8-linux-gnueabi-ar 
-DCMAKE_RANLIB=/home/toolchain/imx53/bin/arm-cortex_a8-linux-gnueabi-ranlib 
-DCMAKE_NM=/home/toolchain/imx53/bin/arm-cortex_a8-linux-gnueabi-nm 
-DCMAKE_OBJCOPY=/home/toolchain/imx53/bin/arm-cortex_a8-linux-gnueabi-objcopy 
-DCMAKE_OBJDUMP=/home/toolchain/imx53/bin/arm-cortex_a8-linux-gnueabi-objdump 
-DCMAKE_STRIP=/home/toolchain/imx53/bin/arm-cortex_a8-linux-gnueabi-strip 
-DCMAKE_C_COMPILER=/home/toolchain/imx53/bin/arm-cortex_a8-linux-gnueabi-gcc 
-DCMAKE_CXX_COMPILER=/home/toolchain/imx53/bin/arm-cortex_a8-linux-gnueabi-g++

当我看一下qgis的构建错误时,我认为这个问题是由构建的geos的一些配置错误引起的。但我没有找到任何东西。此外,我尝试将地理路径分配给qgis的rpath,没有任何改变。

我不知道为什么会收到此错误。如果有人有想法,请指导我解决这个问题。

感谢。

0 个答案:

没有答案