[gdal-dev] Newbie compile problem on Mac OS X (10.1.2)
Frank Warmerdam
warmerdam at p...
Tue Feb 5 15:59:21 EST 2002
dilsavor wrote:
> Hi all,
> I am trying to compile gdal-1.1.5 on Max OS X with fink. I have
> installed the binary distribution of python 2.2 from fink and it lives
> in /sw - the fink convention. I am compiling gdal in /usr/local
> Seems like I get pretty far through the make until I get the
> following error:... Any clues you can give me?
> Thanks
> Ron
>
>
> (cd pymod; make)
> cc -dynamiclib gdal_wrap.o numpydataset.o gdalnumeric.o \
> -L.. -lgdal.1.1 -lz -lm -L/usr/local/lib -lm -o _gdalmodule.so
> ld: Undefined symbols:
> _PyArg_Parse
> _PyArg_ParseTuple
> _PyDict_New
> _PyDict_SetItem
> _PyErr_SetString
> _PyEval_CallObjectWithKeywords
> _PyExc_NameError
> _PyExc_TypeError
> _PyExc_ValueError
> _PyList_New
> _PyList_SetItem
> _PyList_Size
> _PyList_Type
> _PyModule_GetDict
> _PyObject_GetAttrString
> _PyString_AsString
> _PyString_FromString
> _PyString_FromStringAndSize
> _PyString_Type
> _PyType_IsSubtype
> _PyType_Type
> _Py_BuildValue
> _Py_InitModule4
> __Py_NoneStruct
> /usr/bin/libtool: internal link edit command failed
> make[1]: *** [_gdalmodule.so] Error 1
> make: *** [py-module] Error 2
>
Ron,
Try hacking in something to link against the python library. Perhaps
something like adding the following line after the include statement
in gdal/pymod/GNUmakefile:
LIBS := $(LIBS) /sw/lib/libpython2.1.so
Of course, you will have to adjust the library name to match your circumstances.
On Linux the above functions remain undefined in the _gdalmodule.so, and are
already satisfied when the module is loaded by Python since the python
executable links against the required library.
I guess it must be the same on most other Unix platforms since I haven't
run into this problem before.
Good luck,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at p...
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list