在RHEL 7上构建mapnik 2.2.0 RPM

时间:2015-06-30 17:47:51

标签: rpmbuild mapnik rhel7

我正在尝试在RHEL / CENTOS 7计算机上构建mapnik 2.2.0 RPM文件。 所以我从Fedora 22获取了RPM SRC文件,即mapnik-2.2.0-11.fc21.src.rpm(我和mapnik-2.2.0-5.fc20.src.rpm有相同的结果) 当我运行rpmbuild时,我收到以下错误消息:

Welcome to Mapnik...

scons: warning: Ignoring missing SConscript 'deps/agg/build.py'
 File "/root/rpmbuild/BUILD/mapnik-v2.2.0/SConstruct", line 1799, in <module>

scons: warning: Ignoring missing SConscript 'deps/mapnik/build.py'
 File "/root/rpmbuild/BUILD/mapnik-v2.2.0/SConstruct", line 1808, in   <module>
 scons: done reading SConscript files.
 scons: Building targets ...
 g++ -o bindings/python/mapnik_building_symbolizer.os -c -ansi -Wall -pthread  -ftemplate-depth-300 -O3 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2  -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fno-strict-aliasing -finline-functions -Wno-inline -Wno-parentheses -Wno-char-subscripts -fPIC -DHAVE_JPEG -DMAPNIK_USE_PROJ4 -DHAVE_PNG -DHAVE_TIFF -DBIGINT -DBOOST_REGEX_HAS_ICU -DLINUX -DMAPNIK_THREADSAFE -DNDEBUG -DHAVE_CAIRO -DHAVE_PYCAIRO -I. -Iinclude -I/usr/include/polyclipping -I/usr/include/agg2 -I/usr/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/gdal -I/usr/include/python2.7 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng15 -I/usr/include/libdrm -I/usr/include/pycairo bindings/python/mapnik_building_symbolizer.cpp
In file included from include/mapnik/symbolizer.hpp:29:0,
             from include/mapnik/building_symbolizer.hpp:29,
             from bindings/python/mapnik_building_symbolizer.cpp:26:
include/mapnik/image_compositing.hpp:74:19: error: 'comp_op_grain_merge' is not a member of 'agg'
 grain_merge = agg::comp_op_grain_merge,
               ^
include/mapnik/image_compositing.hpp:75:21: error: 'comp_op_grain_extract' is not a member of 'agg'
 grain_extract = agg::comp_op_grain_extract,
                 ^
scons: *** [bindings/python/mapnik_building_symbolizer.os] Error 1
scons: building terminated because of errors.
error: Bad exit status from /var/tmp/rpm-tmp.kuI6KW (%build)


RPM build errors:
       Bad exit status from /var/tmp/rpm-tmp.kuI6KW (%build)

1 个答案:

答案 0 :(得分:0)

Mapnik通常在其源代码树中附带一个经过严格修补的AGG库版本。然而,Fedora版本禁用了支持将Mapnik-AGG补丁直接放在其自己的AGG包中(因为他们不喜欢在别处复制系统库)。

您需要一个CentOS的AGG库,它与修补的Fedora版本功能兼容,或者您​​必须修改Mapnik构建以禁用“system_agg”补丁(并从中删除“rm -rf boost deps”) spec文件)。