Re: [sage-devel] NTL v10

2016-10-11 Thread Francois Bissey

> On 12/10/2016, at 06:54, Victor Shoup  wrote:
> 
> While I'm not ready to go all autotools, I've started reading about it.
> I read about the DESTDIR trick that some package managers use,
> so I added support for that in the makefile.  Although I suppose 
> that may not be so relevant for Sage.
> 

Relevant to me! And certainly for the debian packagers too.

François

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] NTL v10

2016-10-11 Thread Justin C. Walker

On Oct 11, 2016, at 01:13 , John Cremona wrote:

> On 11 October 2016 at 01:03, Victor Shoup  wrote:
>> First, you are definitely wrong about punch cards. I started programming
>> with Fortran on punch cards in the 70s.
> 
> Punch cards?  They were a great  advance on paper tape which is what
> *I* started on.   To correct a typo in your program you had to  read
> the whole tape in, make the correction, and punch out a whole new
> tape!  Cards were so much easier as you could just replace one card.
> That was 1970 I think

Paper tape?  Man - if only I had that when I started.  *I* had to use lights 
and switches on the console to do I/O back then.  That was on a UNIVAC 1103A, 
if I recall correctly...that was in 1957.

When I advanced to punch cards, and handing in decks to get a run in, I would 
sometimes get the deck back with a pink slip on top saying "Caution: your deck 
may be out of order!".  I eventually discovered that the last 8 or so columns 
could be used to serialize the deck.  The sorter was my friend after that...

Just had to add to the confusion!  :-}

As you were...

Justin

--
Justin C. Walker, Curmudgeon at Large
Institute for the Absorption of Federal Funds
---
I'm beginning to like the cut of his jibberish.
---



-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] NTL v10

2016-10-11 Thread Dima Pasechnik


On Tuesday, October 11, 2016 at 3:02:17 PM UTC, John Cremona wrote:
>
> On 11 October 2016 at 15:34, William Stein  
> wrote: 
> > On Tue, Oct 11, 2016 at 7:24 AM, Dima Pasechnik  > wrote: 
> >> 
> >> 
> >> On Tuesday, October 11, 2016 at 8:14:02 AM UTC, John Cremona wrote: 
> >>> 
> >>> On 11 October 2016 at 01:03, Victor Shoup  wrote: 
> >>> > First, you are definitely wrong about punch cards. I started 
> programming 
> >>> > with Fortran on punch cards in the 70s. 
> >>> 
> >>> Punch cards?  They were a great  advance on paper tape which is what 
> >>> *I* started on.   To correct a typo in your program you had to  read 
> >>> the whole tape in, make the correction, and punch out a whole new 
> >>> tape!  Cards were so much easier as you could just replace one card. 
> >> 
> >> 
> >> sure, I had this at some point (1981?) too; the OS was booted from a 
> big 
> >> roll of plastic tape, and files and stuff 
> >> were on paper tape... I don't recall whether it was Basic or Fortran 
> one had 
> >> to program it with... 
> > 
> > You guys were so lucky to have an actual computer! 
>
> I only had access to it on Sunday afternoons, in winter.  Most of the 
> year it was lifted (by crane) onto a ship because it belonged to 
> Cambridge U's department of geodesy and geophysics, and they used it 
> to map the ocean floor.  And the rest of the week when it was in 
> Cambridge the academics had it. 
>
> > 
> > I spent my first year or two programming in the 70s by using a book 
> > I found in the garbage combined with a computer-looking 
> > thing I built out of cardboard, and simulating everything 
> > on paper or in my head. 
>
>
in 1979, final year of high school, we programmed Turing machines, on paper.
I probably was way more clever that time, as I had hard time recalling how 
this work
when I had to mention this to a student few years ago :-)
 

> The rest of the week / year we worked on paper too!  (But I didn't 
> bother making a fake computer out of cardboard). 
>
> > 
> > Uphill both ways, in the snow. 
> > 
> >> 
> >>> 
> >>> That was 1970 I think 
> >>> 
> >>> > 
> >>> > Second, a complete transition to auto tools still feels like 
> overkill at 
> >>> > this point. 
> >>> > But I agree that it could come one day. 
> >>> 
> >>> With a lot of help (from people on this thread and for the same 
> >>> reasons) I went through that agony with eclib.  I don't regret it but 
> >>> I would not want to do it again! 
> >> 
> >> 
> >> I've done this for a couple of Sage packages (admittedly, smaller and 
> >> simpler than NTL)... 
> >> 
> >>> 
> >>> 
> >>> John 
> >>> 
> >>> > In any case, I am almost done with all the requested changes. 
> >>> > I will follow up with a couple of quick questions, though. 
> >>> > 
> >>> > 
> >>> > On Monday, October 10, 2016 at 5:09:48 PM UTC-4, Dima Pasechnik 
> wrote: 
> >>> >> 
> >>> >> 
> >>> >> 
> >>> >> On Monday, October 10, 2016 at 9:09:38 PM UTC+1, François wrote: 
> >>> >>> 
> >>> >>> On 11/10/16 01:58, Victor Shoup wrote: 
> >>> >>> > Another issue. I'm not sure if $(MAKE) is specific to gnu make 
> or if 
> >>> >>> > it 
> >>> >>> > is universal. 
> >>> >>> > In general, I don't want to assume gnu. But I can certainly make 
> >>> >>> > this 
> >>> >>> > the default, 
> >>> >>> > and provide a config variable to override. 
> >>> >>> 
> >>> >>> I'll have another go at this when you use 
> >>> >>> $(MAKE) inside a makefile you are making sure 
> >>> >>> that the make command used is the same one that 
> >>> >>> you called on the initial makefile. 
> >>> >>> 
> >>> >>> As other people mentioned it enable parallel make 
> >>> >>> to proceed nicely, and in the case where there is 
> >>> >>> several make command installed on the system 
> >>> >>> you avoid funny things happening. I have AIX 
> >>> >>> system which comes with its own posix make 
> >>> >>> command. Something like ntl probably require 
> >>> >>> gmake (GNU make), calling AIX make in the 
> >>> >>> middle is not a good idea. 
> >>> >>> 
> >>> >> 
> >>> >> Perhaps the most natural solution would be to change NTL build 
> system 
> >>> >> so 
> >>> >> that 
> >>> >> it uses the standard autotools chain (autoconf/automake etc), not 
> only 
> >>> >> libtool. 
> >>> >> Given that it uses very few external libraries, it ought to be an 
> easy 
> >>> >> task. 
> >>> >> 
> >>> >> Given that I am perhaps the only person in this thread who learned 
> to 
> >>> >> program using punch cards, 
> >>> >> I am a dinosaur from an earlier period, yet, I look into the future 
> :-) 
> >>> >> 
> >>> >> Dima 
> >>> >> 
> >>> >> 
> >>> >> 
> >>> >>> Francois 
> >>> > 
> >>> > -- 
> >>> > You received this message because you are subscribed to the Google 
> >>> > Groups 
> >>> > "sage-devel" group. 
> >>> > To unsubscribe from this group and stop receiving emails from it, 
> send 
> >>> > an 
> >>> > email to sage-devel+...@googlegroups.com. 
> >>> > To post to this 

