[MacPorts] #19114: New Port: Mapnik
#19114: New Port: Mapnik ---------------------------------------+------------------------------------ Reporter: dbsgeo@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.7.0 Keywords: gis,graphics,boost,python | Port: ---------------------------------------+------------------------------------ A few other tickets (#12784,#18071) have posted Portfiles for Mapnik. Here is an updated port for the new 0.6.0 release, in the hopes that the core MacPorts team can help push it over a few last hurdles. This document (hosted where I developed the portfile) describes a notable problem with boost: http://mapnik-utils.googlecode.com/svn/sandbox/ports/README.txt -- Ticket URL: <http://trac.macports.org/ticket/19114> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19114: New Port: Mapnik ---------------------------------------+------------------------------------ Reporter: dbsgeo@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.7.0 Keywords: gis,graphics,boost,python | Port: ---------------------------------------+------------------------------------ Comment(by raimue@…): Tarballs seem to be available already. -- Ticket URL: <http://trac.macports.org/ticket/19114#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19114: New Port: Mapnik ---------------------------------------+------------------------------------ Reporter: dbsgeo@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.7.0 Keywords: gis,graphics,boost,python | Port: Mapnik ---------------------------------------+------------------------------------ Changes (by macsforever2000@…): * port: => Mapnik -- Ticket URL: <http://trac.macports.org/ticket/19114#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19114: New Port: Mapnik ---------------------------------------+------------------------------------ Reporter: dbsgeo@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.7.0 Keywords: gis,graphics,boost,python | Port: Mapnik ---------------------------------------+------------------------------------ Comment(by macsforever2000@…): I'm not able to get this to run. It builds fine, but I see the following error in ipython2.5 {{{ $ ipython2.5 Python 2.5.4 (r254:67916, Apr 11 2009, 14:47:01) Type "copyright", "credits" or "license" for more information. IPython 0.9.1 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object'. ?object also works, ?? prints more. In [1]: import mapnik --------------------------------------------------------------------------- ImportError Traceback (most recent call last) /Users/frank/Downloads/mapnik-0.6.0/scons/<ipython console> in <module>() /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5 /site-packages/mapnik/__init__.py in <module>() 52 setdlopenflags(RTLD_NOW | RTLD_GLOBAL) 53 ---> 54 from _mapnik import * 55 from paths import inputpluginspath, fontscollectionpath 56 ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5 /site-packages/mapnik/_mapnik.so, 10): Library not loaded: libmapnik.dylib Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5 /site-packages/mapnik/_mapnik.so Reason: image not found }}} -- Ticket URL: <http://trac.macports.org/ticket/19114#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19114: New Port: Mapnik ---------------------------------------+------------------------------------ Reporter: dbsgeo@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.7.0 Keywords: gis,graphics,boost,python | Port: Mapnik ---------------------------------------+------------------------------------ Comment(by dbsgeo@…): Great, thanks for taking a look at this and for the fixes. I'm curious about the switch to using: {{{ FRAMEWORK_PYTHON=True }}} My experience is that will more likely link the python module against the system python, and will create a version mismatch if boost is correctly linked to the macports python (but see #17998). What does this give on your system? {{{ otool -L /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5 /site-packages/mapnik/_mapnik.so }}} And {{{ otool -L /opt/local/lib/mapnik/libmapnik.dylib }}} Regarding the error, this is happening because libmapnik.dylib is likely installed in {{{ /opt/local/lib/mapnik/libmapnik.dylib }}} but not automatically found without: {{{ export DYLD_LIBRARY_PATH=/opt/local/lib/mapnik/ }}} Does setting that allow the library to be found? -- Ticket URL: <http://trac.macports.org/ticket/19114#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19114: New Port: Mapnik ---------------------------------------+------------------------------------ Reporter: dbsgeo@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.7.0 Keywords: gis,graphics,boost,python | Port: Mapnik ---------------------------------------+------------------------------------ Comment(by dbsgeo@…): Okay, looks like I've got a fix for the library issue. Using `export DYLD_LIBRARY_PATH=/opt/local/lib/` is a disaster. Here is a patch that fixes things by providing the full path to the library location: See: http://qin.laya.com/tech_coding_help/dylib_linking.html {{{ Index: src/SConscript =================================================================== --- src/SConscript (revision 1105) +++ src/SConscript (working copy) @@ -31,13 +31,15 @@ install_prefix = env['DESTDIR'] + '/' + prefix +libdir = os.path.normpath(install_prefix + '/' + env['LIBDIR_SCHEMA']) + libraries = env['LIBS'] if env['INTERNAL_LIBAGG']: libraries.insert(0, 'agg') if env['PLATFORM'] == 'Darwin': - linkflags = '-Wl,-install_name,libmapnik.dylib' + linkflags = '-Wl,-install_name,%s/libmapnik.dylib' % libdir elif env['PLATFORM'] == 'SunOS' and env['CXX'].startswith('CC'): linkflags = '-R. -h libmapnik.so' else: # Linux and others }}} -- Ticket URL: <http://trac.macports.org/ticket/19114#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19114: New Port: Mapnik ---------------------------------------+------------------------------------ Reporter: dbsgeo@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.7.0 Keywords: gis,graphics,boost,python | Port: Mapnik ---------------------------------------+------------------------------------ Comment(by dbsgeo@…): Also, attaching a new portfile which removes the optional LIB_DIR_NAME usage (which does not affect the libmapnik.dylib but will result in problems with fonts due to a bug now fixed in trunk. -- Ticket URL: <http://trac.macports.org/ticket/19114#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19114: New Port: Mapnik ---------------------------------------+------------------------------------ Reporter: dbsgeo@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.7.0 Keywords: gis,graphics,boost,python | Port: Mapnik ---------------------------------------+------------------------------------ Comment(by dbsgeo@…): Okay, I've given up with python25 because the boost python port can link against it. But the python26 install with boost +python26 works. So, I'm attaching a new Portfile for python 26 from here: http://mapnik- utils.googlecode.com/svn/sandbox/ports/graphics/py26-mapnik/Portfile with a slightly improved 'src/SConscript' patch as well. It will need python26 rebuilt after: http://trac.macports.org/changeset/50085 -- Ticket URL: <http://trac.macports.org/ticket/19114#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19114: New Port: Mapnik ---------------------------------------+------------------------------------ Reporter: dbsgeo@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.7.0 Keywords: gis,graphics,boost,python | Port: Mapnik ---------------------------------------+------------------------------------ Comment(by dbsgeo@…): This Portfile is now working great for the first time for me with Portfile.5, the corresponding patch, and these steps: {{{ sudo port install python26 python_select sudo python_select python26 sudo port install jam sudo port install boost +icu +python26 sudo port install py26-mapnik }}} -- Ticket URL: <http://trac.macports.org/ticket/19114#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19114: New Port: Mapnik ---------------------------------------+------------------------------------ Reporter: dbsgeo@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.7.0 Keywords: gis,graphics,boost,python | Port: Mapnik ---------------------------------------+------------------------------------ Comment(by dbsgeo@…): I should mention that one small problem still exists. The SCons build tool is failing to properly sense build targets so all files are being compiled twice. Adding the argument --debug=explain show that SCons is being dumb here so I need to look into why this as happening as it makes the build take twice as long. An alternative would be to build and install in one fell swoop but I'm not sure about how to do that in the Portfile syntax yet. -- Ticket URL: <http://trac.macports.org/ticket/19114#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19114: New Port: Mapnik ---------------------------------------+------------------------------------ Reporter: dbsgeo@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.7.0 Keywords: gis,graphics,boost,python | Port: Mapnik ---------------------------------------+------------------------------------ Comment(by dbsgeo@…): Okay, now using configure solves the above problem of double compilation. Portfile again updated, but I'm making small tweaks to the variant options now so until I'm finished the current Portfile can be found at: http://mapnik- utils.googlecode.com/svn/sandbox/ports/graphics/py26-mapnik/Portfile Changes made to solve the above problem were: http://code.google.com/p /mapnik-utils/source/detail?r=676# -- Ticket URL: <http://trac.macports.org/ticket/19114#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19114: New Port: Mapnik -----------------------------+---------------------------------------------- Reporter: dbsgeo@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Component: ports Version: 1.7.0 | Keywords: gis,graphics,boost,python Port: Mapnik | -----------------------------+---------------------------------------------- Comment(by dbsgeo@…): Okay, I've found no more major changes needed since my previous comment about fixing the duplicate configure. As far as I'm concerned this is ready for submission. I will attach the Portfile again which should be used with the previously attached patch. -- Ticket URL: <http://trac.macports.org/ticket/19114#comment:14> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19114: New Port: Mapnik -------------------------------+-------------------------------------------- Reporter: dbsgeo@… | Owner: macports-tickets@… Type: submission | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.7.0 Resolution: fixed | Keywords: gis,graphics,boost,python Port: Mapnik | -------------------------------+-------------------------------------------- Changes (by raimue@…): * status: new => closed * resolution: => fixed Comment: Committed in r50498. -- Ticket URL: <http://trac.macports.org/ticket/19114#comment:15> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts