Re: [sage-devel] use ./configure; make for Sage?

2012-02-09 Thread Julien Puydt
Le mercredi 08 février, Dr. David Kirkby a écrit:
 On 02/ 8/12 09:41 AM, Julien Puydt wrote:
  Le mardi 7/2/2012, David Kirkbydavid.kir...@onetel.net  a écrit :
  Unfortunately, from a developers point of view, it is not the
  easiest language to learn, and my experience of many Sage
  developers would suggest they will not be over keen on studying
  the details of .autoconf I can't exactly blame them either.
 
  If there were :
  (1) some documentation on autoconf in sage ;
 
 That sounds like re-inventing the wheel, as others have written
 documentation on autoconf. Unless there is anything Sage-specific, I
 don't see the need for this.

I meant on (autoconf in sage), sorry, indeed :-)

I was thinking about specific m4 macros for use in sage and their
documentation, even more precisely.

Snark

-- 
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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-09 Thread Julien Puydt
Le mercredi 08 février, R. Andrew Ohana a écrit:
 On Wed, Feb 8, 2012 at 16:26, William Stein wst...@gmail.com wrote:
  Believe it or not, the environment variables that control how Sage
  is built globally are documented (and aren't random):
 
        http://sagemath.org/doc/installation/source.html#environment-variables
 
 Which I am always bring up to reference, it would be much nicer to
 have a simple ./configure --help to list off my options. One thing
 that it would bring (that I would appreciate), would be the removal of
 the need to re-export any environmental variables when resuming a
 build from a different/new session.

+1

Snark on #sagemath

-- 
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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-09 Thread Michael Orlitzky

I'll +1 both sides:

1) autotools is the worst thing on Earth

2) sage should use it

--
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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-09 Thread Julien Puydt
Le jeudi 09 février, Michael Orlitzky a écrit:
 I'll +1 both sides:
 
 1) autotools is the worst thing on Earth

It's unfair : the problems they try to solve is basically unsolvable,
and that is _a part_ of why they're so complex.

 2) sage should use it

It will hurt, but it still should to be done, if I follow your
reasoning?

Snark on #sagemath

-- 
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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-09 Thread Michael Orlitzky

On 02/09/2012 09:21 AM, Julien Puydt wrote:


It's unfair : the problems they try to solve is basically unsolvable,
and that is _a part_ of why they're so complex.



Agreed. And other build systems that work comparably-well usually end up 
looking worse.




It will hurt, but it still should to be done, if I follow your
reasoning?


It shouldn't hurt too bad, and it's a one-time cost.

I see two benefits. First, it offloads a huge amount of boilerplate code 
to the autotools developers which /sage/ developers never have to think 
about again. Second, for better or worse, it's the standard build system 
on Unix. New users and developers already know how it works, and don't 
have to go digging through documentation or code.


Bonus benefit: it makes packaging easier. Portage in particular (and I 
would imagine all other source-based package managers) have autotools 
support built in.


--
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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-09 Thread David Kirkby
On 9 February 2012 14:04, Michael Orlitzky mich...@orlitzky.com wrote:

 I'll +1 both sides:

 1) autotools is the worst thing on Earth


I believe if it was as bad as you make out, it would not be as popular as
it is. I would guess guess at least one third of open-source projects use
it.

I know William called it autohell, but that's because he did not RTFM. I
see his early attempt at the prereq configure script, which was written
to be processed by autoconf. Just about every reccomendation in the manual
was ignored.


2) sage should use it


I'm not convinced of that myself. I think it would be an awful lot of work
to do it properly, but if done properly it would be good for Sage IMHO.

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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-09 Thread Michael Orlitzky

On 02/09/2012 11:01 AM, David Kirkby wrote:



On 9 February 2012 14:04, Michael Orlitzky mich...@orlitzky.com
mailto:mich...@orlitzky.com wrote:

I'll +1 both sides:

1) autotools is the worst thing on Earth


I believe if it was as bad as you make out, it would not be as popular
as it is. I would guess guess at least one third of open-source projects
use it.