Re: [sage-devel] NTL v10

2016-10-11 Thread John Cremona
On 11 October 2016 at 15:34, William Stein  wrote:
> On Tue, Oct 11, 2016 at 7:24 AM, Dima Pasechnik  wrote:
>>
>>
>> On Tuesday, October 11, 2016 at 8:14:02 AM UTC, John Cremona wrote:
>>>
>>> On 11 October 2016 at 01:03, Victor Shoup  wrote:
>>> > First, you are definitely wrong about punch cards. I started programming
>>> > with Fortran on punch cards in the 70s.
>>>
>>> Punch cards?  They were a great  advance on paper tape which is what
>>> *I* started on.   To correct a typo in your program you had to  read
>>> the whole tape in, make the correction, and punch out a whole new
>>> tape!  Cards were so much easier as you could just replace one card.
>>
>>
>> sure, I had this at some point (1981?) too; the OS was booted from a big
>> roll of plastic tape, and files and stuff
>> were on paper tape... I don't recall whether it was Basic or Fortran one had
>> to program it with...
>
> You guys were so lucky to have an actual computer!

I only had access to it on Sunday afternoons, in winter.  Most of the
year it was lifted (by crane) onto a ship because it belonged to
Cambridge U's department of geodesy and geophysics, and they used it
to map the ocean floor.  And the rest of the week when it was in
Cambridge the academics had it.

>
> I spent my first year or two programming in the 70s by using a book
> I found in the garbage combined with a computer-looking
> thing I built out of cardboard, and simulating everything
> on paper or in my head.

The rest of the week / year we worked on paper too!  (But I didn't
bother making a fake computer out of cardboard).

>
> Uphill both ways, in the snow.
>
>>
>>>
>>> That was 1970 I think
>>>
>>> >
>>> > Second, a complete transition to auto tools still feels like overkill at
>>> > this point.
>>> > But I agree that it could come one day.
>>>
>>> With a lot of help (from people on this thread and for the same
>>> reasons) I went through that agony with eclib.  I don't regret it but
>>> I would not want to do it again!
>>
>>
>> I've done this for a couple of Sage packages (admittedly, smaller and
>> simpler than NTL)...
>>
>>>
>>>
>>> John
>>>
>>> > In any case, I am almost done with all the requested changes.
>>> > I will follow up with a couple of quick questions, though.
>>> >
>>> >
>>> > On Monday, October 10, 2016 at 5:09:48 PM UTC-4, Dima Pasechnik wrote:
>>> >>
>>> >>
>>> >>
>>> >> On Monday, October 10, 2016 at 9:09:38 PM UTC+1, François wrote:
>>> >>>
>>> >>> On 11/10/16 01:58, Victor Shoup wrote:
>>> >>> > Another issue. I'm not sure if $(MAKE) is specific to gnu make or if
>>> >>> > it
>>> >>> > is universal.
>>> >>> > In general, I don't want to assume gnu. But I can certainly make
>>> >>> > this
>>> >>> > the default,
>>> >>> > and provide a config variable to override.
>>> >>>
>>> >>> I'll have another go at this when you use
>>> >>> $(MAKE) inside a makefile you are making sure
>>> >>> that the make command used is the same one that
>>> >>> you called on the initial makefile.
>>> >>>
>>> >>> As other people mentioned it enable parallel make
>>> >>> to proceed nicely, and in the case where there is
>>> >>> several make command installed on the system
>>> >>> you avoid funny things happening. I have AIX
>>> >>> system which comes with its own posix make
>>> >>> command. Something like ntl probably require
>>> >>> gmake (GNU make), calling AIX make in the
>>> >>> middle is not a good idea.
>>> >>>
>>> >>
>>> >> Perhaps the most natural solution would be to change NTL build system
>>> >> so
>>> >> that
>>> >> it uses the standard autotools chain (autoconf/automake etc), not only
>>> >> libtool.
>>> >> Given that it uses very few external libraries, it ought to be an easy
>>> >> task.
>>> >>
>>> >> Given that I am perhaps the only person in this thread who learned to
>>> >> program using punch cards,
>>> >> I am a dinosaur from an earlier period, yet, I look into the future :-)
>>> >>
>>> >> Dima
>>> >>
>>> >>
>>> >>
>>> >>> Francois
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> > Groups
>>> > "sage-devel" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send
>>> > an
>>> > email to sage-devel+...@googlegroups.com.
>>> > To post to this group, send email to sage-...@googlegroups.com.
>>> > Visit this group at https://groups.google.com/group/sage-devel.
>>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "sage-devel" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to sage-devel+unsubscr...@googlegroups.com.
>> To post to this group, send email to sage-devel@googlegroups.com.
>> Visit this group at https://groups.google.com/group/sage-devel.
>> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> William (http://wstein.org)
>
> --
> You received this message 

Re: [sage-devel] NTL v10

2016-10-11 Thread William Stein
On Tue, Oct 11, 2016 at 7:24 AM, Dima Pasechnik  wrote:
>
>
> On Tuesday, October 11, 2016 at 8:14:02 AM UTC, John Cremona wrote:
>>
>> On 11 October 2016 at 01:03, Victor Shoup  wrote:
>> > First, you are definitely wrong about punch cards. I started programming
>> > with Fortran on punch cards in the 70s.
>>
>> Punch cards?  They were a great  advance on paper tape which is what
>> *I* started on.   To correct a typo in your program you had to  read
>> the whole tape in, make the correction, and punch out a whole new
>> tape!  Cards were so much easier as you could just replace one card.
>
>
> sure, I had this at some point (1981?) too; the OS was booted from a big
> roll of plastic tape, and files and stuff
> were on paper tape... I don't recall whether it was Basic or Fortran one had
> to program it with...

You guys were so lucky to have an actual computer!

I spent my first year or two programming in the 70s by using a book
I found in the garbage combined with a computer-looking
thing I built out of cardboard, and simulating everything
on paper or in my head.

Uphill both ways, in the snow.

>
>>
>> That was 1970 I think
>>
>> >
>> > Second, a complete transition to auto tools still feels like overkill at
>> > this point.
>> > But I agree that it could come one day.
>>
>> With a lot of help (from people on this thread and for the same
>> reasons) I went through that agony with eclib.  I don't regret it but
>> I would not want to do it again!
>
>
> I've done this for a couple of Sage packages (admittedly, smaller and
> simpler than NTL)...
>
>>
>>
>> John
>>
>> > In any case, I am almost done with all the requested changes.
>> > I will follow up with a couple of quick questions, though.
>> >
>> >
>> > On Monday, October 10, 2016 at 5:09:48 PM UTC-4, Dima Pasechnik wrote:
>> >>
>> >>
>> >>
>> >> On Monday, October 10, 2016 at 9:09:38 PM UTC+1, François wrote:
>> >>>
>> >>> On 11/10/16 01:58, Victor Shoup wrote:
>> >>> > Another issue. I'm not sure if $(MAKE) is specific to gnu make or if
>> >>> > it
>> >>> > is universal.
>> >>> > In general, I don't want to assume gnu. But I can certainly make
>> >>> > this
>> >>> > the default,
>> >>> > and provide a config variable to override.
>> >>>
>> >>> I'll have another go at this when you use
>> >>> $(MAKE) inside a makefile you are making sure
>> >>> that the make command used is the same one that
>> >>> you called on the initial makefile.
>> >>>
>> >>> As other people mentioned it enable parallel make
>> >>> to proceed nicely, and in the case where there is
>> >>> several make command installed on the system
>> >>> you avoid funny things happening. I have AIX
>> >>> system which comes with its own posix make
>> >>> command. Something like ntl probably require
>> >>> gmake (GNU make), calling AIX make in the
>> >>> middle is not a good idea.
>> >>>
>> >>
>> >> Perhaps the most natural solution would be to change NTL build system
>> >> so
>> >> that
>> >> it uses the standard autotools chain (autoconf/automake etc), not only
>> >> libtool.
>> >> Given that it uses very few external libraries, it ought to be an easy
>> >> task.
>> >>
>> >> Given that I am perhaps the only person in this thread who learned to
>> >> program using punch cards,
>> >> I am a dinosaur from an earlier period, yet, I look into the future :-)
>> >>
>> >> Dima
>> >>
>> >>
>> >>
>> >>> Francois
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "sage-devel" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to sage-devel+...@googlegroups.com.
>> > To post to this group, send email to sage-...@googlegroups.com.
>> > Visit this group at https://groups.google.com/group/sage-devel.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.



