[mapnik] problems loading plugins

320 views
Skip to first unread message

Robert

unread,
Apr 19, 2012, 12:54:36 PM4/19/12
to mapnik
Hello,

After spending hours of trying to get it to work I'd like to ask you
guys for help.

I built mapnik 0.7.2 on a ubuntu 11.10 64 Bit

-I access the library trough a custom C++ library which is built as a
shared object including all necessary dependencies.
-Now I run this shared library (,so) using CDLL with ctypes in Python.
-The library is loaded correctly but now when a plugin is loaded (in
the C++ code datasource_cache::instance()-
>register_datasources(plugin_path.str().c_str());) I get following
errors (after adding all paths to python path)
/usr/local/lib/mapnik/input/raster.input (dlopen failed - plugin
likely has an unsatified dependency or incompatible ABI)

Running ldd on the plugin first:
linux-vdso.so.1 => (0x00007fffba1ff000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(0x00007f261ec4e000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6
(0x00007f261e9ca000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
(0x00007f261e7b3000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6
(0x00007f261e412000)
/lib64/ld-linux-x86-64.so.2 (0x00007f261f18f000)

Running ldd on my library
linux-vdso.so.1 => (0x00007fffb8fff000)
libboost_date_time.so.1.46.1 => /usr/lib/libboost_date_time.so.
1.46.1 (0x00007f1e12b73000)
libboost_filesystem.so.1.46.1 => /usr/lib/
libboost_filesystem.so.1.46.1 (0x00007f1e12955000)
libboost_thread.so.1.46.1 => /usr/lib/libboost_thread.so.
1.46.1 (0x00007f1e1273b000)
libboost_system.so.1.46.1 => /usr/lib/libboost_system.so.
1.46.1 (0x00007f1e12537000)
libgdal1.8.0.so.1 => /usr/lib/libgdal1.8.0.so.1
(0x00007f1e11aa1000)
libmapnik.so.0.7 => /usr/local/lib/libmapnik.so.0.7
(0x00007f1e116f3000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(0x00007f1e113ec000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6
(0x00007f1e11168000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
(0x00007f1e10f51000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6
(0x00007f1e10bb0000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007f1e10993000)
libproj.so.0 => /usr/lib/libproj.so.0 (0x00007f1e10750000)
libgeos_c.so.1 => /usr/lib/libgeos_c.so.1 (0x00007f1e10535000)
libodbc.so.1 => /usr/lib/libodbc.so.1 (0x00007f1e102cd000)
libodbcinst.so.1 => /usr/lib/libodbcinst.so.1
(0x00007f1e100ba000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1
(0x00007f1e0fe90000)
libjasper.so.1 => /usr/lib/x86_64-linux-gnu/libjasper.so.1
(0x00007f1e0fc39000)
libhdf5.so.6 => /usr/lib/libhdf5.so.6 (0x00007f1e0f69d000)
libmfhdfalt.so.0 => /usr/lib/libmfhdfalt.so.0
(0x00007f1e0f47a000)
libdfalt.so.0 => /usr/lib/libdfalt.so.0 (0x00007f1e0f1d8000)
libogdi.so.3.2 => /usr/lib/libogdi.so.3.2 (0x00007f1e0efb6000)
libgif.so.4 => /usr/lib/libgif.so.4 (0x00007f1e0edad000)
libjpeg.so.62 => /usr/lib/x86_64-linux-gnu/libjpeg.so.62
(0x00007f1e0eb88000)
libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0
(0x00007f1e0e95f000)
libnetcdf.so.6 => /usr/lib/libnetcdf.so.6 (0x00007f1e0e621000)
libpq.so.5 => /usr/lib/libpq.so.5 (0x00007f1e0e3f6000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1
(0x00007f1e0e1dd000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2
(0x00007f1e0dfd9000)
libspatialite.so.3 => /usr/lib/libspatialite.so.3
(0x00007f1e0dabc000)
libcurl-gnutls.so.4 => /usr/lib/x86_64-linux-gnu/libcurl-
gnutls.so.4 (0x00007f1e0d865000)
libmysqlclient.so.16 => /usr/lib/libmysqlclient.so.16
(0x00007f1e0d45b000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6
(0x00007f1e0d1c2000)
libltdl.so.7 => /usr/lib/libltdl.so.7 (0x00007f1e0cfb8000)
libtiff.so.4 => /usr/lib/x86_64-linux-gnu/libtiff.so.4
(0x00007f1e0cd55000)
libicuuc.so.44 => /usr/lib/libicuuc.so.44 (0x00007f1e0ca0d000)
libboost_regex.so.1.46.1 => /usr/lib/libboost_regex.so.1.46.1
(0x00007f1e0c70b000)
libcairomm-1.0.so.1 => /usr/lib/libcairomm-1.0.so.1
(0x00007f1e0c4e8000)
libcairo.so.2 => /usr/lib/x86_64-linux-gnu/libcairo.so.2
(0x00007f1e0c229000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007f1e0bece000)
/lib64/ld-linux-x86-64.so.2 (0x00007f1e13330000)
libgeos-3.2.2.so => /usr/lib/libgeos-3.2.2.so
(0x00007f1e0bb7f000)
libhdf5_hl.so.6 => /usr/lib/libhdf5_hl.so.6
(0x00007f1e0b94d000)
libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0
(0x00007f1e0b6fb000)
libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
(0x00007f1e0b34c000)
libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3
(0x00007f1e0b083000)
libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2
(0x00007f1e0ae7e000)
libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/
libgssapi_krb5.so.2 (0x00007f1e0ac40000)
libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/
libldap_r-2.4.so.2 (0x00007f1e0a9f2000)
libfreexl.so.1 => /usr/lib/x86_64-linux-gnu/libfreexl.so.1
(0x00007f1e0a7e7000)
libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0
(0x00007f1e0a548000)
libidn.so.11 => /usr/lib/x86_64-linux-gnu/libidn.so.11
(0x00007f1e0a315000)
liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2
(0x00007f1e0a106000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1
(0x00007f1e09efe000)
libgcrypt.so.11 => /lib/x86_64-linux-gnu/libgcrypt.so.11
(0x00007f1e09c80000)
librtmp.so.0 => /usr/lib/x86_64-linux-gnu/librtmp.so.0
(0x00007f1e09a66000)
libgnutls.so.26 => /usr/lib/x86_64-linux-gnu/libgnutls.so.26
(0x00007f1e097be000)
libicudata.so.44 => /usr/lib/libicudata.so.44
(0x00007f1e0877d000)
libicui18n.so.44 => /usr/lib/libicui18n.so.44
(0x00007f1e083c6000)
libsigc-2.0.so.0 => /usr/lib/libsigc-2.0.so.0
(0x00007f1e081c1000)
libpixman-1.so.0 => /usr/lib/x86_64-linux-gnu/libpixman-1.so.0
(0x00007f1e07f4c000)
libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/
libfontconfig.so.1 (0x00007f1e07d16000)
libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0
(0x00007f1e07b13000)
libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-
render.so.0 (0x00007f1e07909000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1
(0x00007f1e076ed000)
libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1
(0x00007f1e074e2000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6
(0x00007f1e071a9000)
libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3
(0x00007f1e06f81000)
libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/
libkrb5support.so.0 (0x00007f1e06d78000)
libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1
(0x00007f1e06b75000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2
(0x00007f1e0695a000)
libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2
(0x00007f1e0673e000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0
(0x00007f1e0653a000)
libtasn1.so.3 => /usr/lib/x86_64-linux-gnu/libtasn1.so.3
(0x00007f1e06328000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6
(0x00007f1e06125000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6
(0x00007f1e05f1e000)

and running ldd in the Mapnik library
linux-vdso.so.1 => (0x00007fffeabff000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6
(0x00007ff40391e000)
libltdl.so.7 => /usr/lib/libltdl.so.7 (0x00007ff403714000)
libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0
(0x00007ff4034eb000)
libtiff.so.4 => /usr/lib/x86_64-linux-gnu/libtiff.so.4
(0x00007ff403288000)
libjpeg.so.62 => /usr/lib/x86_64-linux-gnu/libjpeg.so.62
(0x00007ff403063000)
libproj.so.0 => /usr/lib/libproj.so.0 (0x00007ff402e20000)
libicuuc.so.44 => /usr/lib/libicuuc.so.44 (0x00007ff402ad9000)
libboost_filesystem.so.1.46.1 => /usr/lib/
libboost_filesystem.so.1.46.1 (0x00007ff4028bb000)
libboost_regex.so.1.46.1 => /usr/lib/libboost_regex.so.1.46.1
(0x00007ff4025b8000)
libcairomm-1.0.so.1 => /usr/lib/libcairomm-1.0.so.1
(0x00007ff402395000)
libcairo.so.2 => /usr/lib/x86_64-linux-gnu/libcairo.so.2
(0x00007ff4020d7000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007ff401d7b000)
libboost_thread.so.1.46.1 => /usr/lib/libboost_thread.so.
1.46.1 (0x00007ff401b62000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(0x00007ff40185b000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6
(0x00007ff4015d6000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
(0x00007ff4013c0000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6
(0x00007ff40101f000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1
(0x00007ff400e06000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2
(0x00007ff400c02000)
libicudata.so.44 => /usr/lib/libicudata.so.44
(0x00007ff3ffbc2000)
libboost_system.so.1.46.1 => /usr/lib/libboost_system.so.
1.46.1 (0x00007ff3ff9bd000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007ff3ff7a0000)
libicui18n.so.44 => /usr/lib/libicui18n.so.44
(0x00007ff3ff3e9000)
libsigc-2.0.so.0 => /usr/lib/libsigc-2.0.so.0
(0x00007ff3ff1e3000)
libpixman-1.so.0 => /usr/lib/x86_64-linux-gnu/libpixman-1.so.0
(0x00007ff3fef6f000)
libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/
libfontconfig.so.1 (0x00007ff3fed39000)
libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0
(0x00007ff3feb35000)
libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-
render.so.0 (0x00007ff3fe92c000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1
(0x00007ff3fe710000)
libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1
(0x00007ff3fe504000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6
(0x00007ff3fe1cc000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff403f87000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1
(0x00007ff3fdfa1000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6
(0x00007ff3fdd9e000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6
(0x00007ff3fdb98000)

Does anyone have an idea what might be the problem here so the plugins
won't load? I'd really appreciate some help with the plugin system
which is driving me mad at the moment

Greets Robert

Dane Springmeyer

unread,
Apr 24, 2012, 11:04:29 PM4/24/12
to map...@googlegroups.com
Hi Robert,

Comments below inline...

On Apr 19, 2012, at 9:54 AM, Robert wrote:

> Hello,
>
> After spending hours of trying to get it to work I'd like to ask you
> guys for help.
>
> I built mapnik 0.7.2 on a ubuntu 11.10 64 Bit
>
> -I access the library trough a custom C++ library which is built as a
> shared object including all necessary dependencies.

Okay, sounds good.

> -Now I run this shared library (,so) using CDLL with ctypes in Python.
> -The library is loaded correctly but now when a plugin is loaded (in
> the C++ code datasource_cache::instance()-
>> register_datasources(plugin_path.str().c_str());) I get following
> errors (after adding all paths to python path)
> /usr/local/lib/mapnik/input/raster.input (dlopen failed - plugin
> likely has an unsatified dependency or incompatible ABI)

So, first off, do you need support for reading raster images? If not, this error is harmless, as other plugins will have been registered fine.

>
> Running ldd on the plugin first:
> linux-vdso.so.1 => (0x00007fffba1ff000)
> libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> (0x00007f261ec4e000)
> libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6
> (0x00007f261e9ca000)
> libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
> (0x00007f261e7b3000)
> libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6
> (0x00007f261e412000)
> /lib64/ld-linux-x86-64.so.2 (0x00007f261f18f000)

A nice way to figure out what the plugin is looking for (that is missing) is to use ctypes to try to open it:

>>> import ctypes
>>> ctypes.CDLL('/usr/local/lib/mapnik/input/raster.input')

The above should throw with a more decent error indicating which library is missing.

On linux the 0.7.2 mapnik compile does not link the plugin libraries directly to some dependencies (like boost or icu) because these symbols should already be present if libmapnik.so is fully loaded. But, this can be problematic (as may be the case for you) so in latest mapnik we are now linking plugins to their dependecies directly, including libmapnik.so.

>
> Does anyone have an idea what might be the problem here so the plugins
> won't load? I'd really appreciate some help with the plugin system
> which is driving me mad at the moment

I presume you should link the plugins against libmapnik. I would recommend running Mapnik master, which does this and if you run into any problems I can help fix things further.

Dane

Robert Wüest

unread,
Apr 25, 2012, 2:26:01 AM4/25/12
to map...@googlegroups.com
Hi Dane,

thanks for the answer! I already migrated to the master trunk 2.0.X and now it works fine. I was making a port from windows thats why I tried to get this version up an running first. So thank you very much its gonna help with my windows issues. Is there a way to build the master on windows yet?

Thanks again for your help.

Greetings

Robert

2012/4/25 Dane Springmeyer <da...@dbsgeo.com>

Dane Springmeyer

unread,
Apr 25, 2012, 2:38:44 AM4/25/12
to map...@googlegroups.com
On Apr 24, 2012, at 11:26 PM, Robert Wüest wrote:

Hi Dane,

thanks for the answer! I already migrated to the master trunk 2.0.X and now it works fine.

great.

I was making a port from windows thats why I tried to get this version up an running first. So thank you very much its gonna help with my windows issues. Is there a way to build the master on windows yet?

Yes, master currently builds just fine on windows - at least the bits I frequently compile: libmapnik and node-mapnik with msvc 2010. Its possible the python bindings are not compiling cleanly as I've not been using msvc 2008 recently.

We keep an emerging set of notes on compiling master on windows at:


If you try to follow these instructions and hit problems just post an issue at https://github.com/mapnik/mapnik-packaging/issues.
Reply all
Reply to author
Forward
0 new messages