Opened 18 years ago

Closed 17 years ago

Last modified 16 years ago

#11564 closed defect (fixed)

new py-scipy fails due to fortran dependencies

Reported by: erin.sheldon@… Owned by: erickt@…
Priority: High Milestone:
Component: ports Version:
Keywords: Cc:
Port:

Description

Starting with clean macports install

sudo port install py-scipy (which is version 0.5.2)

fails with the following error trying to run f95. The fortran dependency is incorrect; scipy should depend on gfortran the same way numpy does.

f95:f77: Lib/fftpack/dfftpack/dcosqb.f sh: line 1: f95: command not found sh: line 1: f95: command not found error: Command "f95 -fixed -O4 -target=native -c -c Lib/fftpack/dfftpack/dcosqb.f -o build/temp.darwin-8.9.1-i386-2.4/Lib/fftpack/dfftpack/dcosqb.o" failed with exit status 127

Change History (7)

comment:1 Changed 18 years ago by pipping@…

Milestone: Available Ports

comment:2 Changed 18 years ago by pipping@…

Milestone: Available PortsPort Bugs

comment:3 Changed 18 years ago by jochen@…

Solution to a similar problem I hd with installing py-scipy:

Current scipy (0.5.2) depends on py-numpy

  depends_lib             lib:gnuplot:gnuplot \
                                 port:py-numpy

That's good!

py-numpy depends on gcc42 on Intel, which is also good.

However, there is a mismatch that manifests itself when using numpy, to e.g. install py-scipy:

In numpy/distutils/fcompiler/gnu.py a string match is done against the output of gfortran --version:

class GnuF95Compiler(FCompiler):
    compiler_type = 'gnu'
    version_match = simple_version_match(start=r'GNU Fortran 95')

but gfortran-dp-4.2 --version gives "GNU Fortran (GCC) 4.2.0 20070307 (prerelease)" (thus: no "95"!)

Using the following patch to numpy fixes the problem for me and I can successfully compile and use py-scipy on Intel then. However, the real fix might be to correct the gfortran version output.

--- /opt/local/lib/python2.4/site-packages/numpy/distutils/fcompiler/gnu.py~    2007-04-15 14:00:26.000000000 +0200
+++ /opt/local/lib/python2.4/site-packages/numpy/distutils/fcompiler/gnu.py     2007-04-15 14:16:32.000000000 +0200
@@ -13,7 +13,7 @@
class GnuFCompiler(FCompiler):
     compiler_type = 'gnu'
-    version_match = simple_version_match(start=r'GNU Fortran (?!95)')
+    version_match = simple_version_match(start=r'GNU Fortran')
     # 'g77 --version' results
     # SunOS: GNU Fortran (GCC 3.2) 3.2 20020814 (release)
@@ -240,7 +240,7 @@
class Gnu95FCompiler(GnuFCompiler):
     compiler_type = 'gnu95'
-    version_match = simple_version_match(start='GNU Fortran 95')
+    version_match = simple_version_match(start='GNU Fortran')
     # 'gfortran --version' results:
     # Debian: GNU Fortran 95 (GCC 4.0.3 20051023 (prerelease) (Debian 4.0.2-3))

comment:4 Changed 18 years ago by david.m.cooke@…

This should be fixed in NumPy 1.0.2.

Also, NumPy itself doesn't require Fortran at all (on purpose -- it's targeted to a wider audience). The Fortran support included in NumPy is for SciPy and other packages like it that do require Fortran.

-- your friendly upstream developer

comment:5 Changed 17 years ago by erickt@…

Owner: changed from macports-dev@… to erickt@…
Status: newassigned

numpy is now updated to 1.0.3 and uses g95 instead of gcc41/gcc42. Let me know if this fixes your problems.

comment:6 Changed 17 years ago by erickt@…

Resolution: fixed
Status: assignedclosed

comment:7 Changed 16 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.