-- 
William (http://wstein.org)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] NTL v10

2016-10-11 Thread Dima Pasechnik


On Tuesday, October 11, 2016 at 8:14:02 AM UTC, John Cremona wrote:
>
> On 11 October 2016 at 01:03, Victor Shoup  
> wrote: 
> > First, you are definitely wrong about punch cards. I started programming 
> > with Fortran on punch cards in the 70s. 
>
> Punch cards?  They were a great  advance on paper tape which is what 
> *I* started on.   To correct a typo in your program you had to  read 
> the whole tape in, make the correction, and punch out a whole new 
> tape!  Cards were so much easier as you could just replace one card. 
>

sure, I had this at some point (1981?) too; the OS was booted from a big 
roll of plastic tape, and files and stuff
were on paper tape... I don't recall whether it was Basic or Fortran one 
had to program it with...
 

> That was 1970 I think 
>
> > 
> > Second, a complete transition to auto tools still feels like overkill at 
> > this point. 
> > But I agree that it could come one day. 
>
> With a lot of help (from people on this thread and for the same 
> reasons) I went through that agony with eclib.  I don't regret it but 
> I would not want to do it again! 
>

I've done this for a couple of Sage packages (admittedly, smaller and 
simpler than NTL)...
 

>
> John 
>
> > In any case, I am almost done with all the requested changes. 
> > I will follow up with a couple of quick questions, though. 
> > 
> > 
> > On Monday, October 10, 2016 at 5:09:48 PM UTC-4, Dima Pasechnik wrote: 
> >> 
> >> 
> >> 
> >> On Monday, October 10, 2016 at 9:09:38 PM UTC+1, François wrote: 
> >>> 
> >>> On 11/10/16 01:58, Victor Shoup wrote: 
> >>> > Another issue. I'm not sure if $(MAKE) is specific to gnu make or if 
> it 
> >>> > is universal. 
> >>> > In general, I don't want to assume gnu. But I can certainly make 
> this 
> >>> > the default, 
> >>> > and provide a config variable to override. 
> >>> 
> >>> I'll have another go at this when you use 
> >>> $(MAKE) inside a makefile you are making sure 
> >>> that the make command used is the same one that 
> >>> you called on the initial makefile. 
> >>> 
> >>> As other people mentioned it enable parallel make 
> >>> to proceed nicely, and in the case where there is 
> >>> several make command installed on the system 
> >>> you avoid funny things happening. I have AIX 
> >>> system which comes with its own posix make 
> >>> command. Something like ntl probably require 
> >>> gmake (GNU make), calling AIX make in the 
> >>> middle is not a good idea. 
> >>> 
> >> 
> >> Perhaps the most natural solution would be to change NTL build system 
> so 
> >> that 
> >> it uses the standard autotools chain (autoconf/automake etc), not only 
> >> libtool. 
> >> Given that it uses very few external libraries, it ought to be an easy 
> >> task. 
> >> 
> >> Given that I am perhaps the only person in this thread who learned to 
> >> program using punch cards, 
> >> I am a dinosaur from an earlier period, yet, I look into the future :-) 
> >> 
> >> Dima 
> >> 
> >> 
> >> 
> >>> Francois 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "sage-devel" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to sage-devel+...@googlegroups.com . 
> > To post to this group, send email to sage-...@googlegroups.com 
> . 
> > Visit this group at https://groups.google.com/group/sage-devel. 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] NTL v10

