Skip to content

Clingo bootstrap doesn't work on Gentoo #24928

@robertu94

Description

@robertu94

Gentoo has a python launcher to support it's slot system that gets used that seems to break clingo's bootstrap. Specifically, it uses https://github.com/mgorny/python-exec. The "real" pythons are installed to

/usr/lib/python-exec/python3.8/python
/usr/lib/python-exec/python3.9/python

I tried to override this by providing an external python with a path to the "real" python that doesn't use the wrapper, but that didn't work either. I'm at a loss at how to work around this.

Steps to reproduce the issue

spack env create -d .
spack env activate
# modify spack.yaml to set conretizer to clingo
spack install zlib
...

Error Message

[runderwood@voyager z-checker2]$ spack --debug --stacktrace install zlib
lib/spack/spack/cmd/__init__.py:121 ==> [2021-07-16-11:13:21.836383] Imported install from built-in commands
lib/spack/spack/config.py:989 ==> [2021-07-16-11:13:21.840660] Reading config file /home/runderwood/git/play/z-checker2/spack.yaml
lib/spack/spack/cmd/__init__.py:121 ==> [2021-07-16-11:13:21.842890] Imported install from built-in commands
lib/spack/spack/config.py:989 ==> [2021-07-16-11:13:21.846059] Reading config file /home/runderwood/git/contrib/spack/etc/spack/defaults/bootstrap.yaml
lib/spack/spack/config.py:989 ==> [2021-07-16-11:13:21.849286] Reading config file /home/runderwood/git/contrib/spack/etc/spack/defaults/config.yaml
lib/spack/spack/database.py:371 ==> [2021-07-16-11:13:21.867635] DATABASE LOCK TIMEOUT: 3s
lib/spack/spack/database.py:375 ==> [2021-07-16-11:13:21.867820] PACKAGE LOCK TIMEOUT: No timeout
lib/spack/spack/config.py:989 ==> [2021-07-16-11:13:21.868322] Reading config file /home/runderwood/git/contrib/spack/etc/spack/defaults/bootstrap.yaml
lib/spack/spack/database.py:371 ==> [2021-07-16-11:13:21.870098] DATABASE LOCK TIMEOUT: 3s
lib/spack/spack/database.py:375 ==> [2021-07-16-11:13:21.870261] PACKAGE LOCK TIMEOUT: No timeout
lib/spack/spack/bootstrap.py:201 ==> [2021-07-16-11:13:21.870435] [BOOTSTRAP CONFIG SCOPE] name=_builtin
lib/spack/spack/bootstrap.py:213 ==> [2021-07-16-11:13:21.870835] [BOOTSTRAP CONFIG SCOPE] name=defaults, path=/home/runderwood/git/contrib/spack/etc/spack/defaults
lib/spack/spack/bootstrap.py:214 ==> [2021-07-16-11:13:21.870988] [BOOTSTRAP CONFIG SCOPE] name=defaults/linux, path=/home/runderwood/git/contrib/spack/etc/spack/defaults/linux
lib/spack/spack/bootstrap.py:213 ==> [2021-07-16-11:13:21.871151] [BOOTSTRAP CONFIG SCOPE] name=system, path=/etc/spack
lib/spack/spack/bootstrap.py:214 ==> [2021-07-16-11:13:21.871330] [BOOTSTRAP CONFIG SCOPE] name=system/linux, path=/etc/spack/linux
lib/spack/spack/bootstrap.py:213 ==> [2021-07-16-11:13:21.871649] [BOOTSTRAP CONFIG SCOPE] name=site, path=/home/runderwood/git/contrib/spack/etc/spack
lib/spack/spack/bootstrap.py:214 ==> [2021-07-16-11:13:21.871871] [BOOTSTRAP CONFIG SCOPE] name=site/linux, path=/home/runderwood/git/contrib/spack/etc/spack/linux
lib/spack/spack/bootstrap.py:213 ==> [2021-07-16-11:13:21.872074] [BOOTSTRAP CONFIG SCOPE] name=user, path=/home/runderwood/.spack
lib/spack/spack/bootstrap.py:214 ==> [2021-07-16-11:13:21.872231] [BOOTSTRAP CONFIG SCOPE] name=user/linux, path=/home/runderwood/.spack/linux
lib/spack/spack/bootstrap.py:268 ==> [2021-07-16-11:13:21.876701] [BOOTSTRAP ROOT SPEC] clingo: clingo-bootstrap@spack+python %gcc target=x86_64
lib/spack/spack/config.py:989 ==> [2021-07-16-11:13:21.877895] Reading config file /home/runderwood/git/contrib/spack/etc/spack/defaults/config.yaml
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:21.941592] diffutils applying constraint iconv
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:21.952648] ncurses applying constraint pkgconfig
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:21.954302] readline applying constraint ncurses
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:21.956690] gdbm applying constraint readline
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:21.960950] bzip2 applying constraint diffutils
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:21.963320] perl applying constraint gdbm
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:21.964517] perl applying constraint berkeley-db
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:21.965639] perl applying constraint bzip2+shared
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:21.966716] perl applying constraint zlib+shared
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:21.967988] bison applying constraint diffutils
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:21.970728] bison applying constraint m4
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:21.973103] bison applying constraint perl
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:21.974835] python applying constraint [email protected]:
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:21.976131] python applying constraint [email protected]:
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:21.978049] clingo-bootstrap applying constraint [email protected]:
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:21.979282] clingo-bootstrap applying constraint [email protected]:
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:21.980793] clingo-bootstrap applying constraint [email protected]:
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:21.981883] clingo-bootstrap applying constraint python
lib/spack/spack/config.py:989 ==> [2021-07-16-11:13:21.983878] Reading config file /home/runderwood/git/contrib/spack/etc/spack/defaults/packages.yaml
lib/spack/spack/config.py:989 ==> [2021-07-16-11:13:22.023630] Reading config file /home/runderwood/.spack/packages.yaml
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:22.057308] clingo-bootstrap applying constraint [email protected]:
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:22.058938] clingo-bootstrap applying constraint [email protected]:
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:22.059929] clingo-bootstrap applying constraint [email protected]:
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:22.060875] clingo-bootstrap applying constraint python
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:22.061438] python applying constraint [email protected]:
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:22.066315] clingo-bootstrap applying constraint [email protected]:
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:22.067270] clingo-bootstrap applying constraint [email protected]:
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:22.068254] clingo-bootstrap applying constraint [email protected]:
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:22.069135] clingo-bootstrap applying constraint python
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:22.069690] python applying constraint [email protected]:
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:22.073763] clingo-bootstrap applying constraint [email protected]:
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:22.074641] clingo-bootstrap applying constraint [email protected]:
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:22.075545] clingo-bootstrap applying constraint [email protected]:
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:22.076333] clingo-bootstrap applying constraint python
lib/spack/spack/config.py:989 ==> [2021-07-16-11:13:22.080690] Reading config file /home/runderwood/.spack/linux/compilers.yaml
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:22.133970] clingo-bootstrap applying constraint [email protected]:
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:22.135174] clingo-bootstrap applying constraint [email protected]:
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:22.136343] clingo-bootstrap applying constraint [email protected]:
lib/spack/spack/spec.py:2813 ==> [2021-07-16-11:13:22.137266] clingo-bootstrap applying constraint python
lib/spack/spack/spec.py:2488 ==> [2021-07-16-11:13:22.146638] Ordered hashes [cmake]: cmake/23/b48396c0e4f61756248156b6cebe9bc0d7a22228639b47b5aa77c9330588ce88
lib/spack/spack/spec.py:2488 ==> [2021-07-16-11:13:22.146861] Ordered hashes [python]: python/6/0d98e93189bc278fbc37a50ed7f183bd8aaf249a8e1670a465f0db6bb4f8cf87
lib/spack/spack/config.py:989 ==> [2021-07-16-11:13:22.215956] Reading config file /home/runderwood/git/contrib/spack/etc/spack/defaults/config.yaml
lib/spack/spack/installer.py:1406 ==> [2021-07-16-11:13:22.268842] Initializing the build queue from the build requests
lib/spack/spack/installer.py:1020 ==> [2021-07-16-11:13:22.269017] Initializing the build queue for clingo-bootstrap
lib/spack/spack/installer.py:2147 ==> [2021-07-16-11:13:22.270963] Processing dependencies for clingo-bootstrap-spack-rygx3hggm5itz37tbf2wptnhggikt2he: ('build', 'link', 'run')
lib/spack/spack/installer.py:1885 ==> [2021-07-16-11:13:22.271175] Pkg id bison-3.7.1-unkbbf6hnv22mtzfrokpalc3eat5rbwq has the following dependents:
lib/spack/spack/installer.py:1888 ==> [2021-07-16-11:13:22.271325] - clingo-bootstrap-spack-rygx3hggm5itz37tbf2wptnhggikt2he
lib/spack/spack/installer.py:1885 ==> [2021-07-16-11:13:22.284071] Pkg id cmake-3.19.7-n5hux5ukgvkn3crkk2n6tox4mu76fqlu has the following dependents:
lib/spack/spack/installer.py:1888 ==> [2021-07-16-11:13:22.284706] - clingo-bootstrap-spack-rygx3hggm5itz37tbf2wptnhggikt2he
lib/spack/spack/installer.py:1885 ==> [2021-07-16-11:13:22.298703] Pkg id python-3.9-cwu7hmf6jfwszsbpphpomv7drbfvh32y has the following dependents:
lib/spack/spack/installer.py:1888 ==> [2021-07-16-11:13:22.298897] - clingo-bootstrap-spack-rygx3hggm5itz37tbf2wptnhggikt2he
lib/spack/spack/installer.py:1885 ==> [2021-07-16-11:13:22.327835] Pkg id re2c-1.2.1-d4ai3o6hw7aw6lkcnc4nuj24zlrmxtgt has the following dependents:
lib/spack/spack/installer.py:1888 ==> [2021-07-16-11:13:22.328239] - clingo-bootstrap-spack-rygx3hggm5itz37tbf2wptnhggikt2he
lib/spack/spack/database.py:476 ==> [2021-07-16-11:13:22.341519] Removing failure marking for clingo-bootstrap
lib/spack/spack/installer.py:1885 ==> [2021-07-16-11:13:22.342036] Pkg id clingo-bootstrap-spack-rygx3hggm5itz37tbf2wptnhggikt2he has the following dependents:
lib/spack/spack/installer.py:1412 ==> [2021-07-16-11:13:22.343251] Ensure all dependencies know all dependents across specs
lib/spack/spack/installer.py:323 ==> [2021-07-16-11:13:22.345730] [email protected] : externally installed in /usr
lib/spack/spack/installer.py:329 ==> [2021-07-16-11:13:22.346118] [email protected] : already registered in DB
[+] /usr (external bison-3.7.1-unkbbf6hnv22mtzfrokpalc3eat5rbwq)
lib/spack/spack/installer.py:1384 ==> [2021-07-16-11:13:22.346419] Flagging bison-3.7.1-unkbbf6hnv22mtzfrokpalc3eat5rbwq as installed
lib/spack/spack/installer.py:1391 ==> [2021-07-16-11:13:22.346624] Removing bison-3.7.1-unkbbf6hnv22mtzfrokpalc3eat5rbwq from clingo-bootstrap-spack-rygx3hggm5itz37tbf2wptnhggikt2he's uninstalled dependencies.
lib/spack/spack/installer.py:1992 ==> [2021-07-16-11:13:22.346841] clingo-bootstrap-spack-rygx3hggm5itz37tbf2wptnhggikt2he: Removed bison-3.7.1-unkbbf6hnv22mtzfrokpalc3eat5rbwq from uninstalled deps list: {'python-3.9-cwu7hmf6jfwszsbpphpomv7drbfvh32y', 're2c-1.2.1-d4ai3o6hw7aw6lkcnc4nuj24zlrmxtgt', 'cmake-3.19.7-n5hux5ukgvkn3crkk2n6tox4mu76fqlu'}
lib/spack/spack/installer.py:323 ==> [2021-07-16-11:13:22.347078] [email protected] : externally installed in /usr
lib/spack/spack/installer.py:329 ==> [2021-07-16-11:13:22.347224] [email protected] : already registered in DB
[+] /usr (external cmake-3.19.7-n5hux5ukgvkn3crkk2n6tox4mu76fqlu)
lib/spack/spack/installer.py:1384 ==> [2021-07-16-11:13:22.347487] Flagging cmake-3.19.7-n5hux5ukgvkn3crkk2n6tox4mu76fqlu as installed
lib/spack/spack/installer.py:1391 ==> [2021-07-16-11:13:22.347634] Removing cmake-3.19.7-n5hux5ukgvkn3crkk2n6tox4mu76fqlu from clingo-bootstrap-spack-rygx3hggm5itz37tbf2wptnhggikt2he's uninstalled dependencies.
lib/spack/spack/installer.py:1992 ==> [2021-07-16-11:13:22.347820] clingo-bootstrap-spack-rygx3hggm5itz37tbf2wptnhggikt2he: Removed cmake-3.19.7-n5hux5ukgvkn3crkk2n6tox4mu76fqlu from uninstalled deps list: {'python-3.9-cwu7hmf6jfwszsbpphpomv7drbfvh32y', 're2c-1.2.1-d4ai3o6hw7aw6lkcnc4nuj24zlrmxtgt'}
lib/spack/spack/installer.py:323 ==> [2021-07-16-11:13:22.348046] [email protected] : externally installed in /usr/lib/python-exec
lib/spack/spack/installer.py:329 ==> [2021-07-16-11:13:22.348194] [email protected] : already registered in DB
[+] /usr/lib/python-exec (external python-3.9-cwu7hmf6jfwszsbpphpomv7drbfvh32y)
lib/spack/spack/installer.py:1384 ==> [2021-07-16-11:13:22.348385] Flagging python-3.9-cwu7hmf6jfwszsbpphpomv7drbfvh32y as installed
lib/spack/spack/installer.py:1391 ==> [2021-07-16-11:13:22.348550] Removing python-3.9-cwu7hmf6jfwszsbpphpomv7drbfvh32y from clingo-bootstrap-spack-rygx3hggm5itz37tbf2wptnhggikt2he's uninstalled dependencies.
lib/spack/spack/installer.py:1992 ==> [2021-07-16-11:13:22.348738] clingo-bootstrap-spack-rygx3hggm5itz37tbf2wptnhggikt2he: Removed python-3.9-cwu7hmf6jfwszsbpphpomv7drbfvh32y from uninstalled deps list: {'re2c-1.2.1-d4ai3o6hw7aw6lkcnc4nuj24zlrmxtgt'}
lib/spack/spack/installer.py:966 ==> [2021-07-16-11:13:22.349895] Acquiring a write lock on re2c-1.2.1-d4ai3o6hw7aw6lkcnc4nuj24zlrmxtgt with timeout 1e-09
lib/spack/spack/installer.py:1384 ==> [2021-07-16-11:13:22.350705] Flagging re2c-1.2.1-d4ai3o6hw7aw6lkcnc4nuj24zlrmxtgt as installed
lib/spack/spack/installer.py:1391 ==> [2021-07-16-11:13:22.350855] Removing re2c-1.2.1-d4ai3o6hw7aw6lkcnc4nuj24zlrmxtgt from clingo-bootstrap-spack-rygx3hggm5itz37tbf2wptnhggikt2he's uninstalled dependencies.
lib/spack/spack/installer.py:1992 ==> [2021-07-16-11:13:22.351023] clingo-bootstrap-spack-rygx3hggm5itz37tbf2wptnhggikt2he: Removed re2c-1.2.1-d4ai3o6hw7aw6lkcnc4nuj24zlrmxtgt from uninstalled deps list: set()
lib/spack/spack/stage.py:327 ==> [2021-07-16-11:13:22.352034] Creating stage lock spack-stage-re2c-1.2.1-d4ai3o6hw7aw6lkcnc4nuj24zlrmxtgt
lib/spack/spack/installer.py:982 ==> [2021-07-16-11:13:22.352241] Downgrading to a read lock on re2c-1.2.1-d4ai3o6hw7aw6lkcnc4nuj24zlrmxtgt with timeout 1e-09
[+] /home/runderwood/.spack/bootstrap/store/linux-gentoo2-x86_64/gcc-10.3.0/re2c-1.2.1-d4ai3o6hw7aw6lkcnc4nuj24zlrmxtgt
lib/spack/spack/installer.py:966 ==> [2021-07-16-11:13:22.352729] Acquiring a write lock on clingo-bootstrap-spack-rygx3hggm5itz37tbf2wptnhggikt2he with timeout 1e-09
lib/spack/spack/installer.py:1126 ==> [2021-07-16-11:13:22.354616] Installing clingo-bootstrap-spack-rygx3hggm5itz37tbf2wptnhggikt2he
lib/spack/spack/installer.py:394 ==> [2021-07-16-11:13:22.354771] Searching for binary cache of clingo-bootstrap-spack-rygx3hggm5itz37tbf2wptnhggikt2he
lib/spack/spack/config.py:989 ==> [2021-07-16-11:13:22.355315] Reading config file /home/runderwood/git/contrib/spack/etc/spack/defaults/mirrors.yaml
lib/spack/spack/binary_distribution.py:1430 ==> [2021-07-16-11:13:22.745648] Did not find linux-gentoo2-x86_64-gcc-10.3.0-clingo-bootstrap-spack-rygx3hggm5itz37tbf2wptnhggikt2he.spec.yaml on https://mirror.spack.io/build_cache/linux-gentoo2-x86_64-gcc-10.3.0-clingo-bootstrap-spack-rygx3hggm5itz37tbf2wptnhggikt2he.spec.yaml
  Download failed: HTTP Error 404: Not Found
