无法在openSUSE上构建mod_tile [英] not able to build mod_tile on openSUSE

查看:107
本文介绍了无法在openSUSE上构建mod_tile的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试按照链接

然后我遇到了同样的错误 并尝试从此论坛

then i was getting the same error and tried came got the fix from this forum

我导出了这些

export CXXFLAGS="$(mapnik-config --cflags)"
export LDFLAGS="$(mapnik-config --ldflags)"

在src/gen_tile.cpp顶部添加#include

adding #include at the top of src/gen_tile.cpp

并使用--std = gnu ++ 11

and changed the Makefile with --std=gnu++11

我是linux和cpp的新手

and i'm new to the linux and the cpp

Making all in iniparser3.0b
make[1]: Entering directory `/root/src/mod_tile/iniparser3.0b'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/src/mod_tile/iniparser3.0b'
make[1]: Entering directory `/root/src/mod_tile'
depbase=`echo src/gen_tile.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I. -I./includes  -I/usr/include/freetype2  -I/usr/local/include -I/usr/local/include/mapnik/agg -I/opt/PostgreSQL/9.3/include -I/usr/include -I/usr/include/freetype2 -I/usr/include/libxml2 -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/libdrm -I/usr/include/libpng12 -I/usr/include  -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/freetype2 -I/usr/include/libdrm -I/usr/include/libpng12   -DSYSTEM_LIBINIPARSER=0   -I/usr/local/include -I/usr/local/include/mapnik/agg -I/opt/PostgreSQL/9.3/include -I/usr/include -I/usr/include/freetype2 -I/usr/include/libxml2 -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/libdrm -I/usr/include/libpng12 -DSHAPE_MEMORY_MAPPED_FILE -DBIGINT -DBOOST_REGEX_HAS_ICU -DHAVE_JPEG -DMAPNIK_USE_PROJ4 -DHAVE_PNG -DHAVE_TIFF -DLINUX -DMAPNIK_THREADSAFE -DBOOST_SPIRIT_NO_PREDEFINED_TERMINALS=1 -DBOOST_PHOENIX_NO_PREDEFINED_TERMINALS=1 -DBOOST_SPIRIT_USE_PHOENIX_V3=1 -DNDEBUG -DHAVE_CAIRO -DGRID_RENDERER -DHAVE_LIBXML2 -std=c++11 -Wall -Wsign-compare -pthread -ftemplate-depth-300 -Wno-pragmas -O3 -MT src/gen_tile.o -MD -MP -MF $depbase.Tpo -c -o src/gen_tile.o src/gen_tile.cpp &&\
mv -f $depbase.Tpo $depbase.Po
src/gen_tile.cpp: In function ‘void parameterize_map_max_connections(mapnik::Map&, int)’:
src/gen_tile.cpp:180:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (i = 0; i < m.layer_count(); i++) {
                                   ^
src/gen_tile.cpp:181:22: error: ‘class mapnik::Map’ has no member named ‘getLayer’
         layer& l = m.getLayer(i);
                      ^
src/gen_tile.cpp:182:43: error: invalid use of incomplete type ‘class mapnik::datasource’
         parameters params = l.datasource()->params();
                                           ^
In file included from src/gen_tile.cpp:1:0:
/usr/local/include/mapnik/layer.hpp:37:7: error: forward declaration of ‘class mapnik::datasource’
 class datasource;
       ^
src/gen_tile.cpp:188:9: error: ‘shared_ptr’ is not a member of ‘boost’
         boost::shared_ptr<datasource> ds = datasource_cache::instance().create(params);
         ^
src/gen_tile.cpp:188:9: note: suggested alternative:
In file included from /usr/include/c++/4.8/bits/shared_ptr.h:52:0,
                 from /usr/include/c++/4.8/memory:82,
                 from /usr/local/include/mapnik/layer.hpp:32,
                 from src/gen_tile.cpp:1:
/usr/include/c++/4.8/bits/shared_ptr_base.h:261:11: note:   ‘std::shared_ptr’
     class shared_ptr;
           ^
src/gen_tile.cpp:188:37: error: expected primary-expression before ‘>’ token
         boost::shared_ptr<datasource> ds = datasource_cache::instance().create(params);
                                     ^
src/gen_tile.cpp:188:39: error: ‘ds’ was not declared in this scope
         boost::shared_ptr<datasource> ds = datasource_cache::instance().create(params);
                                       ^
src/gen_tile.cpp: In function ‘protoCmd render(xmlmapconfig*, int, int, int, char*, metaTile&)’:
src/gen_tile.cpp:259:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (yy = 0; yy < render_size_ty; yy++) {
                       ^
src/gen_tile.cpp:260:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (xx = 0; xx < render_size_tx; xx++) {
                           ^
make[1]: *** [src/gen_tile.o] Error 1
make[1]: Leaving directory `/root/src/mod_tile'
make: *** [all-recursive] Error 1

请让我知道我在流程中做错了什么?

Please let me know anything i did wrong in the flow?

推荐答案

我正在使用此代码

https://github.com/springmeyer/mod_tile

现在构建mod_tile可以正常工作.

to build mod_tile now its working fine.

这篇关于无法在openSUSE上构建mod_tile的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