title: mapnik install fail on Red Hat Linux
body: <p>I'm just trying to get the Python bindings to Mapnik 2.1 installed on a Red Hat Enterprise box and use them in Sage (sagemath.org). This is a company machine where I can't use yum, so it's tarballs all the way, baby.</p>
  
  <p>I've already resolved any number of issues installing the dependencies and working out the syntax I need for each configure. Every time I solve one problem, there is another one. Currently I cannot get mapnik configure to see libboost_system.so, which is definitely in /usr/local/lib and has a symbolic link pointing to it from /usr/lib.</p>
  
  <p>details:</p>
  
  <pre><code>Red Hat Enterprise system:
  &gt; more /proc/version
  Linux version 2.6.18-92.el5PAE (brewbuilder@hs20-bc2-3.build.redhat.com) (gcc version 4.1.2 20071124 (Red Hat 4.1.2-41)) 
  used install directions at github.com/mapnik/mapnik/blob/master/INSTALL.md, github.com/mapnik/mapnik/wiki/Mapnik2 and elsewhere
  installed proj 4.8 from tarball using several solutions provided on the web to fix install problems
  installed icu4c-4_6 from tarball to /usr/local/...
  installed boost 1.51 from tarball pointing to the newly installed icu:
  download boost_1_51_0.tar.gz
  tar ...
  cd boost_1_51_0
  ./bootstrap.sh
  </code></pre>
  
  <p>(earlier I had done a straight ./b2 to install everything boost - went back using the above web page instructions to reinstall parts of boost this way:)</p>
  
  <pre><code>sudo ./b2 --with-thread --with-filesystem --with-iostreams --with-python --with-regex -sHAVE_ICU=1 -sICU_PATH=/usr/local/lib --with-program_options --with-system link=shared toolset=gcc stage
  sudo ./b2 --with-thread --with-filesystem --with-iostreams --with-python --with-regex -sHAVE_ICU=1 -sICU_PATH=/usr/local/lib --with-program_options --with-system link=shared toolset=gcc install
  sudo /sbin/ldconfig
  </code></pre>
  
  <p>Now try to install mapnik:</p>
  
  <pre><code>download mapnik-v2.1.0.tar.bz2
  tar ...
  cd ...
  ./configure PYTHON=/opt/sage-5.2/local/bin/python ICU_LIBS=/usr/local/lib ICU_INCLUDES=/usr/local/include BOOST_INCLUDES=/usr/local/include/boost BOOST_LIBS=/usr/local/lib
  </code></pre>
  
  <p>or</p>
  
  <pre><code>./configure PYTHON=/opt/sage-5.2/local/bin/python ICU_LIBS=/usr/local/lib ICU_INCLUDES=/usr/local/include
  </code></pre>
  
  <p>or</p>
  
  <pre><code>./configure PYTHON=/opt/sage-5.2/local/bin/python
  </code></pre>
  
  <p>(same results)</p>
  
  <pre><code>"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 &gt;= 4.2... found: icu 4.6
  (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 &gt;= 1.47... yes
  Found boost lib version... 1_51
  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
  .sconf_temp/conftest_18: error while loading shared libraries: libboost_system.so.1.51.0: 
  cannot open shared object file: No such file or directory
  Checking if boost_regex was built with ICU unicode support... (cached) no
  Checking for requested plugins dependencies...
  Checking for gdal-config --libs... yes
  Checking for gdal-config --cflags... yes
  Checking for name of gdal library... gdal
  Checking if gdal is ogr enabled... yes
  Checking for name of ogr library... gdal
  Checking for C library curl... no
  Checking for pg_config... error: no result no
  Checking for C library sqlite3... no
  Checking if SQLite supports RTREE... (cached) no
  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)...
  </code></pre>
  
  <p>Note: will build without these OPTIONAL dependencies:</p>
  
  <ul>
  <li><p>boost_regex_icu (libboost_regex built with optional ICU unicode support is needed for unicode regex support in mapnik.)</p></li>
  <li><p>curl (libcurl is required for the "osm" plugin - more info: <a href="https://github.com/mapnik/mapnik/wiki//OsmPlugin" rel="noreferrer">https://github.com/mapnik/mapnik/wiki//OsmPlugin</a>)</p></li>
  <li><p>pg_config (pg_config program | try setting PG_CONFIG SCons option)</p></li>
  <li><p>sqlite3 (SQLite3 C Library | configure with SQLITE_LIBS &amp; SQLITE_INCLUDES | more info: <a href="https://github.com/mapnik/mapnik/wiki//SQLite" rel="noreferrer">https://github.com/mapnik/mapnik/wiki//SQLite</a>)</p></li>
  <li><p>sqlite_rtree (The SQLite plugin requires libsqlite3 built with RTREE support (-DSQLITE_ENABLE_RTREE=1))</p></li>
  <li><p>cairo (Cairo C library | configured using pkg-config | try setting PKG_CONFIG_PATH SCons option)</p></li>
  <li><p>pycairo (Python bindings to Cairo library | configured using pkg-config | try setting PKG_CONFIG_PATH SCons option)</p>
  
  <p>.sconf_temp/conftest_33: error while loading shared libraries: libboost_system.so.1.51.0: cannot open shared object file: No such file or directory
  Problem encountered parsing mapnik version, falling back to 2.1.0
  Checking for C header file Python.h... yes
  Bindings Python version... 2.7
  Python 2.7 prefix... /opt/sage-5.2/local
  Python bindings will install in... /opt/sage-5.2/local/lib/python2.7/site-packages
  Configure completed: run <code>make</code> to build or <code>make install</code>"
  make
  "...
  /usr/bin/ld: cannot find -lsqlite3
  collect2: error: ld returned 1 exit status
  scons: <strong>* [tests/cpp_tests/csv_parse_test-bin] Error 1
  scons: building terminated because of errors.
  make: *</strong> [mapnik] Error 2"</p></li>
  </ul>
  
  <p>But I thought sqlite3 was OPTIONAL ...</p>
  
  <p>I think the sqlite3 issue might be a red herring. The earlier problem is that the configure stage did not find boost_thread. My system shows:</p>
  
  <pre><code>ls -l /usr/local/lib/libboost_system.so*
  lrwxrwxrwx 1 root root    25 Sep 11 17:40 /usr/local/lib/libboost_system.so -&gt; libboost_system.so.1.51.0
  -rwxr-xr-x 1 root root 16898 Sep 11 17:40 /usr/local/lib/libboost_system.so.1.51.0
  ldd /usr/local/lib/libboost_system.so.1.51.0
          linux-gate.so.1 =&gt;  (0x005c1000)
          librt.so.1 =&gt; /lib/librt.so.1 (0x00cd9000)
          libstdc++.so.6 =&gt; /usr/lib/libstdc++.so.6 (0x002f4000)
          libm.so.6 =&gt; /lib/libm.so.6 (0x009e1000)
          libgcc_s.so.1 =&gt; /lib/libgcc_s.so.1 (0x00f82000)
          libpthread.so.0 =&gt; /lib/libpthread.so.0 (0x00a6a000)
          libc.so.6 =&gt; /lib/libc.so.6 (0x00110000)
          /lib/ld-linux.so.2 (0x0050d000)
  </code></pre>
  
  <p>so it's really there and valid.</p>
  
  <p>And just to be safe (which did not help) added a symbolic link:</p>
  
  <pre><code>ls -l /usr/lib/libboost_system.so
  lrwxrwxrwx 1 root root 33 Sep 14 10:16 /usr/lib/libboost_system.so -&gt; /usr/local/lib/libboost_system.so
  </code></pre>
  
  <p>This is odd since other libraries are being found just fine in the same location. Also, the configure stage stated a few lines before the error that "Searching for boost libs and headers... libs found: /usr/local/lib"</p>
  
  <p>At this point, I don't really trust scons. I had another issue where the mapnik configure stage could not find a library (libproj). Then it later stated that the version of boost was not at least 1.48. As soon as I added the correct symbolic link pointing to the proj .so file, the configure error about the version of boost disappeared. So I'm sticking with the general rule that you should focus on the first error found and solve that one.</p>
  
  <p>Note that the nonstandard location of Python (PYTHON=/opt/sage-5.2/local/bin/python) seems to be OK.</p>
  
  <p>Looking at the mapnik log file config.log, but no additional info that I can see. Checked the web and github.com/mapnik/mapnik/wiki/InstallationTroubleshooting but nothing relevant. Sorry for the long post, but details matter. Thanks for reading.</p>
  
  <p>Another clue might be:</p>
  
  <pre><code>Checking if boost_regex was built with ICU unicode support... (cached) no
  </code></pre>
  
  <p>even though the above shows that this was done correctly (?).</p>