Re: [sage-devel] Re: Could / should 'prereq' be run if ever the build is restarted?

0 views
Skip to first unread message

William Stein

unread,
Jan 23, 2010, 9:23:38 PM1/23/10
to sage-devel, sagedays19
On Sat, Jan 23, 2010 at 5:51 PM, Jason Grout
<jason...@creativetrax.com> wrote:
> Dr. David Kirkby wrote:
>>
>> The 'prereq' script checks the build environment for Sage is sane. It
>> checks things like
>>
>> * The C, C++ and Fortran compilers are all present (except on OS X, where
>> Fortran is not checked)
>>
>> * The versions of gcc/g++/gfortran are all the same. (Again on OS X,
>> Fortran is ignored. Also, for non-GNU compilers, versions are ignored).
>>
>> * There is not a mix of GNU and non-GNU compilers.
>>
>> * Things like 'ld', 'ranlib' etc are in the path.
>>
>> It takes 11 seconds to execute on my 1200 MHz SPARC, so the time to run it
>> is pretty insignificant.
>>
>> I would propose it would be a good idea that 'prereq' is run again if ever
>> someone restarts the build of Sage.
>>
>> If they have altered their path in any way, or redefined or undefined
>> variables like CC, then it is quite possible they have screwed up their
>> environment. In which case, spending 11 seconds on a 1200 MHz machine, is a
>> pretty small investment in time to just recheck that the build environment
>> is still sane.
>>
>> Thoughts?
>
>
> +1.  Sounds like a good idea to me.

Somebody at Sage days 19 told me they were implementing the above a
few days ago. I can't remember who though. I've cc'd the sage days
list.

> On a related note: Can you auto-detect where the gfortran library is?
> Presumably SAGE_FORTRAN and SAGE_FORTRAN_LIB should be pointing to
> compatible versions of the binary/library.  Often, one can autodetect
> gfortran just by using `which gfortran`.  Is there an easy way to get the
> path to the corresponding libgfortran?  It would be nice if Sage tried to
> guess where gfortran and libgfortran were, so we didn't have to tell people
> to set the variables.

It actually does guess SAGE_FORTRAN already using "which". It lets
the gfortran so library just default if not given (by not specifying
SAGE_FORTRAN_LIB).

I'm suddenly very concerned that Sage binaries won't work at all on
computers without libgfortran.so installed. Does Sage even start up on
such a box?

Yep. If I take one of the Sage build machines, remove libgfortran,
then start Sage I get:

$ sage
BOOM!

.... ImportError: libgfortran.so.3: cannot open shared object file: No
such file or directory

----------------

Not good, since most Linux installs won't have libgfortran. If I then
reinstall gfortran, and copy libgfortran.so to SAGE_ROOT/local/lib/,
then uninstall gfortran, then Sage works fine again.

cp /usr/lib/libgfortran.so.3.0.0 local/lib/libgfortran.so.3

wstein@ubuntu910-64:/tmp/wstein/farm/sage-4.3.1$ ./sage
----------------------------------------------------------------------
| Sage Version 4.3.1, Release Date: 2010-01-20 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage: import scipy.linalg
sage:

-----


This is now http://trac.sagemath.org/sage_trac/ticket/8049

This is an absolutely critical blocker. If anybody sees support
questions about Sage just not starting up, a possible answer is
"install your gfortran package".


-- William

>
> Thanks,
>
> Jason
>
> --
> Jason Grout
>
> --
> To post to this group, send an email to sage-...@googlegroups.com
> To unsubscribe from this group, send an email to
> sage-devel+...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>

--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

Reply all
Reply to author
Forward
0 new messages