This error has been reported by @bvanessen When using the ASP-based solver, sometimes, Spack prefers to build a new version of a package over using a declared external that match the requirements if buildable: true.
Steps to reproduce the issue
Using the following packages.yaml:
packages:
python:
externals:
- spec: python@3.7.2+bz2+ctypes+dbm+lzma+nis+pyexpat+readline+sqlite3+ssl+tix+tkinter+uuid+zlib
prefix: /usr/tce
and trying to concretize with Spack, one obtains:
$ spack -C . solve python
==> Best of 0 answers.
==> Optimization: [0, 0, 0, 0, 30, 0, 1, 0, 0, -20, 0]
python@3.8.8%gcc@10.1.0+bz2+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tix~tkinter~ucs4+uuid+zlib patches=0d98e93189bc278fbc37a50ed7f183bd8aaf249a8e1670a465f0db6bb4f8cf87 arch=linux-ubuntu18.04-broadwell
^bzip2@1.0.8%gcc@10.1.0+shared arch=linux-ubuntu18.04-broadwell
^diffutils@3.7%gcc@10.1.0 arch=linux-ubuntu18.04-broadwell
^libiconv@1.16%gcc@10.1.0 arch=linux-ubuntu18.04-broadwell
^expat@2.2.10%gcc@10.1.0+libbsd arch=linux-ubuntu18.04-broadwell
^libbsd@0.10.0%gcc@10.1.0 arch=linux-ubuntu18.04-broadwell
^gdbm@1.19%gcc@10.1.0 arch=linux-ubuntu18.04-broadwell
^readline@8.0%gcc@10.1.0 arch=linux-ubuntu18.04-broadwell
^ncurses@6.2%gcc@10.1.0~symlinks+termlib arch=linux-ubuntu18.04-broadwell
^pkgconf@1.7.3%gcc@10.1.0 arch=linux-ubuntu18.04-broadwell
^gettext@0.21%gcc@10.1.0+bzip2+curses+git~libunistring+libxml2+tar+xz arch=linux-ubuntu18.04-broadwell
^libxml2@2.9.10%gcc@10.1.0~python arch=linux-ubuntu18.04-broadwell
^xz@5.2.5%gcc@10.1.0~pic arch=linux-ubuntu18.04-broadwell
^zlib@1.2.11%gcc@10.1.0+optimize+pic+shared arch=linux-ubuntu18.04-broadwell
^tar@1.32%gcc@10.1.0 arch=linux-ubuntu18.04-broadwell
^libffi@3.3%gcc@10.1.0 patches=26f26c6f29a7ce9bf370ad3ab2610f99365b4bdd7b82e7c31df41a3370d685c0 arch=linux-ubuntu18.04-broadwell
^openssl@1.1.1k%gcc@10.1.0~docs+systemcerts arch=linux-ubuntu18.04-broadwell
^perl@5.32.1%gcc@10.1.0+cpanm+shared+threads arch=linux-ubuntu18.04-broadwell
^berkeley-db@18.1.40%gcc@10.1.0~docs patches=b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522 arch=linux-ubuntu18.04-broadwell
^sqlite@3.34.0%gcc@10.1.0+column_metadata+fts~functions~rtree arch=linux-ubuntu18.04-broadwell
^util-linux-uuid@2.36%gcc@10.1.0 arch=linux-ubuntu18.04-broadwell
Note that the preferred version weight is 0. For externals it is expected that version weights are negative, so they are preferred during minimization.
Error Message
There's no error message, and the solution is valid - but one would expect instead:
$ spack -C . solve python
==> Best of 0 answers.
==> Optimization: [-1, 3, 0, 0, 0, 0, 1, -1, 0, 0, 0]
python@3.7.2%gcc@10.1.0+bz2+ctypes+dbm~debug+libxml2+lzma+nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl+tix+tkinter~ucs4+uuid+zlib patches=c129e34472ee39b1083c38a49ad06a8573d8b3b208743a120ca4c0818cdf1801 arch=linux-ubuntu18.04-broadwell
Information on your system
- Spack: 0.16.1-1896-0bed64503d
- Python: 3.6.9
- Platform: linux-ubuntu18.04-broadwell
- Concretizer: clingo
Additional information
This error has been reported by @bvanessen When using the ASP-based solver, sometimes, Spack prefers to build a new version of a package over using a declared external that match the requirements if
buildable: true.Steps to reproduce the issue
Using the following
packages.yaml:and trying to concretize with Spack, one obtains:
Note that the preferred version weight is
0. For externals it is expected that version weights are negative, so they are preferred during minimization.Error Message
There's no error message, and the solution is valid - but one would expect instead:
Information on your system
Additional information
spack debug reportand reported the version of Spack/Python/Platform