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.

Reply via email to