-
Notifications
You must be signed in to change notification settings - Fork 2.4k
spack setup does not work for packages without a url field #15575
Description
Spack version
$ spack --version
0.14.0-279-7a1fc75Steps to reproduce the issue
$ EXPORT SPACK_DEPENDENCIES=""
$ spack setup xdmf3@localThe first line is needed to work around another issue (#10715), which is unrelated. xdmf3 is an arbitrary choice of package -- any CMakePackage that does not specify a url (but a git repo) will show the problem.
Error Message
==> Warning: Missing a source id for xdmf3@local
==> Warning: Missing a source id for [email protected]
==> Error: Can't extrapolate a URL for version local because package xdmf3 defines no URLs
What I think happens is that Spack is trying to find a tarball for the version local, but doesn't know where to look. If the package.py specifies a url, it'll look for an appropriately named tarball there, but proceeds anyway if it cannot find one, which is expected behavior (I believe). However, if there is no url to try, it fails as seen above.
The problem can be worked around by adding a fake url to the package.py. It only affects spack setup -- spack install works fine (because there one uses a valid version).
Information on your system
Summit or Ubuntu 18.04