[Gdal-dev] Re: undefined python objects
Sean Fulton
fulton at cmu.edu
Wed Dec 3 10:51:47 EST 2003
> On Dec 1, 2003, at 4:11 PM, Sean Fulton wrote:
>
>>> I am trying to compile GDAL on OSX with python support, but I get
>>> the following errors on building:
>>> <SNIP>
>>> The only advice I have seen so far is to compile without python
>>> support, but thats not really a solution. Python support is the only
>>> reason I am looking to use GDAL.
>>>
>>> Thanks in advance,
>>
>> Chris,
>>
>> The python that comes with OS X isn't set-up the way it is on other
>> OSs. There is no shared library (i.e. libpython.so or
>> libpython.dylib), at least on 10.2, to which GDAL can link . I
>> *think* 10.3 has python as a framework in which case you may be able
>> to link against
>> /Library/Frameworks/Python.framework/Versions/Current/Python by
>> passing '-framework Python' to the linker. Or you could try creating
>> a soft link from /path/to/lib/libpython2.3.dylib to
>> /Library/Frameworks/Python.framework/Versions/Current/Python.
>>
>> I think you can build python as a framework by hand if you're not on
>> Panther. Searching python.org will probably be more useful than I
>> have been. The GDAL developers probably don't have the time or
>> resources to hunt down platform inconsistencies like this, so I'm
>> sure they'd appreciate any help in resolving it.
>>
>> Good luck, and let us know if you get it working!
>>
>> Sean
>>
>> _______________________________________________
>> Gdal-dev mailing list
>> Gdal-dev at remotesensing.org
>> http://remotesensing.org/mailman/listinfo/gdal-dev
>>
>>
>
> I have used "-framework Python" as the python link arguments, and
> based on the build output, I think it finds it:
>
> g++ -Wall -O2 -I../port -I../port -I../gcore -I../ogr
> -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/
> python2.3
> -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/
> python2.3 -c gdalnumeric.cpp -o gdalnumeric.o >/dev/null 2>&1
>
Those are the include files in that line. Listed twice for some
unknown-to-me reason. Something in the configure script is adding it
twice but we shouldn't have to worry about that now.
> It still, however, gets the undefined symbols that I cited previously.
> If it finds the framework, then the problem lies elsewhere, doesnt it?
>
I believe, if there are undefined symbols, it's not linking. I've just
upgraded to Panther but I don't have the developer CD yet. I think I
did get it to link properly once but now have problems with missing
headers.
You might try building with ' make
PYTHON_LIBS="-L/Library/Frameworks/Python.framework/Versions/Current/
Python" '
> Thanks again,
> Chris
>
Good luck. I'll give it a try once I get a Dev CD and see if we can't
beat Panther into submission.
Sean
More information about the Gdal-dev
mailing list