2016-10-11 Thread John Cremona
On 11 October 2016 at 01:03, Victor Shoup  wrote:
> First, you are definitely wrong about punch cards. I started programming
> with Fortran on punch cards in the 70s.

Punch cards?  They were a great  advance on paper tape which is what
*I* started on.   To correct a typo in your program you had to  read
the whole tape in, make the correction, and punch out a whole new
tape!  Cards were so much easier as you could just replace one card.
That was 1970 I think

>
> Second, a complete transition to auto tools still feels like overkill at
> this point.
> But I agree that it could come one day.

With a lot of help (from people on this thread and for the same
reasons) I went through that agony with eclib.  I don't regret it but
I would not want to do it again!

John

> In any case, I am almost done with all the requested changes.
> I will follow up with a couple of quick questions, though.
>
>
> On Monday, October 10, 2016 at 5:09:48 PM UTC-4, Dima Pasechnik wrote:
>>
>>
>>
>> On Monday, October 10, 2016 at 9:09:38 PM UTC+1, François wrote:
>>>
>>> On 11/10/16 01:58, Victor Shoup wrote:
>>> > Another issue. I'm not sure if $(MAKE) is specific to gnu make or if it
>>> > is universal.
>>> > In general, I don't want to assume gnu. But I can certainly make this
>>> > the default,
>>> > and provide a config variable to override.
>>>
>>> I'll have another go at this when you use
>>> $(MAKE) inside a makefile you are making sure
>>> that the make command used is the same one that
>>> you called on the initial makefile.
>>>
>>> As other people mentioned it enable parallel make
>>> to proceed nicely, and in the case where there is
>>> several make command installed on the system
>>> you avoid funny things happening. I have AIX
>>> system which comes with its own posix make
>>> command. Something like ntl probably require
>>> gmake (GNU make), calling AIX make in the
>>> middle is not a good idea.
>>>
>>
>> Perhaps the most natural solution would be to change NTL build system so
>> that
>> it uses the standard autotools chain (autoconf/automake etc), not only
>> libtool.
>> Given that it uses very few external libraries, it ought to be an easy
>> task.
>>
>> Given that I am perhaps the only person in this thread who learned to
>> program using punch cards,
>> I am a dinosaur from an earlier period, yet, I look into the future :-)
>>
>> Dima
>>
>>
>>
>>> Francois
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] NTL v10

2016-10-10 Thread Francois Bissey
And actually I said some stuff without revisiting what is done
in Gentoo and in sage and I am not sure which one is overkill
anymore. I inherit cruft from someone else (possibly me in the past).
I need to sort it out.

To go back to:
Second, in the patch, you write
   $(LINK) $(LIBTOOL_FLAGS)
whereas it seems to me more logical to put
  $(LIBTOOL_FLAGS) $(LINK)

I think libtool is able to figure it regardless of the order.
This flag is only used for cygwin in sage. It is then set to 
“-no-undefined” which is definitely recognised as a special 
argument for -mode=link and it will be treated specially.
But the libtool manual doesn’t say it has to be specified before 
or after the “linking” command. People are more comfortable with it 
being part of the linking command I guess.
I’d say the way it is done in the patch is the most usual way to do it.

François

> On 11/10/2016, at 13:26, Victor Shoup  wrote:
> 
> Anyway, like I said, I'm pretty much done, modulo a couple
> of things that I asked about two posts above.
> Hopefully, someone can clarify those points soon,
> and then there will be a distribution of NTL that does 
> not require any patching :-) 
> 
> On Monday, October 10, 2016 at 8:16:17 PM UTC-4, François wrote:
> Autotools is nicer for a lot of things. sage does patch 
> to use libtools and I stayed away from that in Gentoo. 
> The main advantage as far as I am concerned is that it makes 
> it easier to produce shared libraries, correctly on a variety 
> of platforms. Just for linux, and OS X, you don’t strictly 
> need to do that but it is a good investment in the future. 
> 
> In that regard the current sage solution is a bit of a halfway point. 
> You really should couple it with automake and autoconf but that’s 
> more work. 
> 
> But we should have pestered you about make/$(MAKE) a lot more 
> as it is a much bigger sin ;) 
> 
> François 
> 
> > On 11/10/2016, at 13:03, Victor Shoup  wrote: 
> > 
> > First, you are definitely wrong about punch cards. I started programming 
> > with Fortran on punch cards in the 70s. 
> > 
> > Second, a complete transition to auto tools still feels like overkill at 
> > this point. 
> > But I agree that it could come one day. 
> > In any case, I am almost done with all the requested changes. 
> > I will follow up with a couple of quick questions, though. 
> > 
> > On Monday, October 10, 2016 at 5:09:48 PM UTC-4, Dima Pasechnik wrote: 
> > 
> > 
> > On Monday, October 10, 2016 at 9:09:38 PM UTC+1, François wrote: 
> > On 11/10/16 01:58, Victor Shoup wrote: 
> > > Another issue. I'm not sure if $(MAKE) is specific to gnu make or if it 
> > > is universal. 
> > > In general, I don't want to assume gnu. But I can certainly make this the 
> > > default, 
> > > and provide a config variable to override. 
> > 
> > I'll have another go at this when you use 
> > $(MAKE) inside a makefile you are making sure 
> > that the make command used is the same one that 
> > you called on the initial makefile. 
> > 
> > As other people mentioned it enable parallel make 
> > to proceed nicely, and in the case where there is 
> > several make command installed on the system 
> > you avoid funny things happening. I have AIX 
> > system which comes with its own posix make 
> > command. Something like ntl probably require 
> > gmake (GNU make), calling AIX make in the 
> > middle is not a good idea. 
> > 
> > 
> > Perhaps the most natural solution would be to change NTL build system so 
> > that 
> > it uses the standard autotools chain (autoconf/automake etc), not only 
> > libtool. 
> > Given that it uses very few external libraries, it ought to be an easy 
> > task. 
> > 
> > Given that I am perhaps the only person in this thread who learned to 
> > program using punch cards, 
> > I am a dinosaur from an earlier period, yet, I look into the future :-) 
> >   
> > Dima 
> > 
> > 
> > 
> > Francois 
> > 
> > -- 
> > You received this message because you are subscribed to the Google Groups 
> > "sage-devel" group. 
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to sage-devel+...@googlegroups.com. 
> > To post to this group, send email to sage-...@googlegroups.com. 
> > Visit this group at https://groups.google.com/group/sage-devel. 
> > For more options, visit https://groups.google.com/d/optout. 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 

