This occurs on Ubuntu 18.04 TLS with Spack develop branch.
I believe this line:
https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/llvm/package.py#L593-595
causes an unintentional conflict with GCC@8: and llvm@flang-20180921. Error message is show below.
The easiest way to fix this is to have flang appear as a suffix instead of a prefix. Then you would have:
>>> Version("20180921-flang") < Version(5)
False
The other possibility is to have flang for LLVM be a variant instead of a version number.
(base) [naromero@naromero-desktop ~]$ spack spec flang
Input spec
--------------------------------
flang
Concretized
--------------------------------
==> Error: Conflicts in concretized spec "flang@20180921%gcc@8.3.0 build_type=RelWithDebInfo arch=linux-ubuntu18.04-westmere/ddlkqug"
List of matching conflicts for spec:
llvm@flang-20180921%gcc@8.3.0~all_targets build_type=Release +clang+compiler-rt+gold+internal_unwind+libcxx~link_dylib+lld+lldb~omp_tsan+polly~python~shared_libs arch=linux-ubuntu18.04-westmere
^binutils@2.32%gcc@8.3.0+gold~headers~libiberty+nls~plugins arch=linux-ubuntu18.04-westmere
^gettext@0.19.8.1%gcc@8.3.0+bzip2+curses+git~libunistring+libxml2 patches=9acdb4e73f67c241b5ef32505c9ddf7cf6884ca8ea661692f21dca28483b04b8 +tar+xz arch=linux-ubuntu18.04-westmere
^bzip2@1.0.8%gcc@8.3.0+shared arch=linux-ubuntu18.04-westmere
^diffutils@3.7%gcc@8.3.0 arch=linux-ubuntu18.04-westmere
^libiconv@1.15%gcc@8.3.0 arch=linux-ubuntu18.04-westmere
^libxml2@2.9.9%gcc@8.3.0~python arch=linux-ubuntu18.04-westmere
^pkgconf@1.6.1%gcc@8.3.0 arch=linux-ubuntu18.04-westmere
^xz@5.2.4%gcc@8.3.0 arch=linux-ubuntu18.04-westmere
^zlib@1.2.11%gcc@8.3.0+optimize+pic+shared arch=linux-ubuntu18.04-westmere
^ncurses@6.1%gcc@8.3.0~symlinks~termlib arch=linux-ubuntu18.04-westmere
^tar@1.31%gcc@8.3.0 arch=linux-ubuntu18.04-westmere
^cmake@3.15.3%gcc@8.3.0~doc+ncurses+openssl+ownlibs~qt arch=linux-ubuntu18.04-westmere
^openssl@1.1.1c%gcc@8.3.0+systemcerts arch=linux-ubuntu18.04-westmere
^perl@5.26.2%gcc@8.3.0+cpanm patches=0eac10ed90aeb0459ad8851f88081d439a4e41978e586ec743069e8b059370ac +shared+threads arch=linux-ubuntu18.04-westmere
^gdbm@1.18.1%gcc@8.3.0 arch=linux-ubuntu18.04-westmere
^readline@7.0%gcc@8.3.0 arch=linux-ubuntu18.04-westmere
^gmp@6.1.2%gcc@8.3.0 arch=linux-ubuntu18.04-westmere
^autoconf@2.69%gcc@8.3.0 arch=linux-ubuntu18.04-westmere
^m4@1.4.18%gcc@8.3.0 patches=3877ab548f88597ab2327a2230ee048d2d07ace1062efe81fc92e91b7f39cd00,fc9b61654a3ba1a8d6cd78ce087e7c96366c290bc8d2c299f09828d793b853c8 +sigsegv arch=linux-ubuntu18.04-westmere
^libsigsegv@2.11%gcc@8.3.0 arch=linux-ubuntu18.04-westmere
^automake@1.16.1%gcc@8.3.0 arch=linux-ubuntu18.04-westmere
^libtool@2.4.6%gcc@8.3.0 arch=linux-ubuntu18.04-westmere
^isl@0.19%gcc@8.3.0 arch=linux-ubuntu18.04-westmere
^libedit@3.1-20170329%gcc@8.3.0 arch=linux-ubuntu18.04-westmere
^perl-data-dumper@2.173%gcc@8.3.0 arch=linux-ubuntu18.04-westmere
^python@2.7.16%gcc@8.3.0+bz2+ctypes+dbm+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tix~tkinter~ucs4~uuid+zlib arch=linux-ubuntu18.04-westmere
^expat@2.2.5%gcc@8.3.0+libbsd arch=linux-ubuntu18.04-westmere
^libbsd@0.9.1%gcc@8.3.0 arch=linux-ubuntu18.04-westmere
^libffi@3.2.1%gcc@8.3.0 arch=linux-ubuntu18.04-westmere
^sqlite@3.29.0%gcc@8.3.0~column_metadata+fts~functions~rtree arch=linux-ubuntu18.04-westmere
^swig@4.0.0%gcc@8.3.0 arch=linux-ubuntu18.04-westmere
^pcre@8.42%gcc@8.3.0~jit+multibyte+utf arch=linux-ubuntu18.04-westmere
1. "%gcc@8:" conflicts with "llvm@:5"
This occurs on Ubuntu 18.04 TLS with Spack develop branch.
I believe this line:
https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/llvm/package.py#L593-595
causes an unintentional conflict with GCC@8: and llvm@flang-20180921. Error message is show below.
The easiest way to fix this is to have
flangappear as a suffix instead of a prefix. Then you would have:The other possibility is to have flang for LLVM be a variant instead of a version number.