[Numpy-discussion] F2PY error : ... on platform 'posix' with 'gcc' compiler
Fri Sep 25 14:08:47 CDT 2009
Ok, so I re-compiled python (without framework), numpy,... So I can compile
my lib (libsw) now, bu I can't called it from python. I got this error :
Arths-MacBook-Pro:run_1 arthbous$ ./run.sh
Traceback (most recent call last):
File "../main.py", line 23, in <module>
import libsw as lsw
ImportError: dlopen(/Users/arthbous/Documents/SW/sw-v2.3/libsw.so, 2): no
suitable image found. Did find:
/Users/arthbous/Documents/SW/sw-v2.3/libsw.so: mach-o, but wrong
It seems to compile for the wrong architecture. Do you know about this ?
On Fri, Sep 25, 2009 at 2:53 PM, Robert Kern <email@example.com> wrote:
> On Fri, Sep 25, 2009 at 13:43, Arthur Bousquet <firstname.lastname@example.org>
> > Thank you a lot for your help. So I deleted as you said, but then I do
> > --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
> NumPy-Discussion mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion