numpy & non-Apple gcc?

Michael Dickens michaelld at macports.org
Fri Sep 17 12:14:29 PDT 2010


On Sep 17, 2010, at 12:48 PM, Adam Mercer wrote:
> Looking at the history, the use of macports gcc was added when atlas
> was added as a dependency [1]. I believe this was due to compiler ABI
> differences.

Thanks Adam; seems like maybe MacPorts/GCC/whatever don't have those differences any longer?

If I remove from the py26-numpy port file lines 44-66 (and, the extra space on line 67):

starting with (44)
{{{
variant gcc43 conflicts gcc44 description {Use the gcc43 compiler (enables fortran code)} {
}}}
and going through (64-66)
{{{
if {![variant_isset gcc43]} {
    default_variants +gcc44
}
}}}
then I find that this port works just as well as before, and the +universal variant also works.

If I do:

% sudo port extract py26-numpy
% pushd `port dir py26-numpy`/work/numpy-1.5.0
% find . -name "*.f*"
./doc/source/reference/figures/threefundamental.fig
./doc/source/reference/routines.fft.rst
./doc/source/reference/routines.financial.rst
./doc/source/reference/routines.functional.rst
./numpy/core/tests/data/recarray_from_file.fits
./numpy/distutils/tests/f2py_ext/src/fib1.f
./numpy/distutils/tests/f2py_f90_ext/include/body.f90
./numpy/distutils/tests/f2py_f90_ext/src/foo_free.f90
./numpy/f2py/docs/hello.f
./numpy/f2py/docs/simple.f
./numpy/f2py/docs/usersguide/allocarr.f90
./numpy/f2py/docs/usersguide/array.f
./numpy/f2py/docs/usersguide/calculate.f
./numpy/f2py/docs/usersguide/callback.f
./numpy/f2py/docs/usersguide/common.f
./numpy/f2py/docs/usersguide/extcallback.f
./numpy/f2py/docs/usersguide/fib1.f
./numpy/f2py/docs/usersguide/fib3.f
./numpy/f2py/docs/usersguide/ftype.f
./numpy/f2py/docs/usersguide/moddata.f90
./numpy/f2py/docs/usersguide/scalar.f
./numpy/f2py/docs/usersguide/string.f
./numpy/f2py/tests/src/mixed/foo.f
./numpy/f2py/tests/src/mixed/foo_fixed.f90
./numpy/f2py/tests/src/mixed/foo_free.f90

I see that all of the fortran files are used for testing or in documentation.  Hence, from multiple perspectives I don't see the need for a fortran compiler, or for using gcc43/44/45 whatever.  Apple's GCC seems to work just fine, and it allows +universal to work pretty much out of the release code.

Admittedly, I'm a single person running on 10.6.4 x86_64.  Maybe this change won't work on 10.5 or for someone else?  I hope others can test it. - MLD


More information about the macports-dev mailing list