Re: [sage-devel] NTL v10

2016-10-10 Thread Victor Shoup
Anyway, like I said, I'm pretty much done, modulo a couple
of things that I asked about two posts above.
Hopefully, someone can clarify those points soon,
and then there will be a distribution of NTL that does 
not require any patching :-) 

On Monday, October 10, 2016 at 8:16:17 PM UTC-4, François wrote:
>
> Autotools is nicer for a lot of things. sage does patch 
> to use libtools and I stayed away from that in Gentoo. 
> The main advantage as far as I am concerned is that it makes 
> it easier to produce shared libraries, correctly on a variety 
> of platforms. Just for linux, and OS X, you don’t strictly 
> need to do that but it is a good investment in the future. 
>
> In that regard the current sage solution is a bit of a halfway point. 
> You really should couple it with automake and autoconf but that’s 
> more work. 
>
> But we should have pestered you about make/$(MAKE) a lot more 
> as it is a much bigger sin ;) 
>
> François 
>
> > On 11/10/2016, at 13:03, Victor Shoup  
> wrote: 
> > 
> > First, you are definitely wrong about punch cards. I started programming 
> > with Fortran on punch cards in the 70s. 
> > 
> > Second, a complete transition to auto tools still feels like overkill at 
> this point. 
> > But I agree that it could come one day. 
> > In any case, I am almost done with all the requested changes. 
> > I will follow up with a couple of quick questions, though. 
> > 
> > On Monday, October 10, 2016 at 5:09:48 PM UTC-4, Dima Pasechnik wrote: 
> > 
> > 
> > On Monday, October 10, 2016 at 9:09:38 PM UTC+1, François wrote: 
> > On 11/10/16 01:58, Victor Shoup wrote: 
> > > Another issue. I'm not sure if $(MAKE) is specific to gnu make or if 
> it is universal. 
> > > In general, I don't want to assume gnu. But I can certainly make this 
> the default, 
> > > and provide a config variable to override. 
> > 
> > I'll have another go at this when you use 
> > $(MAKE) inside a makefile you are making sure 
> > that the make command used is the same one that 
> > you called on the initial makefile. 
> > 
> > As other people mentioned it enable parallel make 
> > to proceed nicely, and in the case where there is 
> > several make command installed on the system 
> > you avoid funny things happening. I have AIX 
> > system which comes with its own posix make 
> > command. Something like ntl probably require 
> > gmake (GNU make), calling AIX make in the 
> > middle is not a good idea. 
> > 
> > 
> > Perhaps the most natural solution would be to change NTL build system so 
> that 
> > it uses the standard autotools chain (autoconf/automake etc), not only 
> libtool. 
> > Given that it uses very few external libraries, it ought to be an easy 
> task. 
> > 
> > Given that I am perhaps the only person in this thread who learned to 
> program using punch cards, 
> > I am a dinosaur from an earlier period, yet, I look into the future :-) 
> >   
> > Dima 
> > 
> > 
> > 
> > Francois 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "sage-devel" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to sage-devel+...@googlegroups.com . 
> > To post to this group, send email to sage-...@googlegroups.com 
> . 
> > Visit this group at https://groups.google.com/group/sage-devel. 
> > For more options, visit https://groups.google.com/d/optout. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] NTL v10

2016-10-10 Thread Francois Bissey
Autotools is nicer for a lot of things. sage does patch
to use libtools and I stayed away from that in Gentoo.
The main advantage as far as I am concerned is that it makes
it easier to produce shared libraries, correctly on a variety
of platforms. Just for linux, and OS X, you don’t strictly 
need to do that but it is a good investment in the future.

In that regard the current sage solution is a bit of a halfway point.
You really should couple it with automake and autoconf but that’s
more work.

But we should have pestered you about make/$(MAKE) a lot more
as it is a much bigger sin ;)

François

> On 11/10/2016, at 13:03, Victor Shoup  wrote:
> 
> First, you are definitely wrong about punch cards. I started programming
> with Fortran on punch cards in the 70s.
> 
> Second, a complete transition to auto tools still feels like overkill at this 
> point.
> But I agree that it could come one day.
> In any case, I am almost done with all the requested changes.
> I will follow up with a couple of quick questions, though.
> 
> On Monday, October 10, 2016 at 5:09:48 PM UTC-4, Dima Pasechnik wrote:
> 
> 
> On Monday, October 10, 2016 at 9:09:38 PM UTC+1, François wrote:
> On 11/10/16 01:58, Victor Shoup wrote: 
> > Another issue. I'm not sure if $(MAKE) is specific to gnu make or if it is 
> > universal. 
> > In general, I don't want to assume gnu. But I can certainly make this the 
> > default, 
> > and provide a config variable to override. 
> 
> I'll have another go at this when you use 
> $(MAKE) inside a makefile you are making sure 
> that the make command used is the same one that 
> you called on the initial makefile. 
> 
> As other people mentioned it enable parallel make 
> to proceed nicely, and in the case where there is 
> several make command installed on the system 
> you avoid funny things happening. I have AIX 
> system which comes with its own posix make 
> command. Something like ntl probably require 
> gmake (GNU make), calling AIX make in the 
> middle is not a good idea. 
> 
> 
> Perhaps the most natural solution would be to change NTL build system so that
> it uses the standard autotools chain (autoconf/automake etc), not only 
> libtool.
> Given that it uses very few external libraries, it ought to be an easy task.
> 
> Given that I am perhaps the only person in this thread who learned to program 
> using punch cards, 
> I am a dinosaur from an earlier period, yet, I look into the future :-)
>  
> Dima
> 
> 
> 
> Francois 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] NTL v10

2016-10-10 Thread Victor Shoup
I am almost done with everything!!
I have just a couple of remaining questions.

