[f2py] Installing and Testing f2py on a Mac G4

Samuel H. Dupree, Jr. sdupree at speakeasy.net
Fri Jan 19 05:15:09 EET 2007


I'm attempting to install and test f2py on a Mac G4 running Mac OS 
10.4.8. The version of python I have installed is Python 2.4.3:

ActivePython 2.4.3 Build 11 (ActiveState Software Inc.) based on
Python 2.4.3 (#1, Apr  3 2006, 18:07:18)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin


I was successful in installing f2py. My problem appears to be testing 
the installation. In running hello.f,

C File hello.f
      subroutine foo (a)
      integer a
      print*, "Hello from Fortran!"
      print*, "a=",a
      end

I encountered the following messages:

dsl092-239-159:/F2PY-2.45.241_1926 samueldupree$ f2py -c -m hello hello.f
running build
running config_fc
running build_src
building extension "hello" sources
f2py options: []
f2py:> /tmp/tmpEQpdLG/src.darwin-8.8.0-Power_Macintosh-2.4/hellomodule.c
creating /tmp/tmpEQpdLG
creating /tmp/tmpEQpdLG/src.darwin-8.8.0-Power_Macintosh-2.4
Reading fortran codes...
        Reading file 'hello.f' (format:fix,strict)
Post-processing...
        Block: hello
                        Block: foo
Post-processing (stage 2)...
Building modules...
        Building module "hello"...
                Constructing wrapper function "foo"...
                  foo(a)
        Wrote C/API module "hello" to file 
"/tmp/tmpEQpdLG/src.darwin-8.8.0-Power_Macintosh-2.4/hellomodule.c"
  adding 
'/tmp/tmpEQpdLG/src.darwin-8.8.0-Power_Macintosh-2.4/fortranobject.c' to 
sources.
  adding '/tmp/tmpEQpdLG/src.darwin-8.8.0-Power_Macintosh-2.4' to 
include_dirs.
copying 
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/numpy/f2py/src/fortranobject.c 
-> /tmp/tmpEQpdLG/src.darwin-8.8.0-Power_Macintosh-2.4
copying 
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/numpy/f2py/src/fortranobject.h 
-> /tmp/tmpEQpdLG/src.darwin-8.8.0-Power_Macintosh-2.4
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
customize NAGFCompiler
*Couldn't match compiler version for 'ERROR: No input files.\nPro 
Fortran 9.2'*
customize AbsoftFCompiler
customize AbsoftFCompiler
customize AbsoftFCompiler using build_ext
building 'hello' extension
compiling C sources
C compiler: gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp 
-mno-fused-madd -fPIC -fno-common -dynamic -DNDEBUG -g -O3 -Wall 
-Wstrict-prototypes

creating /tmp/tmpEQpdLG/tmp
creating /tmp/tmpEQpdLG/tmp/tmpEQpdLG
creating /tmp/tmpEQpdLG/tmp/tmpEQpdLG/src.darwin-8.8.0-Power_Macintosh-2.4
compile options: '-I/tmp/tmpEQpdLG/src.darwin-8.8.0-Power_Macintosh-2.4 
-I/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/numpy/core/include 
-I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -c'
gcc: /tmp/tmpEQpdLG/src.darwin-8.8.0-Power_Macintosh-2.4/hellomodule.c
*gcc: unrecognized option '-no-cpp-precomp'*
*cc1: error: unrecognized command line option "-Wno-long-double"*
*gcc: unrecognized option '-no-cpp-precomp'
cc1: error: unrecognized command line option "-Wno-long-double"
error: Command "gcc -fno-strict-aliasing -Wno-long-double 
-no-cpp-precomp -mno-fused-madd* -fPIC -fno-common -dynamic -DNDEBUG -g 
-O3 -Wall -Wstrict-prototypes 
-I/tmp/tmpEQpdLG/src.darwin-8.8.0-Power_Macintosh-2.4 
-I/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/numpy/core/include 
-I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -c 
/tmp/tmpEQpdLG/src.darwin-8.8.0-Power_Macintosh-2.4/hellomodule.c -o 
/tmp/tmpEQpdLG/tmp/tmpEQpdLG/src.darwin-8.8.0-Power_Macintosh-2.4/hellomodule.o" 
failed with exit status 1
dsl092-239-159:/F2PY-2.45.241_1926 samueldupree$

It's not clear to me what the highlighted messages mean, or what actions 
I need to take. Any thoughts?

Thanks in advance.

Sam Dupree.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cens.ioc.ee/pipermail/f2py-users/attachments/20070118/ccdcb727/attachment.html


More information about the f2py-users mailing list