Bonus question for the build system experts : can an spkg-install script recursively call $SAGE_ROOT/sage -i <some other package> and get the return status back ? A simple solution would then be to test for the existence of the relevant binaries/executables in the R spkg-install script, and recursively install the (optional) relevant packages before proceeding to install R.
Bonus question for the build system experts : can an spkg-install script recursively call $SAGE_ROOT/sage -i <some other package> and get the return status back ? A simple solution would then be to test for the existence of the relevant binaries/executables in the R spkg-install script, and recursively install the (optional) relevant packages before proceeding to install R.
What do you think ?
Okay. I I have followed you correctly, we have two (mutually incompatible) options :The first option is extremely simple and failsafe. The cost is about 15 MB (sum of all installed files in a temporary "prefix" directory, without shaving anything) and about 3 minutes of compilation time (no parallelism used). We might shave 4,9 MB of docs (local/share/(doc|man). Binaries are about 0.9MB. The total potential cots (sum of sizes of the three build directories) is 89 MB (= potential cost if the three build directories ate kept after building i. e. for debugging purposes).
- (Dima's option) : package curl, pcre and xz as standard packages, and make R depend on them (unconditionnally).
- (Jean-Pierre option) : add tjem to Sage's core, but build them if and only if they are not installed systemwide (= useable at Sage's compile time) ; do this before trying to build R.
On Monday, October 24, 2016 at 9:45:18 PM UTC, Emmanuel Charpentier wrote:Okay. I I have followed you correctly, we have two (mutually incompatible) options :The first option is extremely simple and failsafe. The cost is about 15 MB (sum of all installed files in a temporary "prefix" directory, without shaving anything) and about 3 minutes of compilation time (no parallelism used). We might shave 4,9 MB of docs (local/share/(doc|man). Binaries are about 0.9MB. The total potential cots (sum of sizes of the three build directories) is 89 MB (= potential cost if the three build directories ate kept after building i. e. for debugging purposes).
- (Dima's option) : package curl, pcre and xz as standard packages, and make R depend on them (unconditionnally).
- (Jean-Pierre option) : add tjem to Sage's core, but build them if and only if they are not installed systemwide (= useable at Sage's compile time) ; do this before trying to build R.
I don't really follow you: note that gcc is also a standard package, but it only really gets installed if the system gcc isnot good enough. That is to say, if curl, pcre, and xz are available system-wide, Sage should not try to install them,no megabytes used...
The second one requires hacking the main Sage configuration. I do not feel currently quite at ease with this one, but I'm just reading the relevant docs. I have no idea of the potential costs, save for what can be deduced from the costs of Dima's options.
The first option is compatible with the "batteries included" philosophy flaunted by Sage. are the potential 10-15 MB savings worth of hacking the main Sage config file ?
I have no opinion on whether this approach is on the whole a good idea, but I will point out that "which curl" is not as portable as "command -v curl". We had an issue a while ago with "which" not behaving properly on some platform -- maybe on Solaris "which blah" had a return status of 0 even if "blah" was not present? I forget.
Anyway, if nothing else, try "command -v ..." instead of "which ...".
(And would it be even better to try to run curl to make sure it functions properly, instead of just seeing if it's present?)
One issue with curl is that you sooner or later will need the root certificates to use it, namely when you start downloading from a https site. E.g. in hashstack I recently added the root certs:This issue already faces us with openssl but since we actually don't use it much we could avoid it so far. But when replacing curl in the PATH we are going to run into that issue.
I would be happy with adding curl (and up-to-date root certificates) to the list of system requirements for building Sage and avoid that can of worms.
PS: and no, you can't use the OS-provided certs, since Apple had to cook their own sauce once more.
Le mercredi 26 octobre 2016 09:18:06 UTC+2, Jeroen Demeyer a écrit :On 2016-10-25 23:52, Emmanuel Charpentier wrote:
> This is now Trac#21767 <https://trac.sagemath.org/ticket/21767>. The
> unconditional installation works okay on top of 7.5beta0.
>
> The conditional installation can probably be obtained with this bash
> snippet, at the top of spkg-install :
Unless there is a good reason to do otherwise, such checks are better
done in the top-level configure instead.
I'm not so sure : harder to do, harder to understand, not obvious at reading the spkg-install script. But cleaner, indeed.
This issue is *distinct* from the one I'm trying to solve (iL e. satisfy R's prerequisites). Should't you open a relevant ticket ?
"libcurl >= 7.28.0 library and headers are required with support for https"
Le mercredi 26 octobre 2016 00:42:01 UTC+2, John H Palmieri a écrit :I have no opinion on whether this approach is on the whole a good idea, but I will point out that "which curl" is not as portable as "command -v curl". We had an issue a while ago with "which" not behaving properly on some platform -- maybe on Solaris "which blah" had a return status of 0 even if "blah" was not present? I forget.
Note that we don't use the return status, but the path expansion. I've no idea about the portability of both ; I note that which is a standard binary, whereas command is internal to bash. Pick your portability poison...