Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

variant resolution is overly strict #303

Closed
trws opened this issue Jan 5, 2016 · 2 comments · Fixed by #19501
Closed

variant resolution is overly strict #303

trws opened this issue Jan 5, 2016 · 2 comments · Fixed by #19501

Comments

@trws
Copy link
Contributor

trws commented Jan 5, 2016

A depends_on() with no variants specified is concretized as requiring a version built with exactly default variants because of the concretize_variants behavior. I would contend that this is unnecessary, and actually unfortunate. This is the root cause of #267 for example, and requires rebuilds to get a less complete version when variants are used to enable extra features. For example, testing the new llvm rework by adding a dependent rust compiler package, depending on llvm required a rebuild of llvm because the installed version had +gold when the default was -gold.

Why are variants this draconian, rather than accepting any package that matches all specified variants?

@trws
Copy link
Contributor Author

trws commented Jan 5, 2016

At @tgamblin 's behest I've taken a look at generating a unit test reproducer for this, and actually don't seem to have much luck getting it to show up with spec.satisfies(). That said, it shows up pretty much immediately just on the command line, or with a package. I'm fully willing to admit there may be something I'm doing wrong here, but this is what I'm seeing.

jemalloc+stats does not satisfy jemalloc:

scogland at rzalastor2 in ~/spack (llvm-rework●●)
$ spack install jemalloc+prof+stats
==> Installing jemalloc
==> Trying to fetch from https://github.com/jemalloc/jemalloc/releases/download/4.0.4/jemalloc-4.0.4.tar.bz2
######################################################################## 100.0%
==> Staging archive: /g/g12/scogland/spack/var/spack/stage/jemalloc-4.0.4-de2oo4f3slt2swusob4jkmolrxjupu4e/jemalloc-4.0.4.tar.bz2
==> Created stage in /g/g12/scogland/spack/var/spack/stage/jemalloc-4.0.4-de2oo4f3slt2swusob4jkmolrxjupu4e.
==> No patches needed for jemalloc.
==> Building jemalloc.
==> Successfully installed jemalloc.
  Fetch: 1.66s.  Build: 11.52s.  Total: 13.17s.
[+] /g/g12/scogland/spack/opt/spack/chaos_5_x86_64_ib/gcc-5.3.0/jemalloc-4.0.4-de2oo4f3slt2swusob4jkmolrxjupu4e

scogland at rzalastor2 in ~/spack (llvm-rework●●)
$ spack install jemalloc+prof
==> Installing jemalloc
==> Trying to fetch from https://github.com/jemalloc/jemalloc/releases/download/4.0.4/jemalloc-4.0.4.tar.bz2
######################################################################## 100.0%
==> Staging archive: /g/g12/scogland/spack/var/spack/stage/jemalloc-4.0.4-wl6eoh44fmlwt4himweeu23jjmxn7kap/jemalloc-4.0.4.tar.bz2
==> Created stage in /g/g12/scogland/spack/var/spack/stage/jemalloc-4.0.4-wl6eoh44fmlwt4himweeu23jjmxn7kap.
==> No patches needed for jemalloc.
==> Building jemalloc.
==> Successfully installed jemalloc.
  Fetch: 1.48s.  Build: 11.96s.  Total: 13.44s.
[+] /g/g12/scogland/spack/opt/spack/chaos_5_x86_64_ib/gcc-5.3.0/jemalloc-4.0.4-wl6eoh44fmlwt4himweeu23jjmxn7kap

A prototype rust package, which contains the line depends_on('jemalloc') after the above shows this behavior:

scogland at rzalastor2 in ~/spack (llvm-rework●●)
$ spack find jemalloc
==> 2 installed packages.
-- chaos_5_x86_64_ib / gcc@5.3.0 --------------------------------
jemalloc@4.0.4+prof~stats  jemalloc@4.0.4+prof+stats

scogland at rzalastor2 in ~/spack (llvm-rework●●)
$ spack install rust
==> Installing rust
==> python is already installed in /g/g12/scogland/spack/opt/spack/chaos_5_x86_64_ib/gcc-5.3.0/python-2.7.11-47mkfjgywa5yj5koqrwubjz3lxack7fh.
==> Installing jemalloc
==> Already downloaded /g/g12/scogland/spack/var/spack/stage/jemalloc-4.0.4-hiuikzewyiudf6c74jxvdiynfehgs3dn/jemalloc-4.0.4.tar.bz2.
==> Already staged jemalloc in /g/g12/scogland/spack/var/spack/stage/jemalloc-4.0.4-hiuikzewyiudf6c74jxvdiynfehgs3dn.
==> No patches needed for jemalloc.
==> Building jemalloc.

Neither jemalloc is found and used where "jemalloc" without any variants was specified. This does not seem to conform to the model I think is intended by default.

@mathstuf
Copy link
Contributor

