artemp/trac2github — Issue #717: SCons doesn't find some Boost-Library in Debian Squeeze (with fix)
Author: artemp
Created: 2011-10-09 20:48:03+00:00
State: open
Labels: Scons_Build_Scripts

There's a bug in "SConstruct" of Mapnik v0.7.2 when trying to compile it in Debian Squeeze with Python 2.6 and GCC 4.4.5:

==========================================================================
(cached) Searching for boost libs and headers... (cached)
*libs found: /usr/lib
*headers found: /usr/include
*no lib naming extension found
Checking for Boost version >= 1.34... yes
Found boost lib version... 1_42
Checking for C++ library boost_system... no
Could not find required header or shared library for boost system
Checking for C++ library boost_filesystem... no
Could not find required header or shared library for boost filesystem
Checking for C++ library boost_regex... yes
Checking for C++ library boost_iostreams... yes
Checking for C++ library boost_program_options... yes
Checking for C++ library boost_thread... yes
Checking for C++ library boost_thread... yes
==========================================================================

There is no problem with the libraries, since Mapnik v0.7.1 compiles without a problem.

I've debugged "SConstruct". The error is in line 153:
--------------------------------------------------------------------------
elif '/usr/' in i or '/System' in i or i.startswith('/lib'):
--------------------------------------------------------------------------

Please change it to:
--------------------------------------------------------------------------
elif '/usr/' in i or '/System' in i or '/lib' in i:
--------------------------------------------------------------------------

After that, it compiles without a problem!

Hmm, there's another bug since the very first version of Mapnik is that you can't give other directories for BOOST-Library. This is an issue of Scons, not of Mapnik and it might work for other Linux distributions, but neither for Debian nor for Ubuntu!

Best regards,
Tobias