我正在尝试为node-mapnik构建occi插件。我的目的是在tilelive-bridge节点模块的node-mapnik安装中使用该插件。
下面是我首先做的:
git clone https://github.com/mapnik/mapnik --depth 5
cd mapnik
git submodule update --init这样做之后,我可以使用以下命令构建postgis插件:
python scons/scons.py INPUT_PLUGINS='postgis'生成的postgis.input文件位于plugins/input目录中。
'occi':{'default':False,'path':'OCCI','inc':'occi.h','lib':'clntsh','lang':'C++'},然后,我编辑了config.py文件并添加了以下内容:
OCCI_INCLUDES = '/usr/lib/oracle/10.2.0.3/client/include'
OCCI_LIBS = '/usr/lib/oracle/10.2.0.3/client'另外,我更改了这一行:
PathVariable('OCCI_LIBS', 'Search path for OCCI library files', '/usr/lib/oracle/10.2.0.3/client' + LIBDIR_SCHEMA_DEFAULT, PathVariable.PathAccept),转到
PathVariable('OCCI_LIBS', 'Search path for OCCI library files', '/usr/lib/oracle/10.2.0.3/client', PathVariable.PathAccept),然后我将这3行代码添加到~/.bashrc:
export ORACLE_HOME=/usr/lib/oracle/10.2.0.3/client
export PATH=$ORACLE_HOME:$PATH
export LD_LIBRARY_PATH=/usr/lib/oracle/10.2.0.3/client然后我输入:
source ~/.bashrc并转到mapnik文件夹以运行构建:
python scons/scons.py INPUT_PLUGINS='occi'上面写着:
Checking for C++ library clntsh... yes但它并没有说:
Checking for C++ library ociei... yes就像github中mapnik的wiki的occi页面所显示的那样。
我得到的错误是:
In file included from plugins/input/occi/occi_datasource.cpp:24:0:
plugins/input/occi/occi_featureset.hpp:55:43: error: ‘geometry_type’ in namespace ‘mapnik’ does not name a type
const mapnik::geometry_type::types& geom_type,
^
plugins/input/occi/occi_featureset.hpp:55:63: error: expected unqualified-id before ‘&’ token
const mapnik::geometry_type::types& geom_type,
^
plugins/input/occi/occi_featureset.hpp:55:63: error: expected ‘)’ before ‘&’ token
plugins/input/occi/occi_featureset.hpp:55:63: error: expected ‘;’ at end of member declaration
plugins/input/occi/occi_featureset.hpp:55:65: error: ‘geom_type’ does not name a type
const mapnik::geometry_type::types& geom_type,
^
plugins/input/occi/occi_featureset.hpp:61:38: error: ‘mapnik::geometry_type’ has not been declared
void fill_geometry_type (mapnik::geometry_type* geom,
^
scons: *** [plugins/input/occi/occi_datasource.os] Error 1
scons: building terminated because of errors.Tilelive-bridge没有附带带有occi插件的mapnik安装,而且在移除occi支持之前的版本无法编译。
你能告诉我我错过了什么吗?
提前感谢大家的帮助
发布于 2016-11-04 21:38:00
事实证明,OCCI插件甚至不能与该版本的Mapnik一起工作。如果我想获得Oracle Spatial Database Connectivity,我必须使用OGR插件。
https://stackoverflow.com/questions/40285506
复制相似问题