Compile error Mapnik v3.0.9.

130 views
Skip to first unread message

Mike B.

unread,
Apr 4, 2016, 10:11:44 AM4/4/16
to mapnik

Hello,


I am trying to build Mapnik v3.0.9 from source.


I have a customer who uses CentOS 6.7 (glibc 2.12) and does not a have a plan to upgrade to 7 any time soon.

I would like to use Mapnik on their systems in support of our project. 


I am hoping to build Mapnik from source on a CentOS 6.7 system so that I can create it on a system with glibc 2.12. I am running into a error during make that I can not find much info for. The closest thing I find when Google-ing, is a need for include guards in the header file. I am hoping there is something missing from my environment, or some CFLAG I am missing. Anyway, the error is below. Thanks in advance for any help you can give.


------------------------------------------------


Here are my system's specs:

  • ​AWS instance
  • 4 CPU 16GB Ram
  • CentOS 6.7
Prereqs from source :
  • ​GCC 5.3 installed from source
  • Python 2.7 from source
  • harfbuzz 0.9.36 from source.
  • Boost 1.6 from source
  • Scons 2.0.1.r5134
  • sqlite3 (Amalgamation)  no RTREE but we dont need the sqlite plugin anyways.
  • PostgreSQL 9.1
RPMs
  • libicu-4.2.1-12.el6.x86_64 (rpm)
  • zlib-devel-1.2.3-29.el6.x86_64
  • zlib-1.2.3-29.el6.x86_64freetype-2.3.11-15.el6_6.1.x86_64
  • freetype-devel-2.3.11-15.el6_6.1.x86_64
  • libxml2-devel.x86_64​
  • libxml2-2.7.6-20.el6_7.1.x86_64
  • libpng-1.2.49-2.el6_7.x86_64
  • libpng-devel-1.2.49-2.el6_7.x86_64
  • libjpeg-turbo-1.2.1-3.el6_5.x86_64
  • libjpeg-turbo-devel-1.2.1-3.el6_5.x86_64
  • libtiff-3.9.4-10.el6_5.x86_64
  • libtiff-devel-3.9.4-10.el6_5.x86_64
  • libwebp-0.4.3-3.el6.x86_64
  • libwebp-devel-0.4.3-3.el6.x86_64
  • proj-4.7.0-1.el6.x86_64
  • proj-devel-4.7.0-1.el6.x86_64
  • gdal-1.7.3-15.el6.x86_64
  • gdal-devel-1.7.3-15.el6.x86_64
---------------------------------------------------------


Here is the output of running the configure script:
PYTHON=python2.7 scons configure PG_CONFIG=/usr/pgsql-9.1/bin/pg_config

scons: Reading SConscript files ...

Welcome to Mapnik...

Configuring build environment...
Configuring on Linux in *release mode*...
Checking for freetype-config... yes
Checking for dlfcn.h support ... yes
Checking if compiler (c++) supports -std=c++11 flag... (cached) yes
Checking for C library z... yes
Checking for C++ library icuuc... yes
Checking for ICU version >= 4.2... found: icu 4.2
(cached) Checking for C++ library harfbuzz... yes
Checking for HarfBuzz version >= 0.9.34... found: HarfBuzz 0.9.36
Checking for HarfBuzz with freetype support
(cached) yes
Searching for boost libs and headers... (cached) 
Found boost libs: /usr/local/lib
Found boost headers: /usr/local/include
Checking for C++ header file boost/version.hpp... yes
Checking for Boost version >= 1.47... yes
Found boost lib version... 1_60
Checking for C++ library boost_system... yes
Checking for C++ library boost_filesystem... yes
Checking for C++ library boost_regex... yes
Checking for C++ library boost_program_options... yes
Checking for C++ library boost_thread... yes
Checking whether Boost was compiled with C++11 scoped enums ... yes
Checking if boost_regex was built with ICU unicode support... (cached) yes
Checking for C library jpeg... yes
Checking for C library proj... yes
Checking for C library png... yes
Checking for C library webp... yes
Checking for C library tiff... yes
Checking for pkg-config... yes
Checking for requested plugins dependencies...
Checking for pg_config... yes
Checking for C library sqlite3... no
Checking if SQLite supports RTREE... (cached) no
Checking for gdal-config --libs... yes
Checking for gdal-config --cflags... yes
Checking for name of gdal library... gdal
Checking for C++ library gdal... yes
Checking for pg_config... yes
Checking if gdal is ogr enabled... yes
Checking for gdal-config --libs... yes
Checking for gdal-config --cflags... yes
Checking for name of ogr library... gdal
Checking for C++ library gdal... yes
Checking for cairo... yes
Checking for cairo lib and include paths...  yes
Checking for cairo freetype font support ... yes

All Required dependencies found!

Saving new file 'config.py'...
Will hold custom path variables from commandline and python config file(s)...

Note: will build without these OPTIONAL dependencies:
   - sqlite3 (SQLite3 C Library | configure with SQLITE_LIBS & SQLITE_INCLUDES | more info: https://github.com/mapnik/mapnik/wiki/SQLite)
   - sqlite_rtree (The SQLite plugin requires libsqlite3 built with RTREE support (-DSQLITE_ENABLE_RTREE=1))


Configure completed: run `make` to build or `make install`

------------------------------------------


The make Error messages:

make PYTHON=python2.7​



.....

                                ^
c++ -o src/xml_tree.os -c -std=c++11 -Wall -pthread -ftemplate-depth-300 -Wsign-compare -Wshadow -O3 -fPIC -DMAPNIK_MEMORY_MAPPED_FILE-DMAPNIK_HAS_DLCFN-DBIGINT-DBOOST_REGEX_HAS_ICU-DHAVE_JPEG-DMAPNIK_USE_PROJ4-DHAVE_PNG-DHAVE_WEBP-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 -Ideps -Ideps/agg/include -Iinclude -I/usr/local/include -I/usr/include -I/usr/include/freetype2 -I/usr/pgsql-9.1/include -I/usr/include/gdal -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 src/xml_tree.cpp
<command-line>:0:26: warning: ISO C++11 requires whitespace after the macro name
In file included from include/mapnik/attribute.hpp:28:0,
                 from include/mapnik/xml_attribute_cast.hpp:36,
                 from src/xml_tree.cpp:27:
include/mapnik/value.hpp:1067:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
 #pragma GCC diagnostic ignored "-Wmismatched-tags"
                                ^
In file included from include/mapnik/xml_attribute_cast.hpp:40:0,
                 from src/xml_tree.cpp:27:
include/mapnik/warning_ignore.hpp:25:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
 #pragma GCC diagnostic ignored "-Wno-unknown-pragmas" // clang
                                ^
include/mapnik/warning_ignore.hpp:26:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
 #pragma GCC diagnostic ignored "-Wno-pragmas" // gcc
                                ^
include/mapnik/warning_ignore.hpp:27:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
 #pragma GCC diagnostic ignored "-Wno-unsequenced"
                                ^
include/mapnik/warning_ignore.hpp:30:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
 #pragma GCC diagnostic ignored "-Wredeclared-class-member"
                                ^
include/mapnik/warning_ignore.hpp:31:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
 #pragma GCC diagnostic ignored "-Wunused-local-typedef" 
                                ^
include/mapnik/warning_ignore.hpp:33:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
 #pragma GCC diagnostic ignored "-Wc++11-narrowing"
                                ^
src/xml_tree.cpp:62:12: error: redefinition of ‘struct mapnik::name_trait<int>’
     struct name_trait<type>                                             \
            ^
src/xml_tree.cpp:76:1: note: in expansion of macro ‘DEFINE_NAME_TRAIT’
 DEFINE_NAME_TRAIT( mapnik::value_integer, "int" )
 ^
src/xml_tree.cpp:62:12: error: previous definition of ‘struct mapnik::name_trait<int>’
     struct name_trait<type>                                             \
            ^
src/xml_tree.cpp:71:1: note: in expansion of macro ‘DEFINE_NAME_TRAIT’
 DEFINE_NAME_TRAIT( int, "int")
 ^
src/xml_tree.cpp:411:107: error: duplicate explicit instantiation of ‘boost::optional<T> mapnik::xml_node::get_opt_attr(const string&) const [with T = int; std::__cxx11::string = std::__cxx11::basic_string<char>]’ [-fpermissive]
 #define compile_get_opt_attr(T) template boost::optional<T> xml_node::get_opt_attr<T>(std::string const&) const
                                                                                                           ^
src/xml_tree.cpp:419:1: note: in expansion of macro ‘compile_get_opt_attr’
 compile_get_opt_attr(mapnik::value_integer);
 ^
scons: *** [src/xml_tree.os] Error 1
scons: building terminated because of errors.
make: *** [mapnik] Error 2



Thanks

Mike B
Reply all
Reply to author
Forward
0 new messages