See #839 for an outline of an algorithm to implement this.

sethrj added a commit to sethrj/spack that referenced this issue Nov 14, 2019
```
In file included from /tmp/s3j/spack-stage/spack-stage-bison-3.4.2-
uzjszv4owvqsymjpxtxvvegfavc6k5my/spack-src/lib/quotearg.c(33):
/tmp/s3j/spack-stage/spack-stage-bison-3.4.2-uzjszv4owvqsymjpxtxvvegfavc6k5my/spack-src/lib/
xalloc.h(51): warning spack#303: explicit type is missing ("int" assumed)
  extern _Noreturn void xalloc_die (void);
```
sethrj added a commit to sethrj/spack that referenced this issue Nov 14, 2019
```
In file included from /tmp/s3j/spack-stage/spack-stage-bison-3.4.2-
uzjszv4owvqsymjpxtxvvegfavc6k5my/spack-src/lib/quotearg.c(33):
/tmp/s3j/spack-stage/spack-stage-bison-3.4.2-uzjszv4owvqsymjpxtxvvegfavc6k5my/spack-src/lib/
xalloc.h(51): warning spack#303: explicit type is missing ("int" assumed)
  extern _Noreturn void xalloc_die (void);
```
sethrj added a commit to sethrj/spack that referenced this issue Nov 14, 2019
```
In file included from /tmp/s3j/spack-stage/spack-stage-bison-3.4.2-
uzjszv4owvqsymjpxtxvvegfavc6k5my/spack-src/lib/quotearg.c(33):
/tmp/s3j/spack-stage/spack-stage-bison-3.4.2-uzjszv4owvqsymjpxtxvvegfavc6k5my/spack-src/lib/
xalloc.h(51): warning spack#303: explicit type is missing ("int" assumed)
  extern _Noreturn void xalloc_die (void);
```
sethrj added a commit to sethrj/spack that referenced this issue Nov 14, 2019
Installing `bison@3.4.2%intel@14.0.4`:
```
In file included from /tmp/s3j/spack-stage/spack-stage-bison-3.4.2-
uzjszv4owvqsymjpxtxvvegfavc6k5my/spack-src/lib/quotearg.c(33):
/tmp/s3j/spack-stage/spack-stage-bison-3.4.2-uzjszv4owvqsymjpxtxvvegfavc6k5my/spack-src/lib/
xalloc.h(51): warning spack#303: explicit type is missing ("int" assumed)
  extern _Noreturn void xalloc_die (void);
```
adamjstewart pushed a commit that referenced this issue Nov 14, 2019
* Mark compiler/version conflict for CMake

Intel 14 lacks some C++11 features needed to compile new versions of
cmake.
```
/tmp/s3j/spack-stage/spack-stage-cmake-3.15.5-46lgp4ybhopy2p4rr66rxnew5iaddvmg/spack-src/Source/
cm_static_string_view.hxx(28): error: expected an operator
   friend static_string_view operator"" _s(const char* data, size_t
                                     ^
```

* Mark compiler/version conflict for icu4c

With Intel 14.0.4 on Linux for icu4c 60.1 and higher:
```
locid.cpp(1156): error #1140: a using-declaration may not name a constructor or destructor
        using KeywordEnumeration::KeywordEnumeration;
```

* Mark compiler/version conflict for nasm

Error installing `nasm@2.14.02%intel@14.0.4`:
```
In file included from nasmlib/crc64.c(35):
./include/nasmlib.h(116): error: expected a ";"
  fatal_func nasm_assert_failed(const char *, int, const char *);
```

* Mark compiler/version conflict for bison

Installing `bison@3.4.2%intel@14.0.4`:
```
In file included from /tmp/s3j/spack-stage/spack-stage-bison-3.4.2-
uzjszv4owvqsymjpxtxvvegfavc6k5my/spack-src/lib/quotearg.c(33):
/tmp/s3j/spack-stage/spack-stage-bison-3.4.2-uzjszv4owvqsymjpxtxvvegfavc6k5my/spack-src/lib/
xalloc.h(51): warning #303: explicit type is missing ("int" assumed)
  extern _Noreturn void xalloc_die (void);
```

* Mark compiler/version conflict for icu4c

With `icu4c@60.1%intel@16.0.4` and `icu4c@64.1%intel@16.0.4`:

```
In file included from ucurr.cpp(26):
static_unicode_sets.h(130): error #913: invalid multibyte character sequence
      {POUND_SIGN, u'£'},
                     ^
```

* Change conflict comments into messages
matz-e pushed a commit to matz-e/spack that referenced this issue Apr 27, 2020
climbfuji added a commit to climbfuji/spack that referenced this issue Aug 18, 2023
…pstream

Minor bug fixes for new '--upstream' option of 'spack stack create env' extension
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@mathstuf @trws @adamjstewart and others