On Sep 13, 2008, at 2:05 PM, William Kyngesburye wrote:

If not, it may be necessary to make the symlinks in /usr/local/lib

Michael

Python is not broken, so we should try to avoid "fixing" it with symlinks. it's more a problem of a confused or broken linker.

Either someone figures out distutils, or we work around it by editing platform.make (until a better fix is found) or do something in configure.


Here's a mostly proper way to do it - technically, binary python extensions on OSX don't need to link directly to python (as I've mentioned before). Either you use the -bundle-loader link flag (the standard way, what distutils would do) or use -undefined dynamic_lookup (the alternative).

Since we already use -undefined dynamic_lookup to handle the libgdi problem, we don't need any of the python ldflags. In the vdigit makefile, like this:

EXTRA_LIBS = $(VECTLIB) $(GISLIB) $(GDALLIBS) $(VEDITLIB) $ (WXWIDGETSLIB)
ifeq ($(findstring darwin,$(ARCH)),darwin)
EXTRA_LIBS := -bundle -undefined dynamic_lookup $(EXTRA_LIBS)
else
EXTRA_LIBS := $(EXTRA_LIBS) $(PYTHONLDFLAGS) -lgdi
endif

I moved the PYTHONLDFLAGS into the non-OSX extra-libs. In the same manner, since wxnviz also has a binary python extension, we should do the same thing in the wxpython nviz makefile (just without the -lgdi bit):

EXTRA_LIBS = $(GISLIB) $(WXWIDGETSLIB) $(XLIBPATH) $(XMLIB) $(XTLIB) $ (XLIB) $(XEXTRALIBS) $(OGSFLIB) $(NVIZLIB)
ifeq ($(findstring darwin,$(ARCH)),darwin)
EXTRA_LIBS := -bundle -undefined dynamic_lookup $(EXTRA_LIBS)
else
EXTRA_LIBS := $(EXTRA_LIBS) $(PYTHONLDFLAGS)
endif


-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"I ache, therefore I am.  Or in my case - I am, therefore I ache."

- Marvin


_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to