This procedure should work across any Linux systems thank to bootstraping step. Compiler with C++14 capability is the only hard requirement. It will work with gcc >= 6.
PostgreSQL should be installed with GIS extensions (here as 9.6).
In case RHEL or similar, you can install gcc 6.x from Software Collection repository:
|
1 2 |
yum install devtoolset-6 scl enable devtoolset-6 bash |
After that clone and install mapnik:
|
1 2 3 4 5 6 7 8 9 |
export CXX="/opt/rh/devtoolset-6/root/usr/bin/g++" && export CC="/opt/rh/devtoolset-6/root/usr/bin/gcc" export PATH=$PATH:/usr/pgsql-9.6/bin:/usr/pgsql-9.6/lib git clone https://github.com/mapnik/mapnik mapnik-3.x --depth 10 cd mapnik-3.x git submodule update --init source bootstrap.sh ./configure --prefix=/packages/mapnik/3.x CUSTOM_CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" CXX=${CXX} CC=${CC} make -j4 make install |
