[Mapnik-users] Mac OS python binding issue
kenichi.ueda at gmail.com
Sat Apr 26 01:16:26 CEST 2008
Thanks Chris. Actually, I just fixed my own problem a few minutes ago
(at least under OS 10.4, macports boost 1.34.1)! I think the problem
was not with how boost was linking against Python, but with how mapnik
was doing so. Changing line 58 in bindings/python/SConscript of r697
linkflags = '-F/ -framework Python'
linkflags = '-lpython2.5'
cleared everything up. I think this forces mapnik to link against the
first copy of libpython2.5.whatever it finds in your PATH (in my case,
it's /opt/local/lib/libpython2.5.dylib), but I don't really know. ld
is black magic to me. After making this change, I successfully ran
the demo and got some real pretty maps! I'm not entirely sure how to
do this without hardcoding the decision between linking against a
framework and linking against a dynamic lib, or whether that decision
should even be made automatically (as opposed to a flag option for
scons), so I'll leave a patch (if there will be one) up to those who
know what they're doing. For now, I suspect this should work for
people who run a non-framework version of Python like the MacPorts
one, and who are experiencing NoneType errors.
Thanks for your help, everyone! I think this is the longest I've ever
spent trying to debug a build process.
On Wed, Apr 23, 2008 at 9:08 AM, Christopher Barker
<Chris.Barker at noaa.gov> wrote:
> Ken-ichi wrote:
> > Then I tried removing the
> > Python framework in /System/Library/Frameworks,
> Just a note: You really don't want to do this. Apple uses that for some
> system utilities. In fact, you never want to touch anything in /System.
> Sorry I can't help with your problem.
> Christopher Barker, Ph.D.
> Emergency Response Division
> NOAA/NOS/OR&R (206) 526-6959 voice
> 7600 Sand Point Way NE (206) 526-6329 fax
> Seattle, WA 98115 (206) 526-6317 main reception
> Chris.Barker at noaa.gov
More information about the Mapnik-users