I've setup the ruby_port of openstreetmaps and imported some data via osm2pgsql.. although the english.osm.bz fails but other countries work fine.

My big problem is that make fails when I try to install mod_tile:

[root@s16307932 mod_tile]# make install
Making install in iniparser3.0b
make[1]: Entering directory `/root/mod_tile/iniparser3.0b'
make[2]: Entering directory `/root/mod_tile/iniparser3.0b'
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
 /bin/sh ../libtool   --mode=install /usr/bin/install -c   libiniparser.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libiniparser.so.3.0.0 /usr/local/lib/libiniparser.so.3.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libiniparser.so.3.0.0 libiniparser.so.3 || { rm -f libiniparser.so.3 && ln -s libiniparser.so.3.0.0 libiniparser.so.3; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libiniparser.so.3.0.0 libiniparser.so || { rm -f libiniparser.so && ln -s libiniparser.so.3.0.0 libiniparser.so; }; })
libtool: install: /usr/bin/install -c .libs/libiniparser.lai /usr/local/lib/libiniparser.la
libtool: install: /usr/bin/install -c .libs/libiniparser.a /usr/local/lib/libiniparser.a
libtool: install: chmod 644 /usr/local/lib/libiniparser.a
libtool: install: ranlib /usr/local/lib/libiniparser.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/sbin" ldconfig -n /usr/local/lib
Libraries have been installed in:

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/root/mod_tile/iniparser3.0b'
make[1]: Leaving directory `/root/mod_tile/iniparser3.0b'
make[1]: Entering directory `/root/mod_tile'
g++ -DHAVE_CONFIG_H -I.  -I/usr/include/freetype2 -pthread -I/usr/local/include -D_REENTRANT -D_REENTRANT -I/usr/include    -g -O2 -MT gen_tile.o -MD -MP -MF .deps/gen_tile.Tpo -c -o gen_tile.o gen_tile.cpp
In file included from gen_tile.cpp:5:
/usr/local/include/mapnik/filter_factory.hpp:1:2: warning: #warning "filter_factory.hpp" is now called "expression.hpp"
gen_tile.cpp: In function âprotoCmd render(mapnik::Map&, char*, mapnik::projection&, int, int, int, unsigned int, metaTile&)â:
gen_tile.cpp:445: error: variable âmapnik::image_32 bufâ has initializer but incomplete type
gen_tile.cpp:453: error: âimage_viewâ was not declared in this scope
gen_tile.cpp:453: error: expected primary-expression before â>â token
gen_tile.cpp:453: error: âvwâ was not declared in this scope
make[1]: *** [gen_tile.o] Error 1
make[1]: Leaving directory `/root/mod_tile'
make: *** [install-recursive] Error 1

I gather expression.hpp is included correctly and the error stems from gen_tile.cpp.

I have installed and tested mapnik and can generate tiles when I call ./generate_tiles.py

Here's the output when I configure mapnik:

[root@s16307932 mapnik]# python scons/scons.py configure
scons: Reading SConscript files ...

Welcome to Mapnik...

Configuring build environment...
SCons CONFIG found: 'config.py', variables will be inherited...
Configuring on Linux in *release mode*...
Checking for freetype-config... yes
Checking for xml2-config... yes
Sorting lib and inc compiler paths...(cached) yes
Checking for C library m... yes
Checking for C library ltdl... yes
Checking for C library png... yes
Checking for C library tiff... yes
Checking for C library z... yes
Checking for C library proj... yes
Checking for C++ library icuuc... yes
Checking for C library jpeg... yes
Checking for ICU version >= 4.2... found: icu 4.2
(cached) Searching for boost libs and headers... (cached)
  *libs found: /usr/local/lib
  *headers found: /usr/local/include
  *no lib naming extension found
Checking for Boost version >= 1.47... yes
Found boost lib version... 1_47
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 if boost_regex was built with ICU unicode support... (cached) yes
Checking for requested plugins dependencies...
Checking for gdal-config --libs... error: no result
Checking if gdal is ogr enabled... no
Checking for C library curl... yes
Checking for pg_config... yes
Checking for C library sqlite3... yes
Checking if SQLite supports RTREE... (cached) yes
Checking for pkg-config... yes
Checking for cairo... no
Checking for C++ header file boost/python/detail/config.hpp... yes
Checking for pkg-config... yes
Checking for pycairo... no

All Required dependencies found!

Overwriting and re-saving file 'config.py'...
Will hold custom path variables from commandline and python config file(s)...

Note: will build without these OPTIONAL dependencies:
   - gdal-config (gdal-config program | try setting GDAL_CONFIG SCons option)
   - ogr (OGR-enabled GDAL C++ Library | configured using gdal-config program | try setting GDAL_CONFIG SCons option | more info: http://trac.mapnik.org/wiki/OGR)
   - cairo (Cairo C library | configured using pkg-config | try setting PKG_CONFIG_PATH SCons option)
   - pycairo (Python bindings to Cairo library | configured using pkg-config | try setting PKG_CONFIG_PATH SCons option)

Checking for C header file Python.h... yes
Bindings Python version... 2.6
Python 2.6 prefix... /usr
Python bindings will install in... /usr/lib64/python2.6/site-packages

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

I'm afraid I'm really not sure where to go from here. I'd really appreciate any pointers as I have a project going live soon and we want to run openstreetmaps on our own server rather than hammering the communities resources.


Paul Hudson

asked 21 Jun '12, 14:26

Paul%20Hudson's gravatar image

Paul Hudson
accept rate: 0%

What OS and version are you using for the above?

(21 Jun '12, 16:24) SomeoneElse ♦

Hey, sorry should have said. I'm on CentOS 6.

(21 Jun '12, 16:30) Paul Hudson

...and it's Mapnik v2.0.1 - and mod_tile as available here: http://svn.openstreetmap.org/applications/utils/mod_tile

Are they the most recent versions and compatible? Let me know if you need any other info. Thanks!!!

(22 Jun '12, 17:42) Paul Hudson

After discussion with Paul on #osm-dev we determined that this is likely to be a version conflict and that currently mod_tile will probably not compile against mapnik 2.01.

As a result the current answer would be to compile against mapnik 2.0.

permanent link

answered 22 Jun '12, 19:48

SimonPoole's gravatar image

SimonPoole ♦
accept rate: 19%

edited 22 Jun '12, 19:49


Thanks to SimonPoole and the other chaps at #osm-dev. Compiling against mapnik 2.0 went smoothly.

(23 Jun '12, 09:13) Paul Hudson

You can use mod_tile fork to compile against mapnik 2.1 https://github.com/ramunasd/mod_tile

permanent link

answered 29 Jun '12, 11:28

ieskok's gravatar image

accept rate: 0%

edited 29 Jun '12, 11:29

mv render_config.h-dist render_config.h

(01 Jul '12, 21:27) Dave Jarvis

sudo cp .libs/mod_tile.so /usr/lib/apache2/modules/.

(01 Jul '12, 21:35) Dave Jarvis
mkdir -p $HOME/src
cd $HOME/src
git clone https://github.com/ramunasd/mod_tile
cd mod_tile
mv render_config.h-dist render_config.h
sudo make install
sudo cp .libs/mod_tile.so /usr/lib/apache2/modules/.
sudo bash -c "echo 'LoadModule tile_module /usr/lib/apache2/modules/mod_tile.so' > /etc/apache2/mods-available/tile.load"
sudo a2enmod tile
sudo /etc/init.d/apache2 restart

Seems to work against Mapnik 2.0.1.

permanent link

answered 01 Jul '12, 21:26

Dave%20Jarvis's gravatar image

Dave Jarvis
accept rate: 0%

edited 01 Jul '12, 21:35

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 21 Jun '12, 14:26

question was seen: 8,289 times

last updated: 01 Jul '12, 21:35

powered by OSQA