Redhat 6.2上的QGIS 2.4编译错误

时间:2015-06-15 09:59:57

标签: compilation installation redhat qgis

我尝试在Redhat 6.2服务器上从头开始编译QGIS 2.4(也就是源代码)(请不要问我为什么......)。

我已经安装了所有先决条件,应用了补丁0001-Fix-build-failure-with-gcc-4.4-bug-10762.patch(在此之后:https://hub.qgis.org/attachments/7755/0001-Fix-build-failure-with-gcc-4.4-bug-10762.patch)并使用INSTALL配置QGis文件:

mkdir build-master
ccmake ..
<configure>
make

不幸的是,我有以下

$ make
[  0%] Built target version
Linking CXX shared library ../../output/lib/libqgis_core.so
CMakeFiles/qgis_core.dir/qgsgml.cpp.o: In function `QgsGml::getFeatures(QString const&, QGis::WkbType*, QgsRectangle*, QString const&, QString const&)':
qgsgml.cpp:(.text+0x9d8): undefined reference to `XML_ParserCreateNS'
qgsgml.cpp:(.text+0x9f2): undefined reference to `XML_SetUserData'
qgsgml.cpp:(.text+0xa0f): undefined reference to `XML_SetElementHandler'
qgsgml.cpp:(.text+0xa25): undefined reference to `XML_SetCharacterDataHandler'
qgsgml.cpp:(.text+0x11fd): undefined reference to `XML_Parse'
qgsgml.cpp:(.text+0x1216): undefined reference to `XML_GetErrorCode'
qgsgml.cpp:(.text+0x1251): undefined reference to `XML_GetCurrentColumnNumber'
qgsgml.cpp:(.text+0x128c): undefined reference to `XML_GetCurrentLineNumber'
qgsgml.cpp:(.text+0x12c5): undefined reference to `XML_ErrorString'
qgsgml.cpp:(.text+0x179a): undefined reference to `XML_ParserFree'
CMakeFiles/qgis_core.dir/qgsgml.cpp.o: In function `QgsGml::getFeatures(QByteArray const&, QGis::WkbType*, QgsRectangle*)':
qgsgml.cpp:(.text+0x18ac): undefined reference to `XML_ParserCreateNS'
qgsgml.cpp:(.text+0x18c3): undefined reference to `XML_SetUserData'
qgsgml.cpp:(.text+0x18e0): undefined reference to `XML_SetElementHandler'
qgsgml.cpp:(.text+0x18f6): undefined reference to `XML_SetCharacterDataHandler'
qgsgml.cpp:(.text+0x1932): undefined reference to `XML_Parse'
CMakeFiles/qgis_core.dir/qgsgmlschema.cpp.o: In function `QgsGmlSchema::guessSchema(QByteArray const&)':
qgsgmlschema.cpp:(.text+0x3452): undefined reference to `XML_ParserCreateNS'
qgsgmlschema.cpp:(.text+0x346c): undefined reference to `XML_SetUserData'
qgsgmlschema.cpp:(.text+0x3489): undefined reference to `XML_SetElementHandler'
qgsgmlschema.cpp:(.text+0x349f): undefined reference to `XML_SetCharacterDataHandler'
qgsgmlschema.cpp:(.text+0x34e1): undefined reference to `XML_Parse'
qgsgmlschema.cpp:(.text+0x34fa): undefined reference to `XML_GetErrorCode'
qgsgmlschema.cpp:(.text+0x3501): undefined reference to `XML_ErrorString'
collect2: ld returned 1 exit status
make[2]: *** [output/lib/libqgis_core.so.2.4.0] Error 1
make[1]: *** [src/core/CMakeFiles/qgis_core.dir/all] Error 2
make: *** [all] Error 2

看起来它没有在/ usr / local中找到expat lib:

$ ll /usr/local/include/expat*
-rw-r--r--. 1 root root  3364 Jun 15 10:21 /usr/local/include/expat_external.h
-rw-r--r--. 1 root root 41752 Jun 15 10:21 /usr/local/include/expat.h
$ ll /usr/local/lib/libexpat.*
-rw-r--r--. 1 root root 711896 Jun 15 10:21 /usr/local/lib/libexpat.a
-rwxr-xr-x. 1 root root    942 Jun 15 10:21 /usr/local/lib/libexpat.la
lrwxrwxrwx. 1 root root     17 Jun 15 10:21 /usr/local/lib/libexpat.so -> libexpat.so.1.6.0
lrwxrwxrwx. 1 root root     17 Jun 15 10:21 /usr/local/lib/libexpat.so.1 -> libexpat.so.1.6.0
-rwxr-xr-x. 1 root root 440095 Jun 15 10:21 /usr/local/lib/libexpat.so.1.6.0

有什么想法吗?

提前致谢。

1 个答案:

答案 0 :(得分:0)

找到了一份工作。

compil期间不包括expat lib。

cd build-master
find src/ -name link.txt | xargs -0 sed -i '' -e 's/\-lsqlite3/\-lsqlite3\ \-lexpat/g'
make