[f2py] Trouble with gfortran build on OS X Tiger (i386)
Vic Kelson
vic at wittmanhydro.com
Wed Jan 31 16:40:18 EET 2007
Hi Everyone,
I am having trouble building an extension on Mac OS X Tiger using gfortran.
It appears that during the link phase, at least one PowerPC library is being
included(?) in the .so file.
Here's the voluminous output from f2py, including all the errors and
warnings, including my attempt to test the extension.
THANKS for all your help!
Vic Kelson
ic-kelsons-computer:~/aurora vic$ f2py --fcompiler=gnu95 -c -m aurora
aurora_common.f90 well_collection.f90
running build
running config_fc
running build_src
building extension "aurora" sources
f2py options: []
f2py:> /tmp/tmpPoryGr/src.darwin-8.8.3-i386-2.4/auroramodule.c
creating /tmp/tmpPoryGr
creating /tmp/tmpPoryGr/src.darwin-8.8.3-i386-2.4
Reading fortran codes...
Reading file 'aurora_common.f90' (format:free)
Line #13 in aurora_common.f90:" real, parameter :: two_times_pi = 2.0 *
pi"
updatevars: no name pattern found for entity='*'. Skipping.
Reading file 'well_collection.f90' (format:free)
Post-processing...
Block: aurora
Block: aurora_common
Block: assert
Block: well_collection
Block: well_collection_init
Block: well_collection_destroy
Block: well_collection_add
Block: well_collection_potential_influence
Block: well_collection_potential
Post-processing (stage 2)...
Block: aurora
Block: unknown_interface
Block: aurora_common
Block: assert
Block: well_collection
Block: well_collection_init
Block: well_collection_destroy
Block: well_collection_add
Block: well_collection_potential_influence
Block: well_collection_potential
Building modules...
Building module "aurora"...
Constructing F90 module support for "aurora_common"...
Variables: pi ok except_space_exhausted two_times_pi
value_singular except_allocation_failed except_deallocation_failed
Creating wrapper for Fortran function "assert"("assert")...
Constructing wrapper function
"aurora_common.assert"...
rv = assert(cond,state,bad)
Constructing F90 module support for "well_collection"...
Creating wrapper for Fortran function
"well_collection_init"("well_collection_init")...
Constructing wrapper function
"well_collection.well_collection_init"...
state = well_collection_init(nelements)
Creating wrapper for Fortran function
"well_collection_destroy"("well_collection_destroy")...
Constructing wrapper function
"well_collection.well_collection_destroy"...
state = well_collection_destroy()
Creating wrapper for Fortran function
"well_collection_add"("well_collection_add")...
Constructing wrapper function
"well_collection.well_collection_add"...
state,idx = well_collection_add(xc,yc,r,s)
Creating wrapper for Fortran function
"well_collection_potential_influence"("well_collection_potential_influence")
...
Constructing wrapper function
"well_collection.well_collection_potential_influence"...
state = well_collection_potential_influence(x,y)
Creating wrapper for Fortran function
"well_collection_potential"("well_collection_potential")...
Constructing wrapper function
"well_collection.well_collection_potential"...
state,phi,psi = well_collection_potential(x,y)
Wrote C/API module "aurora" to file
"/tmp/tmpPoryGr/src.darwin-8.8.3-i386-2.4/auroramodule.c"
Fortran 90 wrappers are saved to
"/tmp/tmpPoryGr/src.darwin-8.8.3-i386-2.4/aurora-f2pywrappers2.f90"
adding '/tmp/tmpPoryGr/src.darwin-8.8.3-i386-2.4/fortranobject.c' to
sources.
adding '/tmp/tmpPoryGr/src.darwin-8.8.3-i386-2.4' to include_dirs.
copying
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-package
s/numpy/f2py/src/fortranobject.c -> /tmp/tmpPoryGr/src.darwin-8.8.3-i386-2.4
copying
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-package
s/numpy/f2py/src/fortranobject.h -> /tmp/tmpPoryGr/src.darwin-8.8.3-i386-2.4
adding '/tmp/tmpPoryGr/src.darwin-8.8.3-i386-2.4/aurora-f2pywrappers2.f90'
to sources.
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
Could not locate executable g77
Could not locate executable f77
Could not locate executable f95
customize Gnu95FCompiler
customize Gnu95FCompiler using build_ext
building 'aurora' 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/tmpPoryGr/tmp
creating /tmp/tmpPoryGr/tmp/tmpPoryGr
creating /tmp/tmpPoryGr/tmp/tmpPoryGr/src.darwin-8.8.3-i386-2.4
compile options: '-I/tmp/tmpPoryGr/src.darwin-8.8.3-i386-2.4
-I/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packa
ges/numpy/core/include
-I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -c'
gcc: /tmp/tmpPoryGr/src.darwin-8.8.3-i386-2.4/auroramodule.c
gcc: /tmp/tmpPoryGr/src.darwin-8.8.3-i386-2.4/fortranobject.c
compiling Fortran 90 module sources
Fortran f77 compiler: /usr/local/bin/gfortran -Wall -ffixed-form
-fno-second-underscore -fPIC -O3 -funroll-loops
Fortran f90 compiler: /usr/local/bin/gfortran -Wall -fno-second-underscore
-fPIC -O3 -funroll-loops
Fortran fix compiler: /usr/local/bin/gfortran -Wall -ffixed-form
-fno-second-underscore -Wall -fno-second-underscore -fPIC -O3 -funroll-loops
compile options: '-I/tmp/tmpPoryGr/src.darwin-8.8.3-i386-2.4
-I/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packa
ges/numpy/core/include
-I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -c'
extra options: '-J/tmp/tmpPoryGr/ -I/tmp/tmpPoryGr/'
gfortran:f90: aurora_common.f90
gfortran:f90: well_collection.f90
compiling Fortran sources
Fortran f77 compiler: /usr/local/bin/gfortran -Wall -ffixed-form
-fno-second-underscore -fPIC -O3 -funroll-loops
Fortran f90 compiler: /usr/local/bin/gfortran -Wall -fno-second-underscore
-fPIC -O3 -funroll-loops
Fortran fix compiler: /usr/local/bin/gfortran -Wall -ffixed-form
-fno-second-underscore -Wall -fno-second-underscore -fPIC -O3 -funroll-loops
compile options: '-I/tmp/tmpPoryGr/src.darwin-8.8.3-i386-2.4
-I/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packa
ges/numpy/core/include
-I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -c'
extra options: '-J/tmp/tmpPoryGr/ -I/tmp/tmpPoryGr/'
gfortran:f90:
/tmp/tmpPoryGr/src.darwin-8.8.3-i386-2.4/aurora-f2pywrappers2.f90
/usr/local/bin/gfortran -Wall -undefined dynamic_lookup -bundle
/tmp/tmpPoryGr/tmp/tmpPoryGr/src.darwin-8.8.3-i386-2.4/auroramodule.o
/tmp/tmpPoryGr/tmp/tmpPoryGr/src.darwin-8.8.3-i386-2.4/fortranobject.o
/tmp/tmpPoryGr/aurora_common.o /tmp/tmpPoryGr/well_collection.o
/tmp/tmpPoryGr/tmp/tmpPoryGr/src.darwin-8.8.3-i386-2.4/aurora-f2pywrappers2.
o -L/usr/local/lib/gcc/powerpc-apple-darwin8.8.0/4.2.0 -lgfortran -o
./aurora.so
/usr/bin/ld: warning
/tmp/tmpPoryGr/tmp/tmpPoryGr/src.darwin-8.8.3-i386-2.4/auroramodule.o
cputype (7, architecture i386) does not match cputype (18) for specified
-arch flag: ppc (file not loaded)
/usr/bin/ld: warning
/tmp/tmpPoryGr/tmp/tmpPoryGr/src.darwin-8.8.3-i386-2.4/fortranobject.o
cputype (7, architecture i386) does not match cputype (18) for specified
-arch flag: ppc (file not loaded)
Removing build directory /tmp/tmpPoryGr
vic-kelsons-computer:~/aurora vic$ ls *.so
aurora.so
vic-kelsons-computer:~/aurora vic$ python
ActivePython 2.4.3 Build 11 (ActiveState Software Inc.) based on
Python 2.4.3 (#1, Apr 3 2006, 18:07:14)
[GCC 4.0.1 (Apple Computer, Inc. build 5247)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import aurora
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: Inappropriate file type for dynamic loading
>>>
More information about the f2py-users
mailing list