Hey Dane et al., I gave Robert's suggestions a try using a fresh trunk checkout (r697). After removing the Python framework I found in /Library/Frameworks as suggested, I rebuilt boost successfully, rebuilt Mapnik successfully, but I still got the same NoneType error. Then I tried removing the Python framework in /System/Library/Frameworks, hoping that the MacPorts boost port was at least smart enough to fall back to linking against my MacPorts installation of Python instead of the /System/Library/Frameworks one. The boost port (+python25+icu) seemed to build just fine, but when I tried to build Mapnik, I got
g++ -o bindings/python/_mapnik.so -F/ -framework Python -bundle bindings/python/mapnik_color.os bindings/python/mapnik_coord.os bindings/python/mapnik_datasource.os bindings/python/mapnik_datasource_cache.os bindings/python/mapnik_envelope.os bindings/python/mapnik_feature.os bindings/python/mapnik_featureset.os bindings/python/mapnik_filter.os bindings/python/mapnik_font_engine.os bindings/python/mapnik_image.os bindings/python/mapnik_image_view.os bindings/python/mapnik_layer.os bindings/python/mapnik_line_pattern_symbolizer.os bindings/python/mapnik_line_symbolizer.os bindings/python/mapnik_map.os bindings/python/mapnik_parameters.os bindings/python/mapnik_point_symbolizer.os bindings/python/mapnik_polygon_pattern_symbolizer.os bindings/python/mapnik_polygon_symbolizer.os bindings/python/mapnik_projection.os bindings/python/mapnik_python.os bindings/python/mapnik_query.os bindings/python/mapnik_raster_symbolizer.os bindings/python/mapnik_rule.os bindings/python/mapnik_shield_symbolizer.os bindings/python/mapnik_stroke.os bindings/python/mapnik_style.os bindings/python/mapnik_text_symbolizer.os bindings/python/python_cairo.os -Lagg -Lsrc -L/usr/lib -L/usr/local/lib -L/opt/local/lib -lmapnik -lpng -ljpeg -lboost_python-mt -licuuc -licudata -lboost_regex-mt -lboost_thread-mt ld: framework not found Python collect2: ld returned 1 exit status scons: *** [bindings/python/_mapnik.so] Error 1 scons: building terminated because of errors. Which I'm assuming just means the boost port DOES hard code a reference to /System/Library/Frameworks/Python.framework somewhere, and doesn't look around for a Python installation that actually works. Boo. Anyway, still no mapnik for me. Sigh. I'll try again in a month or two when my time/sanity reserves have been replenished. Since this error is so uncommon, I'm sure it's just a quirk with my machine. Thanks for all your help, Dane and Robert! -Ken-ichi On Tue, Apr 22, 2008 at 9:06 AM, Dane Springmeyer <[EMAIL PROTECTED]> wrote: > Ken-ichi, > > On the Mapnik Dev list a Robert ran into your same NoneType error and has > an explanation/fix. > > See his > email:https://lists.berlios.de/pipermail/mapnik-devel/2008-April/000614.html > > Do report back if that works for you, > > Cheers, > > Dane > > > On Apr 17, 2008, at 3:09 PM, Ken-ichi wrote: > > > > > Hey Dane, > > > > (You are a support super hero today!) Thanks for the tip. I tried it > > (after rebuilding boost and python), but still a no-go. Here's what I > > did: > > > > mapnik-0.5.1 > printenv > > ... > > > PATH=/opt/local/lib/postgresql82/bin:/opt/local/apache2/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/opt/local/lib/mysql5/bin/:/bin:/sbin:/usr/bin:/usr/sbin > > ... > > > > mapnik-0.5.1 > python scons/scons.py DEBUG=y > > scons: Reading SConscript files ... > > Building on Darwin ... > > Checking for C library m... (cached) yes > > Checking for C library ltdl... (cached) yes > > Checking for C library png... (cached) yes > > Checking for C library tiff... (cached) yes > > Checking for C library z... (cached) yes > > Checking for C library jpeg... (cached) yes > > Checking for C library proj... (cached) yes > > Checking for C library iconv... (cached) yes > > Checking for C library pq... (cached) no > > Checking for C++ library gdal... (cached) yes > > Checking for C++ library boost_filesystem-mt... (cached) yes > > Checking for C++ library boost_regex-mt... (cached) yes > > Checking for C++ library boost_iostreams-mt... (cached) yes > > Checking for C++ library boost_program_options-mt... (cached) yes > > Checking for C++ library boost_thread-mt... (cached) yes > > Bindings Python version... 2.5 > > Python 2.5 prefix... /opt/local > > scons: done reading SConscript files. > > scons: Building targets ... > > ... > > scons: done building targets. > > > > mapnik-0.5.1 > sudo python scons/scons.py DEBUG=y install > > ... > > scons: done building targets. > > > > mapnik-0.5.1 > python > > Python 2.5.2 (r252:60911, Apr 17 2008, 13:25:37) > > [GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > > > > > from mapnik import * > > > > > > > > > > > > > > registered datasource : gdal > > registered datasource : raster > > registered datasource : shape > > > > > > > > > > > > > > m = Map(600,300,"+proj=latlong +datum=WGS84") > > > > > > > > > > > > > > Traceback (most recent call last): > > File "<stdin>", line 1, in <module> > > TypeError: __init__() should return None, not 'NoneType' > > > > > > This is on my OS 10.4 system at work. I'll try it under 10.5 when I > > get home (I've gotten the same error on both systems in the past). > > > > -Ken-ichi > > > > > > > > On Thu, Apr 17, 2008 at 12:47 PM, Dane Springmeyer <[EMAIL PROTECTED]> > wrote: > > > > > Hi Ken, > > > > > > So you are still trying to avoid those nonetype errors, huh? Well, I > > > just looked back at your email and yes: from my experience with > > > compiling mapnik dependencies macports has been troublesome. I would > > > recommend trying to compile the mapnik libs in the default /usr/local/ > > > lib/mapnik location. > > > > > > I still rely on macports for the boost libraries and a few image > > > libaries, and scons is able to find them in /opt/local/ without > > > explicitly setting those path during the scons build as long as the > > > macports binaries are on my path (export PATH=/opt/local/bin:/opt/ > > > local/sbin:$PATH). > > > > > > So my build just looks like this: > > > > > > python scons/scons.py DEBUG=y PGSQL_INCLUDES=/usr/local/pgsql/include > > > PGSQL_LIBS=/usr/local/pgsql/lib > > > > > > Dane > > > > > > > > > > > > On Apr 17, 2008, at 11:49 AM, Ken-ichi wrote: > > > > > > > > > > > > > > > > Hi Claire, > > > > > > > > I'm still struggling to get mapnik installed myself, but here are > > > > somethings you can try: > > > > > > > > - check when version of python you're running with > > > > > > > > which python > > > > > > > > and make sure that's the same framework python for which you > > > > installed mapnik. > > > > > > > > > > > > - in your mapnik src dir, try > > > > > > > > python scons/scons.py -h > > > > > > > > with whatever flags you initially used to compile and make sure that > > > > all the paths line up with what you might expect. It's possible you > > > > have another copy of python installed on your system (e.g. the > > > > MacPorts version), and mapnik installed itself there instead of where > > > > you think. > > > > > > > > Hope that helps a little. > > > > > > > > > > > > -Ken-ichi > > > > > > > > > > > > > > > > On Thu, Apr 17, 2008 at 10:35 AM, Claire McLister > > > > <[EMAIL PROTECTED]> wrote: > > > > > > > > > Hi, > > > > > > > > > > I just managed to get mapnik compiled and installed on Mac OS X. > > > > > > > > > > When I invoke python and try to import mapnik, I get the following > > > > > error: > > > > > > > > > > Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:16) > > > > > [GCC 4.0.1 (Apple Inc. build 5465)] on darwin > > > > > Type "help", "copyright", "credits" or "license" for more > > > > > information. > > > > > > > > > > > > > > > > > > > > > > > > > > from mapnik import * > > > > > > > > > > > > > > > > > > > > > > > > > > Traceback (most recent call last): > > > > > File "<stdin>", line 1, in <module> > > > > > ImportError: No module named mapnik > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > If I look under the site-packages directory for python, mapnik.so > > > > > seems to be there: > > > > > > > > > > [zeemac:site-packages]$ ls -l /System/Library/Frameworks/ > > > > > Python.framework/Versions/2.5/lib/python2.5/site-packages/mapnik/ > > > > > total 5248 > > > > > -rw-r--r-- 1 root wheel 2911 Sep 25 2007 __init__.py > > > > > -rwxr-xr-x 1 root wheel 2675520 Apr 17 10:04 _mapnik.so* > > > > > drwxr-xr-x 11 root wheel 374 Apr 17 10:09 ogcserver/ > > > > > -rw-r--r-- 1 root wheel 132 Apr 17 10:09 paths.py > > > > > [zeemac:site-packages]$ > > > > > > > > > > Can someone please point me in the right direction? > > > > > > > > > > Thanks > > > > > > > > > > Claire > > > > > > > > > > -- > > > > > Claire McLister [EMAIL PROTECTED] > > > > > 21060 Homestead Road Suite 150 > > > > > Cupertino, CA 95014 408-733-2737(fax) > > > > > > > > > > http://www.zeemaps.com > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Mapnik-users mailing list > > > > > [email protected] > > > > > https://lists.berlios.de/mailman/listinfo/mapnik-users > > > > > > > > > > > > > > _______________________________________________ > > > > Mapnik-users mailing list > > > > [email protected] > > > > https://lists.berlios.de/mailman/listinfo/mapnik-users > > > > > > > > > > _______________________________________________ > > > Mapnik-users mailing list > > > [email protected] > > > https://lists.berlios.de/mailman/listinfo/mapnik-users > > > > > > > > > > _______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