First, I am having a hard time understanding why singular is having a hard 
time
with the definition of NTL_NEW_OP.  It is defined that way for a reason, 
and this
is completely standard C++ (standard, as in C++98).
Could somebody explain what is going on?
The suggested patch, here
https://github.com/sagemath/sage/blob/master/build/pkgs/ntl/patches/new_singular.patch
is not really the correct semantics.

Second, I have two questions about the libtool flags patch, here:
https://github.com/sagemath/sage/blob/master/build/pkgs/ntl/patches/libtool_flag.patch

First, it would seem more logical to me to have a different flag for each 
libtool mode
(i.e., compile, link, etc). That is easy enough to do. Does that seem right?
Or is one global flag OK (but it will get added to every invocation of 
libtool).

Second, in the patch, you write
   $(LINK) $(LIBTOOL_FLAGS)
whereas it seems to me more logical to put
  $(LIBTOOL_FLAGS) $(LINK)
so that the libtool flags come towards the beginning of the invocation of 
libtool.
Otherwise, these are acting more like compiler flags.

Maybe it would be much clearer if I knew what the typical use case of 
LIBTOOL_FLAGS
actually was.
Thanks!

The sooner you clarify the issues, the sooner I can release the patched up 
version.
I'm already done with all the other libtool and $(MAKE) issues.


On Monday, October 10, 2016 at 5:58:05 AM UTC-4, Jean-Pierre Flori wrote:
>
> Thanks for the hint, we are already a few versions behind.
>
> I've opened #21676 for us to update, if anyone wants to review it:
> * https://trac.sagemath.org/ticket/21676#ticket
>
> By the way we are still shipping a few patches, have a look at:
> * https://github.com/sagemath/sage/blob/master/build/pkgs/ntl/patches/
>
> I'd say the most annoying one is:
> * 
> https://github.com/sagemath/sage/blob/master/build/pkgs/ntl/patches/configure.ac
> We're just making an empty autotool project, running autoreconf, and 
> repackaging your tarball so that it provides its own version of libtool.
> (All of this is done by this script:
> * https://github.com/sagemath/sage/blob/master/build/pkgs/ntl/spkg-src
> )
> Indeed some systems do not provide any "default" libtool script.
>
> And surely the following one is about using $MAKE rather than make in your 
> makefile:
> * 
> https://github.com/sagemath/sage/blob/master/build/pkgs/ntl/patches/make.patch
> Its purpose is quite obvious :)
>
> And finally, giving the ability to pass flags to libtool:
> * 
> https://github.com/sagemath/sage/blob/master/build/pkgs/ntl/patches/libtool_flag.patch
> This is useful when building on cygwin/mingw where libtool wants an 
> -no-undefined flag to even try to build a shared lib (without it it does 
> not even try).
>
> Best,
> JPF
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] NTL v10

2016-10-10 Thread Victor Shoup
First, you are definitely wrong about punch cards. I started programming
with Fortran on punch cards in the 70s.

Second, a complete transition to auto tools still feels like overkill at 
this point.
But I agree that it could come one day.
In any case, I am almost done with all the requested changes.
I will follow up with a couple of quick questions, though.

On Monday, October 10, 2016 at 5:09:48 PM UTC-4, Dima Pasechnik wrote:
>
>
>
> On Monday, October 10, 2016 at 9:09:38 PM UTC+1, François wrote:
>>
>> On 11/10/16 01:58, Victor Shoup wrote: 
>> > Another issue. I'm not sure if $(MAKE) is specific to gnu make or if it 
>> is universal. 
>> > In general, I don't want to assume gnu. But I can certainly make this 
>> the default, 
>> > and provide a config variable to override. 
>>
>> I'll have another go at this when you use 
>> $(MAKE) inside a makefile you are making sure 
>> that the make command used is the same one that 
>> you called on the initial makefile. 
>>
>> As other people mentioned it enable parallel make 
>> to proceed nicely, and in the case where there is 
>> several make command installed on the system 
>> you avoid funny things happening. I have AIX 
>> system which comes with its own posix make 
>> command. Something like ntl probably require 
>> gmake (GNU make), calling AIX make in the 
>> middle is not a good idea. 
>>
>>
> Perhaps the most natural solution would be to change NTL build system so 
> that
> it uses the standard autotools chain (autoconf/automake etc), not only 
> libtool.
> Given that it uses very few external libraries, it ought to be an easy 
> task.
>
> Given that I am perhaps the only person in this thread who learned to 
> program using punch cards, 
> I am a dinosaur from an earlier period, yet, I look into the future :-)
>  
> Dima
>
>
>
> Francois 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] NTL v10

2016-10-10 Thread Dima Pasechnik


On Monday, October 10, 2016 at 9:09:38 PM UTC+1, François wrote:
>
> On 11/10/16 01:58, Victor Shoup wrote: 
> > Another issue. I'm not sure if $(MAKE) is specific to gnu make or if it 
> is universal. 
> > In general, I don't want to assume gnu. But I can certainly make this 
> the default, 
> > and provide a config variable to override. 
>
> I'll have another go at this when you use 
> $(MAKE) inside a makefile you are making sure 
> that the make command used is the same one that 
> you called on the initial makefile. 
>
> As other people mentioned it enable parallel make 
> to proceed nicely, and in the case where there is 
> several make command installed on the system 
> you avoid funny things happening. I have AIX 
> system which comes with its own posix make 
> command. Something like ntl probably require 
> gmake (GNU make), calling AIX make in the 
> middle is not a good idea. 
>
>
Perhaps the most natural solution would be to change NTL build system so 
that
it uses the standard autotools chain (autoconf/automake etc), not only 
libtool.
Given that it uses very few external libraries, it ought to be an easy task.

Given that I am perhaps the only person in this thread who learned to 
program using punch cards, 
I am a dinosaur from an earlier period, yet, I look into the future :-)
 
Dima



Francois 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] NTL v10

2016-10-10 Thread François Bissey

On 11/10/16 01:58, Victor Shoup wrote:

Another issue. I'm not sure if $(MAKE) is specific to gnu make or if it is 
universal.
In general, I don't want to assume gnu. But I can certainly make this the 
default,
and provide a config variable to override.


I'll have another go at this when you use
$(MAKE) inside a makefile you are making sure
that the make command used is the same one that
you called on the initial makefile.

As other people mentioned it enable parallel make
to proceed nicely, and in the case where there is
several make command installed on the system
you avoid funny things happening. I have AIX
system which comes with its own posix make
command. Something like ntl probably require
gmake (GNU make), calling AIX make in the
middle is not a good idea.

Francois

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] NTL v10

2016-10-10 Thread Victor Shoup
About the make variable...  I can definitely see it's utility with make -j... I 
would guess that's the main advantage, and that's easy enough to fix in the 
makefile itself. 

The other calls to make from other scripts are a bit more problematic. Would 
you say they are a priority? And if so, would one assume that a user would set 
the environment variable MAKE? 

As I understand it, in gnuc make, the  variable MAKE is not an ordinary 
environment variable. It is a special variable with extra magic specific to 
make (including -j magic). 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] NTL v10

2016-10-10 Thread Jean-Pierre Flori
Hum sorry I did not read the previous  posts completely.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] NTL v10

2016-10-10 Thread Jean-Pierre Flori
Using MAKE also let you trigger parallel build for subtargets with MAKE="make 
-j128".
Given the current use of make within the makefile it is not really the case.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] NTL v10

2016-10-10 Thread Jeroen Demeyer

On 2016-10-10 16:13, Victor Shoup wrote:

One more question, relating to $(MAKE). There are a number of scripts besides 
the makefile that also invoke make. Should these also be modified? But then the 
mechanism would have to be different (environment variable?). Before I can sort 
that out, I would like to know what is the goal here? Is system make really not 
used in some environments? Or is there some magic in $(MAKE) within a makefile 
that is being used? If the latter, then I can probably just keep the other 
invocations of make are OK as is.


In other scripts, I think that "$MAKE" is mainly used to allow using a 
different version of make. For example, some systems might have a GNU 
make (installed as gmake) and a non-GNU make (installed as make). The 
MAKE environment variable can be set to the chosen make variant.


--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] NTL v10

2016-10-10 Thread Jean-Pierre Flori


On Monday, October 10, 2016 at 3:53:34 PM UTC+2, Victor Shoup wrote:
>
> Let me get this straight...
> You say that the tarball does not contain a libtool script, but rather, 
> contains a directory that contains files that will build a libtool script 
> at compile time. Is that right?

Which tarball?

NTL tarball does not contain anything providing libtool, it relies on the 
availibility of a systemwide one, which is not standard, but can be 
provided by installing some packages as John does. Unfortunately the 
mondane user will just feel lost and won't be able to perform this step (or 
does not want to pollute her system with yet another package).

The repackaged tarball Sage ships contains:
* the verbatim content of the NTL upstream tarball in a ntl folder,
* an additional libtool folder where you can run "./configure" to produce a 
"libtool" script. Note that all that is contained in this folder was 
produced running autoreconf on a configure.ac file on a "development" 
machine.

Then when one want to build Sage and its version of ntl on her machine, the 
"configure" script is run and produces a "libtool" script to be used by the 
compilation chain in the ntl folder.
So you could call this step configuration time or compilation time.

What is sure is that calling the "configure" script is performed on the 
machine where NTL will be compiled, not on the machine where "autoreconf" 
was run to produce "configure" and "ltmain.sh" from the quite empty 
"configure.ac".

In fact running "configure" on the "development" machine rather than on the 
"compilation" machine, maybe hoping to provide a universal libtool script, 
would be wrong.
The "configure" and "ltmain.sh" scripts made by autoreconf are meant to be 
portable, the "libtool" script they produce is much less.

So maybe the answer to your question is "yes": the best solution would be 
that the ntl upstream tarball contains waht is needed to produce the 
libtool script on the machine where ntl will be compiled.

And the answer to the question "how to produce that stuff easily and 
without changing all of ntl build system" is:
* make a quite empty autotools project, that is a configure.ac file like 
the one at:
  $ 
https://github.com/sagemath/sage/blob/master/build/pkgs/ntl/patches/configure.ac
* modify ntl's configure script to run the configure script that will be 
produced by autoreconf at distribution time
* modify the ntl's makefile to use the libtool script that will be produced 
by configure
* when you want to ship a new release:
  $ run autoreconf where configure.ac
  $ make your tarball

Another option would be to migrate all ntl build system to autotools but 
that would be much more time consuming... with the above steps you just 
hack to get a portable way to produce a libtool script (and not relying 
anymore on the user installing a system wide one).

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] NTL v10

2016-10-10 Thread Victor Shoup
One more question, relating to $(MAKE). There are a number of scripts besides 
the makefile that also invoke make. Should these also be modified? But then the 
mechanism would have to be different (environment variable?). Before I can sort 
that out, I would like to know what is the goal here? Is system make really not 
used in some environments? Or is there some magic in $(MAKE) within a makefile 
that is being used? If the latter, then I can probably just keep the other 
invocations of make are OK as is.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] NTL v10

2016-10-10 Thread Victor Shoup
Let me get this straight...
You say that the tarball does not contain a libtool script, but rather, 
contains a directory that contains files that will build a libtool script at 
compile time. Is that right?

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] NTL v10

2016-10-10 Thread John Cremona
On 10 October 2016 at 14:46, Victor Shoup  wrote:
> Ok, thanks. I will try to get this done this week. Your explanation was very 
> helpful. Hopefully, I can piece together a solution based on the scripts you 
> pointed to in your previous reply.
>
> I admit, I've been quite a dinosaur when it comes to autotools stuff...when I 
> started, none of this really existed, and at any particular point in time, it 
> seemed easier to "roll my own" scripts than to figure out autotools. In the 
> short term, I will probably not change too much, but I agree that this 
> libtool issue really needs to be fixed.
>

Note from another dinosaur: I have my own notes to help me install
pari, mpir, mpfr, flint and ntl on a new machine, propr to being able
to work on eclib.  And in the NTL section (only!) there's a line
(You may need to now do "sudo apt install libtool-bin")

John
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] NTL v10

2016-10-10 Thread Victor Shoup
Ok, thanks. I will try to get this done this week. Your explanation was very 
helpful. Hopefully, I can piece together a solution based on the scripts you 
pointed to in your previous reply.

