-
Notifications
You must be signed in to change notification settings - Fork 2.4k
AssertionError is seen if user update compiler.yaml file with compiler flags section and then pass 'c' and 'cxx' flags to spack install command. #27736
Copy link
Copy link
Closed
Labels
AMDbugSomething isn't workingSomething isn't workingbuild-environmentcompilerstriageThe issue needs to be prioritizedThe issue needs to be prioritized
Description
Steps to reproduce
$spack config edit compilers
update cflags, cxxflags and fflags with any flag value say '-O3 -fPIC'
--snip--
- compiler:
spec: [email protected]
paths:
cc: /home/amd/spack/opt/spack/linux-ubuntu20.04-zen2/gcc-9.3.0/gcc-11.2.0-36ugcqpr5laqaukcht5ldyi6eh4e4ddu/bin/gcc
cxx: /home/amd/spack/opt/spack/linux-ubuntu20.04-zen2/gcc-9.3.0/gcc-11.2.0-36ugcqpr5laqaukcht5ldyi6eh4e4ddu/bin/g++
f77: /home/amd/spack/opt/spack/linux-ubuntu20.04-zen2/gcc-9.3.0/gcc-11.2.0-36ugcqpr5laqaukcht5ldyi6eh4e4ddu/bin/gfortran
fc: /home/amd/spack/opt/spack/linux-ubuntu20.04-zen2/gcc-9.3.0/gcc-11.2.0-36ugcqpr5laqaukcht5ldyi6eh4e4ddu/bin/gfortran
flags:
cflags: -O3 -fPIC
cxxflags: -O3 -fPIC
fflags: -O3 -fPIC
operating_system: ubuntu20.04
target: x86_64
modules: []
environment: {}
extra_rpaths: []
--snip--
Pass 'c' and 'cxx' flags to spack install command for any spack product
say:
spack install sqlite cflags="-w" cxxflags="-w" fflags="-w"
Error message
$ spack --debug --stacktrace install sqlite cflags="-w" cxxflags="-w" fflags="-w"
lib/spack/spack/cmd/__init__.py:123 ==> [2021-12-01-11:36:05.147719] Imported install from built-in commands
lib/spack/spack/config.py:1007 ==> [2021-12-01-11:36:05.149329] Reading config file /home/amd/spack/etc/spack/defaults/config.yaml
lib/spack/spack/cmd/__init__.py:123 ==> [2021-12-01-11:36:05.162727] Imported install from built-in commands
lib/spack/spack/config.py:1007 ==> [2021-12-01-11:36:05.171718] Reading config file /home/amd/spack/etc/spack/defaults/bootstrap.yaml
lib/spack/spack/config.py:1007 ==> [2021-12-01-11:36:05.177781] Reading config file /home/amd/spack/etc/spack/defaults/config.yaml
lib/spack/spack/database.py:373 ==> [2021-12-01-11:36:05.190519] DATABASE LOCK TIMEOUT: 3s
lib/spack/spack/database.py:377 ==> [2021-12-01-11:36:05.190631] PACKAGE LOCK TIMEOUT: No timeout
lib/spack/spack/config.py:1007 ==> [2021-12-01-11:36:05.190958] Reading config file /home/amd/spack/etc/spack/defaults/bootstrap.yaml
lib/spack/spack/database.py:373 ==> [2021-12-01-11:36:05.195618] DATABASE LOCK TIMEOUT: 3s
lib/spack/spack/database.py:377 ==> [2021-12-01-11:36:05.195732] PACKAGE LOCK TIMEOUT: No timeout
lib/spack/spack/bootstrap.py:636 ==> [2021-12-01-11:36:05.195845] [BOOTSTRAP CONFIG SCOPE] name=_builtin
lib/spack/spack/bootstrap.py:652 ==> [2021-12-01-11:36:05.196129] [BOOTSTRAP CONFIG SCOPE] name=defaults, path=/home/amd/spack/etc/spack/defaults
lib/spack/spack/bootstrap.py:653 ==> [2021-12-01-11:36:05.196220] [BOOTSTRAP CONFIG SCOPE] name=defaults/linux, path=/home/amd/spack/etc/spack/defaults/linux
lib/spack/spack/bootstrap.py:652 ==> [2021-12-01-11:36:05.196309] [BOOTSTRAP CONFIG SCOPE] name=bootstrap, path=/home/amd/.spack/bootstrap/config
lib/spack/spack/bootstrap.py:653 ==> [2021-12-01-11:36:05.196391] [BOOTSTRAP CONFIG SCOPE] name=bootstrap/linux, path=/home/amd/.spack/bootstrap/config/linux
lib/spack/spack/config.py:1007 ==> [2021-12-01-11:36:05.196743] Reading config file /home/amd/.spack/bootstrap/config/linux/compilers.yaml
lib/spack/spack/bootstrap.py:763 ==> [2021-12-01-11:36:05.217430] [BOOTSTRAP ROOT SPEC] clingo-bootstrap@spack+python %gcc target=x86_64
lib/spack/spack/bootstrap.py:482 ==> [2021-12-01-11:36:05.217533] [BOOTSTRAP MODULE clingo] Try importing from Python
lib/spack/spack/config.py:1007 ==> [2021-12-01-11:36:05.217741] Reading config file /home/amd/spack/etc/spack/defaults/bootstrap.yaml
lib/spack/spack/config.py:1007 ==> [2021-12-01-11:36:05.292413] Reading config file /home/amd/spack/etc/spack/defaults/config.yaml
lib/spack/spack/bootstrap.py:98 ==> [2021-12-01-11:36:21.105665] [BOOTSTRAP MODULE clingo] The installed spec "clingo-bootstrap@spack+python %gcc target=x86_64 ^[email protected] /kt74l7kjzrlp3cgtj2576o33mhsrgyrw" provides the "clingo" Python module
lib/spack/spack/config.py:1007 ==> [2021-12-01-11:36:21.106005] Reading config file /home/amd/spack/etc/spack/defaults/repos.yaml
lib/spack/spack/config.py:1007 ==> [2021-12-01-11:36:21.134718] Reading config file /home/amd/.spack/linux/compilers.yaml
lib/spack/spack/config.py:1007 ==> [2021-12-01-11:36:21.147125] Reading config file /home/amd/spack/etc/spack/defaults/config.yaml
lib/spack/spack/config.py:1007 ==> [2021-12-01-11:36:21.158502] Reading config file /home/amd/spack/etc/spack/defaults/packages.yaml
lib/spack/spack/solver/asp.py:1932 ==> [2021-12-01-11:36:21.248433] build(sqlite)
lib/spack/spack/solver/asp.py:1932 ==> [2021-12-01-11:36:21.248533] build(readline)
lib/spack/spack/solver/asp.py:1932 ==> [2021-12-01-11:36:21.248616] build(zlib)
lib/spack/spack/solver/asp.py:1932 ==> [2021-12-01-11:36:21.248695] build(ncurses)
lib/spack/spack/solver/asp.py:1932 ==> [2021-12-01-11:36:21.248770] build(pkgconf)
Traceback (most recent call last):
File "/home/amd/spack/bin/spack", line 100, in <module>
sys.exit(spack.main.main())
File "/home/amd/spack/lib/spack/spack/main.py", line 881, in main
return _main(argv)
File "/home/amd/spack/lib/spack/spack/main.py", line 864, in _main
return _invoke_command(command, parser, args, unknown)
File "/home/amd/spack/lib/spack/spack/main.py", line 534, in _invoke_command
return_val = command(parser, args)
File "/home/amd/spack/lib/spack/spack/cmd/install.py", line 394, in install
specs = spack.cmd.parse_specs(
File "/home/amd/spack/lib/spack/spack/cmd/__init__.py", line 166, in parse_specs
spec.concretize(tests=tests, reuse=reuse) # implies normalize
File "/home/amd/spack/lib/spack/spack/spec.py", line 2639, in concretize
self._new_concretize(tests, reuse=reuse)
File "/home/amd/spack/lib/spack/spack/spec.py", line 2610, in _new_concretize
result = spack.solver.asp.solve([self], tests=tests, reuse=reuse)
File "/home/amd/spack/lib/spack/spack/solver/asp.py", line 2024, in solve
return driver.solve(
File "/home/amd/spack/lib/spack/spack/solver/asp.py", line 592, in solve
answers = builder.build_specs(tuples)
File "/home/amd/spack/lib/spack/spack/solver/asp.py", line 1958, in build_specs
self.reorder_flags()
File "/home/amd/spack/lib/spack/spack/solver/asp.py", line 1875, in reorder_flags
check_same_flags(spec.compiler_flags, compiler_flags)
File "/home/amd/spack/lib/spack/spack/solver/asp.py", line 262, in check_same_flags
assert values1 == values2
AssertionError
Information on your system
$ spack debug report
- Spack: 0.17.0-1-f92a2d688d
- Python: 3.8.10
- Platform: linux-ubuntu20.04-zen3
- Concretizer: clingo
General information
- I have run
spack debug reportand reported the version of Spack/Python/Platform - I have searched the issues of this repo and believe this is not a duplicate
- I have run the failing commands in debug mode and reported the output
Reactions are currently unavailable
Metadata
Metadata
Labels
AMDbugSomething isn't workingSomething isn't workingbuild-environmentcompilerstriageThe issue needs to be prioritizedThe issue needs to be prioritized