osdir.com
mailing list archive F.A.Q. -since 2001!



Subject: Re: [f2py] specifying proper command line options
- msg#00002

List: python.f2py.user

Mail Archive Navigation:
by Date: Prev Next Date Index by Thread: Prev Next Thread Index

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


Thread at a glance:

Previous Message by Date:

[f2py] specifying proper command line options

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. Thanks, Chris

Next Message by Date:

Re: [f2py] using f2py without Numeric

On Sun, 2 Oct 2005, Chris Fonnesbeck wrote: > Can f2py be used *only* with numarray? I have installed it with on my > numarray on my system, but get the following error when I try to use > it: > > Oliver:/usr/local/src/PyMC/PyMC chris$ f2py -c -m flib flib.f ... > ImportError: Must have Numeric installed. You need to specify -DNUMARRAY in f2py comman line to build extension modules against numarray. So, try f2py -c -m flib flib.f -DNUMARRAY Pearu

Previous Message by Thread:

[f2py] specifying proper command line options

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. Thanks, Chris

Next Message by Thread:

[f2py] Re: f2py-users Digest, Vol 9, Issue 1

> On Sun, 2 Oct 2005, Chris Fonnesbeck wrote: > > > Can f2py be used *only* with numarray? I have installed it with on my > > numarray on my system, but get the following error when I try to use > > it: > > > > Oliver:/usr/local/src/PyMC/PyMC chris$ f2py -c -m flib flib.f > ... > > ImportError: Must have Numeric installed. > > You need to specify -DNUMARRAY in f2py comman line to build extension > modules against numarray. So, try > > f2py -c -m flib flib.f -DNUMARRAY > Thanks Pearu, How about in the context of a setup.py file, where extensions are specified? For example, mine is: #!/usr/bin/env python from scipy_distutils.core import setup,Extension flib = Extension(name='PyMC.flib',sources=['PyMC/flib.f']) version = "0.9.2" setup( version=version, author="Chris Fonnesbeck", author_email="fonnesbeck-ee4meeAH724@xxxxxxxxxxxxxxxx", description="Version %s of PyMC" % version, license="GNU GPL", name="PyMC", url="pymc.sourceforge.net", packages=["PyMC"], ext_modules = [flib] ) Is there an argument for "setup" to include such command-line arguments for f2py? Thanks, Chris
blog comments powered by Disqus

Home | News | Sitemap | FAQ | advertise | OSDir is an Inevitable website. GBiz is too!