make gmp conditionally (build) depends on curl#902
make gmp conditionally (build) depends on curl#902luigi-calori wants to merge 2 commits intospack:developfrom
Conversation
|
@luigi-calori: we've seen the same thing at LLNL. I don't know why I like this PR but can you make it more general? Ultimately, this is what MacPorts calls a "fetch dependency" but I don't think you need to go that far. It seems like this would be of use to more than just GMP, so you could put the logic here into |
|
On my laptop (OS X), the system curl can download packages just fine, but the Spack-installed has problems. I think it doesn't find the system certificates, or has a similar problem. I don't understand the error: Just pointing out that using a Spack curl doesn't seem to help in all cases... |
|
Tried to follow your suggestion. Now in gmp there is just the conditional dependency on curl. nevertheless note that the message is incorrectly: |
|
Perhaps Spack could use wget if it is installed, else curl. The system curl is unable to download gmp, but wget works just fine. |
|
I've encountered both these problems; the curl/gmp problem happens first thing, when you try to install GCC. Here is how I solved them. I don't recommend modifying packages. Curl Won't Fetch from https://The problem here is an ancient openssl on your system that won't talk to modern https:// servers, for security reason. I don't know why wget worked for @adamjstewart but not curl, assuming they both use the same underlying OpenSSL (try The solution is to use Spack to bootstrap a new curl (making sure you build your own OpenSSL in the process). Once installed, you should put the appropriate "spack load" commands in your .bashrc (or better yet, the appropriate "module load" commands; see PR #721). Install GitOlder system-supplied versions of git do not provide features that are Once Git is installed, make it available to Bash via:: Install CurlOlder system-supplied versions of Updated BinutilsOn Ubuntu 12.04, an updated Certificate Problems with CurlWhen you install your own curl, it doesn't really know where the system certificates are stored, and ends up having problems. I don't know where they are stored either; I suppose the right way is to set up the correct env vars / config files to give this info to curl. The quick-and-dirty way is to use the To use |
|
@citibeth Thanks for the hints. |
|
Sorry ... wrong button pressed... |
|
I think this was mentioned at the last meeting, but building on #378 to add the idea of |
|
Ok, I agree that having a fetch dependency would be probably the best approach but it seem to me a long shot, as #378 itself is not merged yet. |
|
I'm not keen on the idea of a fetch dependency. What's the purpose, every Why not take a simpler approach: start by explicitly listing (in English) -- Elizabeth On Wed, Jun 15, 2016 at 9:50 AM, Luigi Calori notifications@github.com
|
|
@citibeth makes a good point. I'm currently dealing with the problem that on our older cluster (CentOS 5), the system cURL is too old to fetch many packages. If I try to build it with Spack, the system cURL is actually too old to fetch a newer cURL! The only solution is to use yum to install a newer cURL. I'm still thinking about how this should apply for CMake though. Some packages I've seen actually depend on a very new version of CMake, which isn't likely to be found on the system. It would be nice if we could specify which version of CMake is required. |
If yum doesn't work out, I would go with option (1), I think it's the
Same thing for autotools: things that depend on autotools (i.e. the -- Elizabeth |
|
@citibeth: solution 4: we're actually decommissioning this cluster soon and moving everything else to CentOS 7, so I've decided to ignore it for now. But the argument remains the same, since CentOS 7 will someday also be old. Anyway, I struggle to see a fundamental difference between requiring a specific version of git/curl/wget and a specific version of cmake/autotools. Also, if a package install method calls |
|
I do not want to rise a flame, I did this as it seemed to me worthwhile that if there is a package that spack provide ( like curl or cmake ) that is needed, either at build or even at fetch time, other packages could use it by specifying a dependency. |
Fixed in bb968fc (had been part of build deps, but Todd fixed it separately). |
|
My Spack always uses the Cmake it builds. Maybe I hacked it to do so, I -- Elizabeth On Wed, Jun 15, 2016 at 11:12 AM, Ben Boeckel notifications@github.com
|
|
As I' m a newbie, I just tried to make curl similar to cmake: if I need a spack built cmake in a package, I depends on cmake, if I need a spack built curl, I depends on curl. If that is the case, here we make curl behaves like other tools, but maybe I' m missing some essential bit. |
|
you can use system provided cmake and culr, but you should declare dependencies in package anyway and then configure you spack to use system provided one. |
|
The weird thing about something like |
|
What I would like to obtain with this PR is to use spack build curl for fetching instead of system curl if you depend on it during an install that has curl as a dependency. |
|
While such a feature might make sense, this is probably not the way to signal it. For example, |
|
Spack should use whatever curl you put in your path. On Wed, Jun 15, 2016 at 12:04 PM, Luigi Calori notifications@github.com
|
|
@mathstuf : Are there any reasons why a package that "truly" depends on curl like git should not use the spack built curl executable but should instead use the one from the original environment when the command spack install git was issued? @citibeth Anyway, let me know weather close it or keep it open. |
The system curl could know about special certificates required to fetch the data (e.g., the DoD has their own cert bundle that the system curl might know about, but Spack's would not). Spack's curl could also be too old to fetch (and the system has the newer version).
If |
|
I can't imagine a world in which Spack's cURL would be older than the system cURL. |
|
Older isn't necessarily the problem; "knows about the DoD certs to fetch DoD package sources" is. And people do run bleeding edge distros (personally, I run Fedora Rawhide at home which, e.g., already has 2.9.0). |
|
The DoD certs reasoning is pretty solid. I can't really argue with that. @luigi-calori I think you'll just have to rely on the system cURL for this one. If it isn't new enough like mine was, you'll have to update it manually, either with yum/apt-get or with a Spack installed cURL in your PATH. |
|
@luigi-calori I think my proposal of |
1b8734e to
5da310d
Compare
…ages that depends on curl, needed for gmp
5da310d to
cafa050
Compare
|
Closing this PR. Almost every package in Spack downloads with curl, and we certainly aren't going to add an optional curl dependency to every package. A more general solution would be to implement some kind of fetching dependency that is automated (i.e. doesn't involve modifying any package.py files). Until then, there is a perfectly valid workaround of installing a newer version of curl with yum/apt-get or Spack and making sure it is first in your PATH. If you have problems with finding CA certificates, you may need to configure curl properly. In truth, curl is a dependency of Spack, not of gmp. |
|
Getting a working curl is discussed in the updated docs.
|
Co-authored-by: Blanco Alonso Jorge <jblanco@bbpv2.epfl.ch>
On some sites (mine) system curl fail to download from gmp url while spack - built succeed, see issue #895