I admit, I've been quite a dinosaur when it comes to autotools stuff...when I 
started, none of this really existed, and at any particular point in time, it 
seemed easier to "roll my own" scripts than to figure out autotools. In the 
short term, I will probably not change too much, but I agree that this libtool 
issue really needs to be fixed.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] NTL v10

2016-10-10 Thread Jean-Pierre Flori


On Monday, October 10, 2016 at 2:58:38 PM UTC+2, Victor Shoup wrote:
>
> Ok, I will start working on these issues.  The one I understand the least 
> is libtool.
> It looks like you are saying I should generate a libtool script on the 
> machine X on which
> I create the NTL tarball. But this seems very strange. How could that 
> script be any better
> than one generated/installed on the machine Y where the build is taking 
> place?
> Wouldn't it be better to generate libtool on Y?
>
> And why isn't there a libtool command on Y in the first place?
> I mean, if you assume the whole autoconf toolchain, why not assume libtool?
>
That's the point: you should not assume any part of the autotools chain 
present, that's not needed nor the way it is supposed to be used.
Autotools is a great way to autogenerate boring stuff as conifgure scripts 
and Makefiles.
So it is meant to be run on the developer machine and what it generates 
(typically: configure script from configure.ac, Makefile.in form 
Makefile.am, some m4 macro stuff, and a ltmain.sh script which will be used 
to generate the libtool script!) is supposed to be portable enough, shipped 
with the distributed tarball, and should run with no issues on the machine 
where NTL actually gets compiled.

For example, have a look at the gmp "devel" source tree:
https://gmplib.org/repo/gmp/file/tip
There is only (among related stuff) a configure.ac file at the top level 
and Makefile.am files in subdirectories.

But in the "distributed" source tarball where "autoreconf -fiv" or 
equivalent stuff has been run also includes configure, ltmain.sh and so on.

To come back to NTL, you only used the libtool script, you don't need all 
the autotools machinery, but you currently assume that this script is 
available system wide, which is not that common.

So what we do in Sage is the following at distribution time:
* create a fake autotools project (mostly a quite empty configure.ac file)
* run autoreconf on it which produces mainly a configure script, an 
ltmain.sh script and a few other things.
* include its output along with your source in a separate libtool directory

At compilation time:
* we go into this libtool directory and run the configure script which uses 
ltmain.sh and makes a libtool script
* we go back to ntl directory and run make passing the generated libtool 
script to it (through LIBTOOL envvar).

It looks a little bit overkill but that's the way autotools stuff works...
Note that the configure script generated here does almost nothing, mostly 
only creating the libtool script on the compilation machine!
And that's the only thing we need to build ntl.

Or, is it that maybe there are parts of the toolchain that are X but not Y?
>
> Sorry...I'm not much of an expert on libtool or autoconf.
>
 

> Another issue. I'm not sure if $(MAKE) is specific to gnu make or if it is 
> universal.
> In general, I don't want to assume gnu. But I can certainly make this the 
> default,
> and provide a config variable to override.
>
I cannot answer on the top of my head, so it might be broken with some 
strange make versions :) 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] NTL v10

2016-10-10 Thread Victor Shoup
Ok, I will start working on these issues.  The one I understand the least is 
libtool.
It looks like you are saying I should generate a libtool script on the machine 
X on which
I create the NTL tarball. But this seems very strange. How could that script be 
any better
than one generated/installed on the machine Y where the build is taking place?
Wouldn't it be better to generate libtool on Y?

And why isn't there a libtool command on Y in the first place?
I mean, if you assume the whole autoconf toolchain, why not assume libtool?
Or, is it that maybe there are parts of the toolchain that are X but not Y?

Sorry...I'm not much of an expert on libtool or autoconf.

Another issue. I'm not sure if $(MAKE) is specific to gnu make or if it is 
universal.
In general, I don't want to assume gnu. But I can certainly make this the 
default,
and provide a config variable to override.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] NTL v10

2016-10-10 Thread Jean-Pierre Flori
Thanks for the hint, we are already a few versions behind.

I've opened #21676 for us to update, if anyone wants to review it:
* https://trac.sagemath.org/ticket/21676#ticket

By the way we are still shipping a few patches, have a look at:
* https://github.com/sagemath/sage/blob/master/build/pkgs/ntl/patches/

I'd say the most annoying one is:
* 
https://github.com/sagemath/sage/blob/master/build/pkgs/ntl/patches/configure.ac
We're just making an empty autotool project, running autoreconf, and 
repackaging your tarball so that it provides its own version of libtool.
(All of this is done by this script:
* https://github.com/sagemath/sage/blob/master/build/pkgs/ntl/spkg-src
)
Indeed some systems do not provide any "default" libtool script.

And surely the following one is about using $MAKE rather than make in your 
makefile:
* 
https://github.com/sagemath/sage/blob/master/build/pkgs/ntl/patches/make.patch
Its purpose is quite obvious :)

And finally, giving the ability to pass flags to libtool:
* 
https://github.com/sagemath/sage/blob/master/build/pkgs/ntl/patches/libtool_flag.patch
This is useful when building on cygwin/mingw where libtool wants an 
-no-undefined flag to even try to build a shared lib (without it it does 
not even try).

Best,
JPF

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] NTL v10

2016-10-08 Thread Victor Shoup
Haha, yes, that was one reason to do it.

On Saturday, October 8, 2016 at 4:27:01 PM UTC-4, François wrote:
>
>
> > On 9/10/2016, at 09:21, Victor Shoup  
> wrote: 
> > 
> > • I've renamed all the ".c" files to ".cpp" files in the Unix 
> distribution. This seems to be more in line with common practice, and 
> should make it easier to work with compilers and other software development 
> tools. 
> > 
>
> I have been doing some clang/clang++ build recently and clang++ complains 
> about compiling .c files (but does it anyway). So that should get rid of 
> some warnings. 
>
> François

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] NTL v10

2016-10-08 Thread Francois Bissey

> On 9/10/2016, at 09:21, Victor Shoup  wrote:
> 
>   • I've renamed all the ".c" files to ".cpp" files in the Unix 
> distribution. This seems to be more in line with common practice, and should 
> make it easier to work with compilers and other software development tools.
> 

I have been doing some clang/clang++ build recently and clang++ complains
about compiling .c files (but does it anyway). So that should get rid of
some warnings.

François

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.