Skip to content

"dynamic module does not define init function (init_mapnik)" on MacOS #148

@paberline-rms

Description

@paberline-rms

Hi,

I've build both Mapnik (v3.0.13) and it's python mapnik-bindings (v3.0.13) from source on Mac OS 10.11.6 using the standard Clang (v800.0.42.1) build tools.

This seemed to complete OK.

However when I try and import mapnik I get

import mapnik

Traceback (most recent call last):

File "", line 1, in
File "/usr/local/lib/python2.7/site-packages/mapnik-0.1-py2.7-macosx-10.11-x86_64.egg/mapnik/init.py", line 74, in
from ._mapnik import *
ImportError: dynamic module does not define init function (init_mapnik)

this seems to be due to C++ name mangling as suggested here as I can see that _init_mapnik (note the _ prefix) is defined:

nm /usr/local/lib/python2.7/site-packages/mapnik-0.1-py2.7-macosx-10.11-x86_64.egg/mapnik/_mapnik.so | grep init_mapnik 00000000000c6c00 t _init_mapnik

I looked for the init_mapnik definition to see if it was marked extern but can't see it.

Can anyone suggest what I'm doing wrong?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions