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

Robert Kern robert.kern@gmail....
Fri Sep 25 10:59:02 CDT 2009


On Fri, Sep 25, 2009 at 10:48, Arthur Bousquet <arthbous@indiana.edu> wrote:
> I used compiler=gcc, here is the command :
>
> f2py2.6 --fcompiler=gfortran --compiler=gcc -DF2PY_REPORT_ON_ARRAY_COPY=1 -m
> libsw -c file1.f90 file2.f90
>
> Ok so you said that "--compiler=gcc" is not a command ?

Correct. --compiler= does not tell distutils what executable to use,
but the internal name given to the class that implements the logic of
creating the command lines to compile things.

$ python setup.py build_ext --help-compiler
Running from numpy source directory.
List of available compilers:
  --compiler=bcpp     Borland C++ Compiler
  --compiler=cygwin   Cygwin port of GNU C Compiler for Win32
  --compiler=emx      EMX port of GNU C Compiler for OS/2
  --compiler=intel    Intel C Compiler for 32-bit applications
  --compiler=intele   Intel C Itanium Compiler for Itanium-based applications
  --compiler=mingw32  Mingw32 port of GNU C Compiler for Win32
  --compiler=msvc     Microsoft Visual C++
  --compiler=mwerks   MetroWerks CodeWarrior
  --compiler=unix     standard UNIX-style compiler

> So I removed the line "--compiler=gcc", and I got a new error :
>
> error: Command "gcc -arch ppc -arch i386 -isysroot
> /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -fPIC -fno-common
> -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
> -DF2PY_REPORT_ON_ARRAY_COPY=1
> -I/var/folders/N2/N2Z4lrkgHb0iyoQobv1DcE+++TI/-Tmp-/tmpJRch8F/src.macosx-10.3-fat-2.6
> -I/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include
> -I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c
> /var/folders/N2/N2Z4lrkgHb0iyoQobv1DcE+++TI/-Tmp-/tmpJRch8F/src.macosx-10.3-fat-2.6/fortranobject.c
> -o
> /var/folders/N2/N2Z4lrkgHb0iyoQobv1DcE+++TI/-Tmp-/tmpJRch8F/var/folders/N2/N2Z4lrkgHb0iyoQobv1DcE+++TI/-Tmp-/tmpJRch8F/src.macosx-10.3-fat-2.6/fortranobject.o"
> failed with exit status 1
> make[1]: *** [libsw] Error 1
> make: *** [libsw] Error 2
>
>
> Why some macs-10.3 appeare but if I do the "export
> MACOSX_DEPLOYMENT_TARGET=10.6" they all become "10.6" but I still have the
> same error.

Please show the full output, not snippets. There should be some output
just before the "error:" line that shows gcc's error messages.

-- 
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