Minh Nguyen wrote:

> The packages you have updated so far all contain a similar set of
> tests at the start of the file spkg-install. To me, those tests look
> very much like a template to be used for perhaps all the other spkg's.
> It would be very beneficial to package maintainers if those boiler
> plate tests are documented somewhere, preferably in the Developers'
> Guide.
> 

I'll do that at some point, but I'd rather not just now, as some of the 
current code might be redundant now, as the 'configure' script at

http://sagetrac.org/sage_trac/ticket/7021

should pick many of the errors up that the spkg-install file current does.

For example, do we need to test if there is a mix of GNU and Sun 
compilers in every spkg-install, when it is done once in the configure 
script? There are advantages to doing it twice.

* It in 'belt and braces'
* If someone sets the Sage environment variable for debugging, and 
screws up in some way, having the tests in every spkg-install would pick 
that up. It is more robust.

But also disadvantages too:

* If one wanted to improve on the tests, doing it only in the configure 
script would mean there was no need to update every single spkg-install.
* It makes the spkg-install file much longer.

Currently the configure script I wrote, is far from perfect. It does not 
pick up some possible errors with the Fortran compiler, which is 
complicated by three problems.

* We use the odd variable SAGE_FORTRAN to specify the Fortran compiler. 
Had we used FC, the normal autoconf configure scripts would all use 
that. (Any chance we change to use 'FC' instead of SAGE_FORTRAN ?)

* gfortran does not support an option to output just the version number, 
like gcc and g++ do. I reported that as a bug in gfortran, which a 
gfortran developer fixed. But it does not help with older versions of 
gfortran. (I might be able to test the gfortran version by greping the 
output of 'gfortran --version' and ensuring it contains the same version 
of gcc and g++

I noticed that when trying to build Sage with the Sun compiler, an issue 
I had (SAGE_FORTRAN was set to a GNU compiler), whereas CC and CXX were 
set to the Sun ones, was not detected in the configure script. But it 
was detected in the readline spkg-install.

I must admit, when playing around setting CC and CXX, I have tended to 
forget to set SAGE_FORTRAN. So in some ways, the Fortran compiler is the 
biggest problem.


Currently the readline spkg-install file is probably the best one, if we 
do chose to use my improved spkg-install files.

Dave

--~--~---------~--~----~------------~-------~--~----~
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
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to