I meant that in good humor. It's the best tool for the job, but is in no 
way enjoyable (for me) to work with.




I know William called it autohell, but that's because he did not RTFM.
I see his early attempt at the prereq configure script, which was
written to be processed by autoconf. Just about every reccomendation in
the manual was ignored.


I've done this; I think most developers have. There are thousands of 
pages in documentation and books, and none seem to be at the right level.


Q: What do I do with all this stuff?

A: Let's begin with an introduction to M4...

--
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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-09 Thread William Stein
On Thu, Feb 9, 2012 at 8:01 AM, David Kirkby david.kir...@onetel.net wrote:


 On 9 February 2012 14:04, Michael Orlitzky mich...@orlitzky.com wrote:

 I'll +1 both sides:

 1) autotools is the worst thing on Earth


 I believe if it was as bad as you make out, it would not be as popular as it
 is. I would guess guess at least one third of open-source projects use it.

 I know William called it autohell, but that's because he did not RTFM. I

FUD.  I've spent significant time with autotools documentation.

 see his early attempt at the prereq configure script, which was written to
 be processed by autoconf. Just about every reccomendation in the manual was
 ignored.

The manuals suck.

 2) sage should use it


 I'm not convinced of that myself. I think it would be an awful lot of work
 to do it properly, but if done properly it would be good for Sage IMHO.

I still feel that what is being proposed is very vague.   Is it to
deprecate all of these variables [1] (but still fully support them for
at least one year!), and make them options to a ./configure script?

   http://sagemath.org/doc/installation/source.html#environment-variables

And, merge that with the current prereq autoconf code?  Is that the proposal?

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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-09 Thread Michael Orlitzky

On 02/09/2012 01:23 PM, William Stein wrote:


I still feel that what is being proposed is very vague.   Is it to
deprecate all of these variables [1] (but still fully support them for
at least one year!), and make them options to a ./configure script?

http://sagemath.org/doc/installation/source.html#environment-variables

And, merge that with the current prereq autoconf code?  Is that the proposal?



No one has proposed anything un-vague yet. But yes, some of the 
environment variables would become ./configure options. Many of them 
would just go away though, since they manually tell the build process 
things that ./configure can determine on its own.


Some likely candidates:

  SAGE64
  CFLAG64
  SAGE_FORTRAN
  SAGE_FORTRAN_LIB
  SAGE_ATLAS_ARCH
  SAGE_ATLAS_LIB
  INCLUDE_MPFR_PATCH

--
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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-09 Thread Mike Hansen
On Thu, Feb 9, 2012 at 11:30 AM, Michael Orlitzky mich...@orlitzky.com wrote:
 No one has proposed anything un-vague yet. But yes, some of the environment
 variables would become ./configure options. Many of them would just go away
 though, since they manually tell the build process things that ./configure
 can determine on its own.

This would probably also involve changing how the spkgs are built
since typically autotools will process a .in file to replace
constants.  So, such a change would probably involve moving all of the
spkg-install (etc.) files out of the spkg files so that autotools can
process them.  I think that change on its  one might be more
worthwhile.

--Mike

-- 
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


Re: Re: [sage-devel] use ./configure; make for Sage?

2012-02-09 Thread Martin Albrecht


On Thursday 09 February 2012, Mike Hansen wrote:
 On Thu, Feb 9, 2012 at 11:30 AM, Michael Orlitzky mich...@orlitzky.com 
wrote:
  No one has proposed anything un-vague yet. But yes, some of the
  environment variables would become ./configure options. Many of them
  would just go away though, since they manually tell the build process
  things that ./configure can determine on its own.
 
 This would probably also involve changing how the spkgs are built
 since typically autotools will process a .in file to replace
 constants.  So, such a change would probably involve moving all of the
 spkg-install (etc.) files out of the spkg files so that autotools can
 process them.  I think that change on its  one might be more
 worthwhile.

How about the configure script would write a makefile which would setup the 
right environment variables that the spkg-install scripts expect, so from 
their perspective nothing would change for now.

 
 --Mike

Cheers,
Martin

