Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 236670 - gfortran --version no longer shows '95'
Summary: gfortran --version no longer shows '95'
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
Depends On: 236444
TreeView+ depends on / blocked
Reported: 2007-04-17 02:23 UTC by Jarod Wilson
Modified: 2007-11-30 22:12 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-04-17 02:35:27 UTC

Attachments (Terms of Use)

Description Jarod Wilson 2007-04-17 02:23:32 UTC
Seems the output of gfortran --version recently changed, dropping the '95' bit.
This breaks the build of scipy. Was there a particularly good reason for that to
be dropped? Can we get that back in there, or should we get numpy/scipy patched
up to account for this change?

+++ This bug was initially created as a clone of Bug #236444 +++

Here's the deal.
I'm trying to track down a problem in scipy and I'm now running into problems
building scipy in the development tree. It looks to me like process is
failing to recognize that gfortran is available on the system becuase the
gfortran --version string is an unexpected value. 

All of the fcompiler detection used by is actually a part of the numpy
package. And from the traceback below it certaintly looks like the problem lies
in numpy.  Could find the cycles and try to help me figure out if there really
is a problem in numpy? Or failing that a way to work around the problem so I can
get scipy to build again?

From the numpy changelog it looks like you applied a patch to numpy just a
couple of days after i built scipy in develop.

Here's the warning and traceback that I get when trying to compile the srpm
against the current devel tree. Something has definitely changed with regard to
numpy since the last time scipy was built.   If I punt and build against f77
from compat-gcc-34-g77-3.4.6-7, things appear to work.. something is definitely
broken with the gfortran compiler detection.  I can confirm that
/usr/bin/gfortran is on the system, and the same problem happens under mock as
well as under a local environment. 

warning: build_ext: fcompiler=gnu95 is not available.
Traceback (most recent call last):
  File "", line 55, in <module>
  File "", line 47, in setup_package
    configuration=configuration )
  File "/usr/lib/python2.5/site-packages/numpy/distutils/", line 174, in
    return old_setup(**new_attr)
  File "/usr/lib/python2.5/distutils/", line 151, in setup
  File "/usr/lib/python2.5/distutils/", line 974, in run_commands
  File "/usr/lib/python2.5/distutils/", line 994, in run_command
  File "/usr/lib/python2.5/distutils/command/", line 112, in run
  File "/usr/lib/python2.5/distutils/", line 333, in run_command
  File "/usr/lib/python2.5/distutils/", line 994, in run_command
  File "/usr/lib/python2.5/site-packages/numpy/distutils/command/",
line 121, in run
  File "/usr/lib/python2.5/distutils/command/", line 407, in
  File "/usr/lib/python2.5/site-packages/numpy/distutils/command/",
line 312, in build_extension
    link = self.fcompiler.link_shared_object
AttributeError: 'NoneType' object has no attribute 'link_shared_object'

-- Additional comment from on 2007-04-16 17:50 EST --
Hrm. Best as I can tell, numpy 1.0.1-3 shouldn't be behaving any differently
here than numpy 1.0.1-1 from back in december. The -2 bump only altered
obsoletes/provides, the -3 bump only included a patch to fix up cpu type
detection (and the files that patch touched aren't showing up in the spew
there). Odd.

Test rebuild of numpy itself is fine, I'll keep poking later this evening...

-- Additional comment from on 2007-04-16 19:49 EST --
yeah its a little weird... i didnt do anything to the scipy codebase either. I
just attempted a rebuild to trackdown something else and blamo.   Has gfortran
been updated since numpy? It looks like it has. Perhaps gfortran is throwing a
new version string which numpy doesn't recognize? I think numpy tries to detect
compiler version by running gfortran --version

This works just fine on current fc6, and was working fine just after the last
numpy patch and rebuild. ti's a mystery.


-- Additional comment from on 2007-04-16 21:51 EST --
Yep, looks like its gfortran throwing a wrench in the works.

On devel:
$ f95 --version
GNU Fortran (GCC) 4.1.2 20070403 (Red Hat 4.1.2-8)

On FC6:
$ f95 --version
GNU Fortran 95 (GCC) 4.1.1 20070105 (Red Hat 4.1.1-51)

And numpy/distutils/fcompiler/ looks for a version string starting with
"GNU Fortran 95". Now... The best way around this?... File bug against gfortran
or patch numpy somehow?

-- Additional comment from on 2007-04-16 22:05 EST --
I think we need to approach the gcc-gfortran maintainer about a patch, since
that is where the underlying changed happened. If that can't be patched then
numpy will need the patch. Is upstream numpy aware of this issue already?

Comment 1 Jakub Jelinek 2007-04-17 02:35:27 UTC
The change was intentional, GNU Fortran doesn't support just Fortran95, but
also Fortran77, partly Fortran2003, ...

Comment 2 Jef Spaleta 2007-04-17 02:40:47 UTC
Okay upstream numpy definitely has to be made aware of this intentional change.
The version scraping numpy does is going to fail moving forward.


Comment 3 Jarod Wilson 2007-04-17 03:27:45 UTC
Okay, ticket filed with the numpy folks:

Note You need to log in before you can comment on or make changes to this bug.