lib/spack/spack/installer.py:282 ==> [2021-07-16-11:13:22.746939] No binary for clingo-bootstrap-spack-rygx3hggm5itz37tbf2wptnhggikt2he found: installing from source
lib/spack/spack/util/executable.py:190 ==> [2021-07-16-11:13:22.823209] '/usr/bin/git' 'describe' '--tags' '--match' 'v*'
lib/spack/spack/compilers/__init__.py:741 ==> [2021-07-16-11:13:22.954372] [TOOLCHAIN] MATCH Gcc
lib/spack/spack/build_environment.py:365 ==> [2021-07-16-11:13:22.956773] Adding compiler bin/ paths: /home/runderwood/git/contrib/spack/lib/spack/env /home/runderwood/git/contrib/spack/lib/spack/env/case-insensitive /home/runderwood/git/contrib/spack/lib/spack/env/gcc
lib/spack/spack/stage.py:327 ==> [2021-07-16-11:13:22.967005] Creating stage lock spack-stage-clingo-bootstrap-spack-rygx3hggm5itz37tbf2wptnhggikt2he
lib/spack/spack/error.py:54 ==> [2021-07-16-11:13:22.969505] Error: RuntimeError: Unable to locate python command in /usr/lib/python-exec/bin

/home/runderwood/git/contrib/spack/var/spack/repos/builtin/packages/python/package.py:660, in command:
        657                return Executable(path)
        658        else:
        659            msg = 'Unable to locate {0} command in {1}'
  >>    660            raise RuntimeError(msg.format(self.name, self.prefix.bin))


