Subject: Re: [f2py] specifying proper command line options



Chris Fonnesbeck wrote:
> I am trying to build some f2py extensions, using the HPC gcc and g77
> compilers (v. 4.1.0 and 3.4.4, respectively), but get some errors
> related to bad command line options:
>
> compile options: '-Ibuild/src
> -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4
> -c'
> gcc: build/src/fortranobject.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 -Ibuild/src
> -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4
> -c build/src/fortranobject.c -o
> build/temp.darwin-8.2.0-Power_Macintosh-2.4/build/src/fortranobject.o"
> failed with exit status 1
>
> Can I specify these somewhere in my setup.py? Am I using an
> inappropriate g77 compiler? I would like to avoid the Fink g77, if
> possible.

No, it's a gcc 4 issue, I think. -Wno-long-double comes from the Python
build flags and not from anything f2py. Using gcc 3.3 should solve the
problem.

Alternatively, you can edit
/Library/Frameworks/Python.framework/Versions/Current/lib/python2.4/config/Makefile

and edit the variable BASECFLAGS to exclude -Wno-long-double .

--
Robert Kern
rkern-XkckGZ689+c@xxxxxxxxxxxxxxxx

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter




Programming list archiving by: Enterprise Git Hosting