On Mon, Aug 3, 2009 at 3:57 PM, Dr. David Kirkby<david.kir...@onetel.net> wrote:
>
> William Stein wrote:
>> On Mon, Aug 3, 2009 at 1:33 PM, Dr. David Kirkby<david.kir...@onetel.net> 
>> wrote:
>>> CC and CXX are set in Sage to default values if they are not specified.
>>>  The readme says:
>>>
>>> ---------------------------------------------
>>> NOTE: If you're using Fortran on a platform without g95 binaries included
>>>       with Sage, e.g., Itanium, you must use a system-wide gfortran.  You
>>>       have to explicitly tell the build process about the fortran
>>>       compiler and library location.  Do this by typing
>>>
>>>           export SAGE_FORTRAN=/exact/path/to/gfortran
>>>           export SAGE_FORTRAN_LIB=/path/to/fortran/libs/libgfortran.so
>>> -------------------------------------------------
>>>
>>>
>>> Is there supposed to be any way to specify Fortran flags?
>>
>> There isn't such a way.
>
> FFLAGS is commonly used for this. I think it would be beneficial to
> allow the user to specify FFLAGS and the Fortran compiler append any
> flags it want to that. In much the same was as CFLAGS and CXXFLAGS

I'm not opposed to this.

>
>>> Why is a
>>> default of gfortran not used, like it is with gcc and g++ ?
>>
>> Because we wanted Sage to actually build on lots of computers and many
>> systemwide compilers would fail in weird ways.
>
>
>
>>>  Does anyone
>>> know why the location of the library needs to be given? One does not
>>> need to do it with C or C++.
>>
>> Often there are other fortran libraries installed on the system, and
>> if one doesn't
>> explicitly specified it, then the wrong one can get linked in.
>
> But there are probably more C libraries on most machines than Fortran
> ones. If the default compilers are going to be gcc and g++, then I can't
> see why the fortran one should not default to gfortran. If someone wants
> to specify another compiler, they should be able to. But given by
> default the first gcc in the path is used, and the first g++, I don't
> see the logic of not extending that to the first gfortran.

It's not logic.  It's what actually works.  If you can get things to
work on all supported Sage platforms without using the
SAGE_FORTRAN_LIB that would be nice.

By the way, including g95 with Sage at all was always meant to be
temporary.  It would be great to switch to requiring the user to have
gfortran installed, and use their systemwide gfortran.

 -- William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to