Traceback (most recent call last):
  File "/home/runderwood/git/contrib/spack/lib/spack/spack/build_environment.py", line 1011, in _setup_pkg_and_run
    setup_package(pkg, dirty=kwargs.get('dirty', False),
  File "/home/runderwood/git/contrib/spack/lib/spack/spack/build_environment.py", line 768, in setup_package
    set_wrapper_variables(pkg, env)
  File "/home/runderwood/git/contrib/spack/lib/spack/spack/build_environment.py", line 424, in set_wrapper_variables
    update_compiler_args_for_dep(dspec)
  File "/home/runderwood/git/contrib/spack/lib/spack/spack/build_environment.py", line 403, in update_compiler_args_for_dep
    dep_link_dirs.extend(query.libs.directories)
  File "/home/runderwood/git/contrib/spack/lib/spack/spack/spec.py", line 949, in __get__
    value = f()
  File "/home/runderwood/git/contrib/spack/lib/spack/spack/spec.py", line 938, in <lambda>
    callbacks_chain.append(lambda: getattr(pkg, self.attribute_name))
  File "/home/runderwood/git/contrib/spack/var/spack/repos/builtin/packages/python/package.py", line 777, in libs
  File "/home/runderwood/git/contrib/spack/var/spack/repos/builtin/packages/python/package.py", line 695, in get_config_var
  File "/home/runderwood/git/contrib/spack/var/spack/repos/builtin/packages/python/package.py", line 661, in command
RuntimeError: Unable to locate python command in /usr/lib/python-exec/bin
lib/spack/spack/installer.py:1336 ==> [2021-07-16-11:13:22.970121] Flagging clingo-bootstrap-spack-rygx3hggm5itz37tbf2wptnhggikt2he as failed: RuntimeError: Unable to locate python command in /usr/lib/python-exec/bin
lib/spack/spack/stage.py:327 ==> [2021-07-16-11:13:22.972865] Creating stage lock spack-stage-clingo-bootstrap-spack-rygx3hggm5itz37tbf2wptnhggikt2he
lib/spack/spack/cmd/install.py:397 ==> [2021-07-16-11:13:22.973130] ChildError: RuntimeError: Unable to locate python command in /usr/lib/python-exec/bin
lib/spack/spack/main.py:777 ==> [2021-07-16-11:13:22.973268] ChildError: RuntimeError: Unable to locate python command in /usr/lib/python-exec/bin

Information on your system

Additional information

  • [x ] I have run spack debug report and reported the version of Spack/Python/Platform
[runderwood@voyager z-checker2]$ spack debug report
* **Spack:** 0.16.2-3541-64f31c4579
* **Python:** 3.9.5
* **Platform:** linux-gentoo2-skylake
* **Concretizer:** clingo
  • 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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions