On Jan 27, 2005, at 8:34, Darran Edmundson wrote:


Can anyone explain how to get GDAL http://www.remotesensing.org/gdal/index.html to compile with python bindings. I've downloaded from http://gdal.org/dl/, tried the standard "configure; make" but get the following:

g++ -Wl,-bind_at_load -o .libs/_gdalmodule.so -bundle .libs/gdal_wrap.o .libs/numpydataset.o .libs/gdalnumeric.o ../.libs/libgdal.dylib
ld: Undefined symbols:
_PyArg_Parse
_PyArg_ParseTuple
_PyDict_New
_PyDict_Next
_PyDict_SetItem
_PyDict_Type
_PyErr_Clear
_PyErr_SetString
[...]


Someone brought this issue up on the list back in Nov 2003 but
there was no response to this same problem.

GDAL is broken-ish because it doesn't use distutils to link modules.

Try this:

env MACOSX_DEPLOYMENT_TARGET=10.3 g++ -Wl,-bind_at_load -o .libs/_gdalmodule.so -bundle .libs/gdal_wrap.o .libs/numpydataset.o .libs/gdalnumeric.o ../.libs/libgdal.dylib -bundle -undefined dynamic_lookup

( this is largely from the LDSHARED setting in Python's Makefile that gets installed to %(sys.prefix)s/lib/python%(sys.version[:3])s/config/Makefile )

-bob

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to