--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://martinralbrecht.wordpress.com/
_jab: martinralbre...@jabber.ccc.de

-- 
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


Re: Re: [sage-devel] use ./configure; make for Sage?

2012-02-09 Thread Volker Braun
This would definitely be the goal for the initial version of an autotools 
conversion:
  * Move prereq to $SAGE_ROOT
  * Just make configure set up the usual environment variables and write 
the top-level makefiel, but don't change anything in the sage build process.

-- 
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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-09 Thread Julien Puydt
Le jeudi 09 février, Martin Albrecht a écrit:
 How about the configure script would write a makefile which would
 setup the right environment variables that the spkg-install scripts
 expect, so from their perspective nothing would change for now.

+2

Snark on #sagemath

-- 
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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-09 Thread David Kirkby
On 9 February 2012 18:23, William Stein wst...@gmail.com wrote:


 FUD.  I've spent significant time with autotools documentation.

If I could be bothered (which I can't), I could point to lots of things in
that early prereq script which dont conform even one little bit to how you
are supposed to use autoconf.




  see his early attempt at the prereq configure script, which was
 written to
  be processed by autoconf. Just about every reccomendation in the manual
 was
  ignored.

 The manuals suck.



I disagree.




 I still feel that what is being proposed is very vague.   Is it to
 deprecate all of these variables [1] (but still fully support them for
 at least one year!), and make them options to a ./configure script?

   http://sagemath.org/doc/installation/source.html#environment-variables

 And, merge that with the current prereq autoconf code?  Is that the
 proposal?


There would be advantages to portability, even amoungst Linux users. One of
the main concepts of the autotools is that you don't make choices based on
the platform, but test the complete system (OS/compiler/linker etc). So
instead of having endless workaround on specific distributions, you create
a test (in C usually), that shows if the issue exists or not. Then you
apply the workaround if the issue exists.

Instead of testing for a SPARC processor if you have code which is
big-endian/little endian specific, you should write a test which checks if
the system is big/little endian. Then it automatically will work on any new
big-endian processor.

If something is an issue on Debian, instead of checking for Debian, you
write a test for the problem. Then you have solved the issue for any system
- one derrived from Debian, or even something completely differet.

We have a patch which get added on Solaris sometimes, as there's a bug in a
library, which has been fixed by a Sun patch. So one should write a test
which checks if the bug exists or not.

I think you would find that by doing away with a lot of patches which are
applied on certain Linux distributions, you would get code which would work
more easily on more

There's a lot to be said for using autotools, but I would agree they are
not the easiest tools to use, and I fear we might not get the full benefit.

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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-09 Thread Julien Puydt
Le jeudi 09 février, Julien Puydt a écrit:
 Le mercredi 08 février, R. Andrew Ohana a écrit:
  On Wed, Feb 8, 2012 at 16:26, William Stein wst...@gmail.com
  wrote:
   Believe it or not, the environment variables that control how Sage
   is built globally are documented (and aren't random):
  
         
   http://sagemath.org/doc/installation/source.html#environment-variables
  
  Which I am always bring up to reference, it would be much nicer to
  have a simple ./configure --help to list off my options. One thing
  that it would bring (that I would appreciate), would be the removal
  of the need to re-export any environmental variables when resuming a
  build from a different/new session.
 
 +1

I prefer when things get tested and discussed on small examples before
any decision is made and serious work gets done.

You'll find attached a trivial configure.ac, a trivial Makefile.in and
a trivial print_my_env script. Those demonstrate how a configure
script can decide the value a SAGE environment variable, how the
Makefile can export it while calling print_my_env, which in fact just
prints what it thinks is $SAGE.

So basically, put those files in a directory, make the script
executable, run autoconf, then ./configure then make, and it should
give something like :
jpuydt@newton:/tmp$ autoconf  ./configure  make
configure: creating ./config.status
config.status: creating Makefile
SAGE=/here/it/is ./print_my_env
/here/it/is

This should help,

Snark on #sagemath

PS: notice that the value should be escaped more than this to handle
more exotic values -- it's a toy example!

-- 
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


configure.ac
Description: Binary data


Makefile.in
Description: Binary data


print_my_env
Description: Binary data


Re: [sage-devel] use ./configure; make for Sage?

2012-02-08 Thread Julien Puydt
Le mardi 7/2/2012, David Kirkby david.kir...@onetel.net a écrit :
 Unfortunately, from a developers point of view, it is not the easiest
 language to learn, and my experience of many Sage developers would
 suggest they will not be over keen on studying the details
 of .autoconf I can't exactly blame them either.

If there were :
(1) some documentation on autoconf in sage ;
(2) with already a few things converted to serve as examples ;

Then that would already cover a large proportion of the cases by
copy-pasting!

Snark on #sagemath

-- 
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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-08 Thread Dr. David Kirkby

On 02/ 8/12 09:41 AM, Julien Puydt wrote:

Le mardi 7/2/2012, David Kirkbydavid.kir...@onetel.net  a écrit :

Unfortunately, from a developers point of view, it is not the easiest
language to learn, and my experience of many Sage developers would
suggest they will not be over keen on studying the details
of .autoconf I can't exactly blame them either.


If there were :
(1) some documentation on autoconf in sage ;


That sounds like re-inventing the wheel, as others have written documentation on 
autoconf. Unless there is anything Sage-specific, I don't see the need for this.



(2) with already a few things converted to serve as examples ;


There are lots of examples on the web, but I still believe a good understanding 
is required to write decent scripts for a non-trivial project like Sage. I don't 
think someone will get that by looking at others.



Then that would already cover a large proportion of the cases by
copy-pasting!


I don't think its that easy to do it right.


Snark on #sagemath



I like the idea, and may be able to offer some help, but I'm aware this is a 
non-trivial project. The rewards would be pretty great though.


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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-08 Thread William Stein
On Wed, Feb 8, 2012 at 3:39 PM, Dr. David Kirkby
david.kir...@onetel.net wrote:
 On 02/ 8/12 09:41 AM, Julien Puydt wrote:

 Le mardi 7/2/2012, David Kirkbydavid.kir...@onetel.net  a écrit :

 Unfortunately, from a developers point of view, it is not the easiest
 language to learn, and my experience of many Sage developers would
 suggest they will not be over keen on studying the details
 of .autoconf I can't exactly blame them either.


 If there were :
 (1) some documentation on autoconf in sage ;


 That sounds like re-inventing the wheel, as others have written
 documentation on autoconf. Unless there is anything Sage-specific, I don't
 see the need for this.


 (2) with already a few things converted to serve as examples ;


 There are lots of examples on the web, but I still believe a good
 understanding is required to write decent scripts for a non-trivial project
 like Sage. I don't think someone will get that by looking at others.


 Then that would already cover a large proportion of the cases by
 copy-pasting!


 I don't think its that easy to do it right.

 Snark on #sagemath


 I like the idea, and may be able to offer some help, but I'm aware this is a
 non-trivial project. The rewards would be pretty great though.

After following this whole thread, I still have absolutely no idea
what this non-trivial project even is.  What functionality is being
proposed to add to the Sage build system?

 -- William


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

-- 
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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-08 Thread Robert Bradshaw
On Wed, Feb 8, 2012 at 4:00 PM, William Stein wst...@gmail.com wrote:
 On Wed, Feb 8, 2012 at 3:39 PM, Dr. David Kirkby
 david.kir...@onetel.net wrote:
 On 02/ 8/12 09:41 AM, Julien Puydt wrote:

 Le mardi 7/2/2012, David Kirkbydavid.kir...@onetel.net  a écrit :

 Unfortunately, from a developers point of view, it is not the easiest
 language to learn, and my experience of many Sage developers would
 suggest they will not be over keen on studying the details
 of .autoconf I can't exactly blame them either.


 If there were :
 (1) some documentation on autoconf in sage ;


 That sounds like re-inventing the wheel, as others have written
 documentation on autoconf. Unless there is anything Sage-specific, I don't
 see the need for this.


 (2) with already a few things converted to serve as examples ;


 There are lots of examples on the web, but I still believe a good
 understanding is required to write decent scripts for a non-trivial project
 like Sage. I don't think someone will get that by looking at others.


 Then that would already cover a large proportion of the cases by
 copy-pasting!


 I don't think its that easy to do it right.

 Snark on #sagemath


 I like the idea, and may be able to offer some help, but I'm aware this is a
 non-trivial project. The rewards would be pretty great though.

 After following this whole thread, I still have absolutely no idea
 what this non-trivial project even is.  What functionality is being
 proposed to add to the Sage build system?

I'm also curious how the top-level makefile would benefit from a
(auto)configured, and what the implications would be for installing
things (such as sage -i ...) when being invoked via this top-level
make file. I do really like the idea of using (documented and checked)
flags rather than random environment variables to control how things
are build globally, as well as, if possible, persisting the decisions
once ./configure is done running.

- Robert

-- 
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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-08 Thread William Stein
On Wed, Feb 8, 2012 at 4:20 PM, Robert Bradshaw
rober...@math.washington.edu wrote:
 On Wed, Feb 8, 2012 at 4:00 PM, William Stein wst...@gmail.com wrote:
 On Wed, Feb 8, 2012 at 3:39 PM, Dr. David Kirkby
 david.kir...@onetel.net wrote:
 On 02/ 8/12 09:41 AM, Julien Puydt wrote:

 Le mardi 7/2/2012, David Kirkbydavid.kir...@onetel.net  a écrit :

 Unfortunately, from a developers point of view, it is not the easiest
 language to learn, and my experience of many Sage developers would
 suggest they will not be over keen on studying the details
 of .autoconf I can't exactly blame them either.


 If there were :
 (1) some documentation on autoconf in sage ;


 That sounds like re-inventing the wheel, as others have written
 documentation on autoconf. Unless there is anything Sage-specific, I don't
 see the need for this.


 (2) with already a few things converted to serve as examples ;


 There are lots of examples on the web, but I still believe a good
 understanding is required to write decent scripts for a non-trivial project
 like Sage. I don't think someone will get that by looking at others.


 Then that would already cover a large proportion of the cases by
 copy-pasting!


 I don't think its that easy to do it right.

 Snark on #sagemath


 I like the idea, and may be able to offer some help, but I'm aware this is a
 non-trivial project. The rewards would be pretty great though.

 After following this whole thread, I still have absolutely no idea
 what this non-trivial project even is.  What functionality is being
 proposed to add to the Sage build system?

 I'm also curious how the top-level makefile would benefit from a
 (auto)configured, and what the implications would be for installing
 things (such as sage -i ...) when being invoked via this top-level
 make file. I do really like the idea of using (documented and checked)
 flags rather than random environment variables to control how things
 are build globally, as well as, if possible, persisting the decisions
 once ./configure is done running.

Believe it or not, the environment variables that control how Sage is built
globally are documented (and aren't random):

   http://sagemath.org/doc/installation/source.html#environment-variables

 -- William


 - Robert

 --
 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



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

-- 
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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-08 Thread William Stein
On Wed, Feb 8, 2012 at 4:29 PM, Jonathan Bober jwbo...@gmail.com wrote:


 On Wed, Feb 8, 2012 at 4:00 PM, William Stein wst...@gmail.com wrote:


 After following this whole thread, I still have absolutely no idea
 what this non-trivial project even is.  What functionality is being
 proposed to add to the Sage build system?

  -- William



 I have been wondering the same thing. Some thoughts:

 First off, I would like to note that, even though it is a really trivial
 thing, I really like that I can build all of Sage just by typing 'make'. I
 have always thought it silly that I should have to type './configure' before
 typing make for so many programs. I mean, I understand the point of it, but
 why can't 'make' do whatever it is './configure' would do.

 Now, as far as Sage goes, I actually never just type 'make', which weakens
 my point above. I always do something like

 export SAGE_PARALLEL_SPKG_BUILD='yes'
 export MAKE='make -j8'
 make

 (do I still need to do those things?)

 I would probably like to add some sort of atlas environment variable to that
 list, to try to have atlas build in less than 2 hours, but I can never
 remember what that variable is and what it should be set to. So, I
 interpreted the original proposal as something along the lines as It would
 be nice if there were a simple script which I could run, which set these
 environment variables for me, or did something which had the same effect.
  Maybe if there were just a complete easy to read list of environment
 variable which effect the build in the README.txt file, that would be
 enough.

There is:

   http://sagemath.org/doc/installation/source.html#environment-variables

I am all for moving that list to README.txt.  It's often confused me
that it wasn't there.

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



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

-- 
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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-08 Thread Dr. David Kirkby

On 02/ 9/12 04:33 AM, William Stein wrote:


There is:

http://sagemath.org/doc/installation/source.html#environment-variables

I am all for moving that list to README.txt.  It's often confused me
that it wasn't there.

  -- william



I think its good to have it on the web page. If it's moved to readme.txt, then 
I think it needs to be automatically generated. Otherwise it will be like the 
list of supported platforms used to be - numerous copies, with numerous 
differences between them.


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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-07 Thread William Stein
On Mon, Feb 6, 2012 at 3:42 PM, Dr. David Kirkby
david.kir...@onetel.net wrote:
 On 02/ 6/12 09:09 AM, Jeroen Demeyer wrote:

 On 2012-02-06 09:33, Dr. David Kirkby wrote:

 I think trying to replicate autotools would be just silly.

 That's what PARI tried and they are probably the spkg with the *most*
 patches to the configuration system.


 More fool them.

I am not suggesting *replicating* autotools.  I'm suggesting that we
should clearly identify exactly what this ./configure is supposed to
accomplish before deciding on what tool to use to implement it.
Autconf may or may not be the right choice.

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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-07 Thread Julien Puydt
Le Tue, 7 Feb 2012 08:38:16 -0800,
William Stein wst...@gmail.com a écrit :

 On Mon, Feb 6, 2012 at 3:42 PM, Dr. David Kirkby
 david.kir...@onetel.net wrote:
  On 02/ 6/12 09:09 AM, Jeroen Demeyer wrote:
 
  On 2012-02-06 09:33, Dr. David Kirkby wrote:
 
  I think trying to replicate autotools would be just silly.
 
  That's what PARI tried and they are probably the spkg with the
  *most* patches to the configuration system.
 
 
  More fool them.
 
 I am not suggesting *replicating* autotools.  I'm suggesting that we
 should clearly identify exactly what this ./configure is supposed to
 accomplish before deciding on what tool to use to implement it.
 Autconf may or may not be the right choice.

Let me first start by saying that I disagree with calling pari
developpers fools!

A configure script is there to make the sources ready for compilation.
Once you have configured the sources, they are supposed to just build.
So it's the place where you detect what kind of hardware you're
targetting (endianness, size and number of registers, availability of
floating-point or vector units, etc), what kind of software you have
available for the build (compilers, libraries, presence and version),
what kind of software you have available for the runtime (which may not
be the same).

An autotools based build system has nice properties when done right :

- the autotools need not be installed on a system to be used, ie: the
  sage developpers will need them to generate the configure script, but
  they are not needed to run the configure script ;

- they handle out-of-tree builds nicely ; those can be used to build a
  same source code with different options (including the next point) ;

- they make it easier to cross-build for another architecture ;

- the different distributions' maintainers have it easy to package your
  software ;

- they help with portability, as they handle a huge amount of different
  things.

Snark on #sagemath

-- 
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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-07 Thread David Kirkby
On 7 February 2012 16:38, William Stein wst...@gmail.com wrote:

 On Mon, Feb 6, 2012 at 3:42 PM, Dr. David Kirkby
 david.kir...@onetel.net wrote:
  On 02/ 6/12 09:09 AM, Jeroen Demeyer wrote:
 
  On 2012-02-06 09:33, Dr. David Kirkby wrote:
 
  I think trying to replicate autotools would be just silly.
 
  That's what PARI tried and they are probably the spkg with the *most*
  patches to the configuration system.
 
 
  More fool them.

 I am not suggesting *replicating* autotools.  I'm suggesting that we
 should clearly identify exactly what this ./configure is supposed to
 accomplish before deciding on what tool to use to implement it.
 Autconf may or may not be the right choice.

  -- William



I think from a user's perspective, if he/she sees a  configure script,
they are likely to assume it behaves the same way as 95+% of other
configure scripts. They probably will not know or care how it was created,
but they will probably appreciate if it works like most others.

I maintain a chess program

http://chessdb.sourceforge.net/

originally written by someone else. That has a configure script that is
NOT generated by autoconf. I think that was a bad decision by the original
author, as the script behaves differently to most others. Using it is less
intuitive than one generated by autoconf.

I know there are other packages which have non-autoconf configure scripts
(I think Perl is one such program), but generally it's a lot easier for a
user if the script behaves like he/she has seen so many times in the past,
and is familiar with.

I've used autoconf on a finite difference program I wrote for modelling
transmission lines.

http://atlc.sourceforge.net/

That worked very well, and allowed the code to be very portable - it has
been built on a Cray supercomputer as well as a Sony Playstation, and
pretty much any Unix or Unix-like system.

Unfortunately, from a developers point of view, it is not the easiest
language to learn, and my experience of many Sage developers would suggest
they will not be over keen on studying the details of .autoconf I can't
exactly blame them either.

-- 
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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-06 Thread Dr. David Kirkby

On 02/ 5/12 09:36 PM, William Stein wrote:


An intermediate option might be of interest to people who have
actually tried to write build systems using autoconf, a.k.a.,
autohell:


I think autohell happens when you can't be bothered to read the documentation 
and examples. The syntax is not the easiest, but nor is particularly difficult 
if you read the manual.


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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-06 Thread Burcin Erocal
On Sun, 5 Feb 2012 13:23:19 -0800 (PST)
John H Palmieri jhpalmier...@gmail.com wrote:

 Various aspects of building Sage might be cleaner if we used autoconf:
 
   ./configure  OPTIONS
   make
 
 OPTIONS could include a location to install Sage, various flags for 
 building ATLAS, and other options which we currently control by
 setting environment variables. For typical users, we should aim for
 
   ./configure
   make
 
 to work. We should also continue to use the current environment 
 variables--no need to remove them, just provide another way of
 setting them. Should we vote?
 
  [ ]  Switch to autoconf
  [ ]  Keep the current build system

There was a similar discussion earlier:

http://groups.google.com/group/sage-devel/t/b2ece135b42b5d98

The SEP Ralf wrote is also mentioned in that thread:

http://wiki.sagemath.org/AutoToolsSEP


IMHO, moving the checks from prereq to a top level configure file makes
sense. I used a waf script to handle this in lmonade:

https://bitbucket.org/burcin/lmnd-prefix/src/tip/scripts/wscript


Cheers,
Burcin

-- 
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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-06 Thread Julien Puydt
Le Mon, 06 Feb 2012 07:58:28 +,
Dr. David Kirkby david.kir...@onetel.net a écrit :
 It must be said, writing configure.ac makefile.am is not the easiest
 task - the language is not as intuitive as some. But it does work
 well, if implemented properly.

It is indeed not trivial, but doable, and in any case :

(1) trying to replicate the autotools won't be easier than just using
them ;

(2) trying to replicate the autotools would mean you lose the
experience gained by their developpers (autotools cover a lot of
terrible situations...) ;

(3) trying to replicate the autotools would mean you take the burden of
maintenance instead of their developpers ;

(4) using the autotools there is documentation out there
(real-world examples, books, forums, irc channels) ;

(5) using the autotools there are people with experience with it out
there which could lend a hand.

Snark on #sagemath

-- 
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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-06 Thread Jeroen Demeyer
On 2012-02-05 22:23, John H Palmieri wrote:
  [ ]  Switch to autoconf
  [ ]  Keep the current build system
[X] In theory, autoconf is a good idea.  But regarding the build system,
I think there are other priorities for the moment.

-- 
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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-06 Thread Dr. David Kirkby

On 02/ 6/12 08:17 AM, Julien Puydt wrote:

Le Mon, 06 Feb 2012 07:58:28 +,
Dr. David Kirkbydavid.kir...@onetel.net  a écrit :

It must be said, writing configure.ac makefile.am is not the easiest
task - the language is not as intuitive as some. But it does work
well, if implemented properly.


It is indeed not trivial, but doable, and in any case :

(1) trying to replicate the autotools won't be easier than just using
them ;

(2) trying to replicate the autotools would mean you lose the
experience gained by their developpers (autotools cover a lot of
terrible situations...) ;

(3) trying to replicate the autotools would mean you take the burden of
maintenance instead of their developpers ;

(4) using the autotools there is documentation out there
(real-world examples, books, forums, irc channels) ;

(5) using the autotools there are people with experience with it out
there which could lend a hand.

Snark on #sagemath



I agree with all of them.

I would add, the autoconf mailing list is very active, and questions are 
answered timely.


I think trying to replicate autotools would be just silly.

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

--
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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-06 Thread Jeroen Demeyer
On 2012-02-06 09:33, Dr. David Kirkby wrote:
 I think trying to replicate autotools would be just silly.
That's what PARI tried and they are probably the spkg with the *most*
patches to the configuration system.

-- 
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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-06 Thread Dr. David Kirkby

On 02/ 6/12 09:09 AM, Jeroen Demeyer wrote:

On 2012-02-06 09:33, Dr. David Kirkby wrote:

I think trying to replicate autotools would be just silly.

That's what PARI tried and they are probably the spkg with the *most*
patches to the configuration system.



More fool them.

SCons is another attempt at a build system, but I was not keen on it. I noticed 
another Sage developer removed it from some package, as he too found it 
frustrating.


I think autoconf/automake is very convenient for users, though it is not the 
easiest program for developers.


I pretty much re-wrote the prereq script from scratch, as that was written to 
use autoconf, but whoever wrote it did not read the autoconf documentation. They 
just started coding, which is very unwise with autoconf.


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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-05 Thread William Stein
On Sun, Feb 5, 2012 at 1:23 PM, John H Palmieri jhpalmier...@gmail.com wrote:
 Various aspects of building Sage might be cleaner if we used autoconf:

   ./configure  OPTIONS
   make

 OPTIONS could include a location to install Sage, various flags for building
 ATLAS, and other options which we currently control by setting environment
 variables. For typical users, we should aim for

   ./configure
   make

 to work. We should also continue to use the current environment
 variables--no need to remove them, just provide another way of setting them.
 Should we vote?

  [ ]  Switch to autoconf
  [ ]  Keep the current build system

An intermediate option might be of interest to people who have
actually tried to write build systems using autoconf, a.k.a.,
autohell:

[ ] Support something we call ./configure.

This ./configure may be optionally run before doing make, and may or
may not actually be implemented using autoconf, but definitely will
use standard POSIX options, and support features mentioned above
(e.g., install locations).

 -- William

 (Note that I'm not volunteering to implement this; I know nothing about
 writing configure.in scripts, and I don't want to learn...)

 --
 John

 --
 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



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

-- 
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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-05 Thread Julien Puydt
Le dimanche 5/02/2012, John H Palmieri jhpalmier...@gmail.com a
écrit :
  [ ]  Switch to autoconf

Yes!

Snark on #sagemath

-- 
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


Re: [sage-devel] use ./configure; make for Sage?

2012-02-05 Thread Dr. David Kirkby

On 02/ 5/12 09:23 PM, John H Palmieri wrote:

Various aspects of building Sage might be cleaner if we used autoconf:

   ./configure  OPTIONS
   make



I feel that would be a step forward. It would take a bit of work, but I've 
already done part of it with the prereq script, which uses autoconf.


It must be said, writing configure.ac makefile.am is not the easiest task - the 
language is not as intuitive as some. But it does work well, if implemented 
properly.


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