[Numpy-discussion] F2PY error : ... on platform 'posix' with 'gcc' compiler

Robert Kern robert.kern@gmail....
Fri Sep 25 13:53:37 CDT 2009

On Fri, Sep 25, 2009 at 13:43, Arthur Bousquet <arthbous@indiana.edu> wrote:
> Thank you a lot for your help. So I deleted as you said, but then I do with
> --enable-framework for python, at the make there is an error :
> ln -fsn 2.6 Python.framework/Versions/Current
> ln -fsn Versions/Current/Python Python.framework/Python
> ln -fsn Versions/Current/Headers Python.framework/Headers
> ln -fsn Versions/Current/Resources Python.framework/Resources
> gcc  -u _PyMac_Error Python.framework/Versions/2.6/Python -o python.exe \
>             Modules/python.o \
>              -ldl
> ld: warning: in Python.framework/Versions/2.6/Python, file is not of
> required architecture
> Undefined symbols:
>   "_PyMac_Error", referenced from:
>   "_Py_Main", referenced from:
>       _main in python.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> make: *** [python.exe] Error 1
> Do you know why I have this ?

You may need some patches from Apple in order to compile Python for
the (now-default) x86_64 CPU architecture. There may be configure
flags to only use x86, though. You will have to check the --help and
read the documentation. I'm afraid that is about all I know on the
subject; I have not upgraded to Snow Leopard, yet, or attempted to
build Python on it.

> And also does "export
> MACOSX_DEPLOYMENT_TARGET=10.6" is necessary ?

Quite possibly.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco

More information about the NumPy-Discussion mailing list