[gdal-dev] GDAL / Python and PPC

William Kyngesburye woklist at kyngchaos.com
Sat Jan 5 17:17:27 EST 2008


On Jan 5, 2008, at 2:54 PM, Brian Hamlin wrote:

> Hi all-
>
>  over the winter break, I decided I would get into the Python swing  
> of things.. I loaded numpy into my OS X Framework Python 2.5.1. The  
> problem was, numpy wanted to build both i386 and PPC architectures.  
> I jiggled and rattled - I honestly dont remember exactly, and built  
> just the PPC architecture. This is OS 10.4.10. All the tests run  
> fine, and import numpy is happy in the interactive shell.
>
> * I have numpy in python. * import numpy works fine without any GDAL  
> anything ***
>
What about the the numpy binary?

http://pythonmac.org/packages/

This is usually kept up to date, though right now it's a version  
behind.  But it's universal and built for the Python universal package.

For building it yourself, normally python extensions will build  
universal by default.  But numpy may not.  Try setting ARCHFLAGS  
before building numpy

export ARCHFLAGS="-arch ppc -arch i386"

If you are still having problems, this is really a question that  
should be asked on the Mac python list.

>  Now, moving to GDAL, I configured --with-python, and make. The  
> build gets to SWIG, which gets to Python, which sees Numpy, and..  
> issues the commands in a striking yellow text to build both PPC and  
> i386 arch. This fails, and the make comes to a halt. Oh yes, it is  
> in the make install, actually. Make itself succeeds.
>
Correct, because GDAL python *does* attempt to build universal by  
default, which fails because numpy is not.

>

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

[Trillian]  What are you supposed to do WITH a maniacally depressed  
robot?

[Marvin]  You think you have problems?  What are you supposed to do if  
you ARE a maniacally depressed robot?  No, don't try and answer, I'm  
50,000 times more intelligent than you and even I don't know the  
answer...

- HitchHiker's Guide to the Galaxy




More information about the gdal-dev mailing list