py-scipy: numpy vs. gcc problem (solved)
markd at macports.org
markd at macports.org
Sun Apr 15 11:14:56 PDT 2007
Hi Jochen,
There are two bugs filed on py-scipy. Could you add the problem you had
and the workaround to the ticket that describes a similar problem? It
will help the maintainer to resolve it. Thanks.
http://trac.macosforge.org/projects/macports/ticket/11048
http://trac.macosforge.org/projects/macports/ticket/11564
Mark
Jochen Küpper <jochen at fhi-berlin.mpg.de> on Sunday, April 15, 2007 at 6:29
AM -0800 wrote:
>> I am trying to install py-scipy using MacPorts, but always end up
>> with the errors listed below.
>>
>> I have the following gcc-ports installed:
>> gcc41 lang/gcc41 4.1.2 The
>> GNU compiler collection
>> gcc42 lang/gcc42 4.2-20070307 The
>> GNU compiler collection, prerelease BETA
>
>Ok, the real problem seems to be an incompatibility between numpy and
>gcc42:
>
>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))
More information about the macports-users
mailing list