Skip to content

cuda fails to install ./cuda-installer: error while loading shared libraries: libxml2.so.2 #5969

Description

@Dantali0n

Steps to reproduce

Use the following environment.yaml on Debian 13:

spack:
  specs:
  - cuda
  - libxml2

It doesn't matter if you manually add / remove the spec for libxml2 the error is the same.

Error message

root@7bd1d36687b7:/opt/cobalt/spack/latest# spack install -v
[+] /usr (external glibc-2.41-dln4y657a6hpiciukmwgzqcyw6nmcpsn)
[+] /opt/cobalt/spack/latest/opt/spack/linux-skylake/gcc-runtime-14.2.0-rhu7u5njsy3ee5th5cmao6oj5z22vkla
[+] /opt/cobalt/spack/latest/opt/spack/linux-skylake/gzip-1.14-jdkc7xlh3ami6vxu7kjqaxypjcsdtqr5
[+] /opt/cobalt/spack/latest/opt/spack/linux-skylake/libiconv-1.18-aoopqegrwvzh3t33n53rjelcnku7fgqc
[+] /opt/cobalt/spack/latest/opt/spack/linux-skylake/zlib-ng-2.3.3-b7yuxem23uzq5qxaz4lw5rix4splomjn
[+] /opt/cobalt/spack/latest/opt/spack/linux-skylake/xz-5.8.3-4jsizfayjvr6nxbocjnkwdtscmlbsshs
[+] /opt/cobalt/spack/latest/opt/spack/linux-skylake/openssl-3.6.1-3iyg2nfs3x2dbpondb7tp6srxmo6beae
[+] /opt/cobalt/spack/latest/opt/spack/linux-skylake/libxml2-2.15.3-3rp2tt2chec53kovd2osi5cji7wlji6z
[+] /opt/cobalt/spack/latest/opt/spack/linux-skylake/coreutils-9.10-g2xzampux5diecqsup4gbl57nh2exjyb
==> No binary for cuda-13.3.0-hwyvmpwo2qzrprbnzzdbjpi3vrgvq6ft found: installing from source
==> Installing cuda-13.3.0-hwyvmpwo2qzrprbnzzdbjpi3vrgvq6ft [10/10]
==> Using cached archive: /opt/cobalt/spack/latest/var/spack/cache/_source-cache/archive/5f/5f79488b57fe6936bc95a56f9b7e2838ab2f2ee3313b1008942206eebe06352d
==> No patches needed for cuda
==> cuda: Executing phase: 'install'
==> [2026-08-04-13:05:16.610287] Attempting to read from missing scope: <ConfigScope: system> at /etc/spack
==> [2026-08-04-13:05:16.611469] '/usr/bin/sh' '/tmp/root/spack-stage/spack-stage-cuda-13.3.0-hwyvmpwo2qzrprbnzzdbjpi3vrgvq6ft/spack-src/cuda_13.3.0_610.43.02_linux.run' '--silent' '--override' '--toolkit' '--tmpdir=/tmp/root/spack-stage/spack-stage-cuda-13.3.0-hwyvmpwo2qzrprbnzzdbjpi3vrgvq6ft/tmp' '--installpath=/opt/cobalt/spack/latest/opt/spack/linux-skylake/cuda-13.3.0-hwyvmpwo2qzrprbnzzdbjpi3vrgvq6ft'
./cuda-installer: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory
==> Error: ProcessError: Command exited with status 127:
    '/usr/bin/sh' '/tmp/root/spack-stage/spack-stage-cuda-13.3.0-hwyvmpwo2qzrprbnzzdbjpi3vrgvq6ft/spack-src/cuda_13.3.0_610.43.02_linux.run' '--silent' '--override' '--toolkit' '--tmpdir=/tmp/root/spack-stage/spack-stage-cuda-13.3.0-hwyvmpwo2qzrprbnzzdbjpi3vrgvq6ft/tmp' '--installpath=/opt/cobalt/spack/latest/opt/spack/linux-skylake/cuda-13.3.0-hwyvmpwo2qzrprbnzzdbjpi3vrgvq6ft'

1 error found in build log:
     2    ==> [2026-08-04-13:05:16.610287] Attempting to read from missing scope: <ConfigScope: system> at /etc/spack
     3    ==> [2026-08-04-13:05:16.611469] '/usr/bin/sh' '/tmp/root/spack-stage/spack-stage-cuda-13.3.0-hwyvmpwo2qzrprbnzzdbjpi3vrgvq6ft/spack-src/cuda_13.3.0_610.43.02_linux.run' '--silent' '--override' '--tool
          kit' '--tmpdir=/tmp/root/spack-stage/spack-stage-cuda-13.3.0-hwyvmpwo2qzrprbnzzdbjpi3vrgvq6ft/tmp' '--installpath=/opt/cobalt/spack/latest/opt/spack/linux-skylake/cuda-13.3.0-hwyvmpwo2qzrprbnzzdbjpi3vr
          gvq6ft'
  >> 4    ./cuda-installer: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory

See build log for details:
  /tmp/root/spack-stage/spack-stage-cuda-13.3.0-hwyvmpwo2qzrprbnzzdbjpi3vrgvq6ft/spack-build-out.txt

==> Removing failure mark on cuda-13.3.0-hwyvmpwo2qzrprbnzzdbjpi3vrgvq6ft
==> Error: cuda-13.3.0-hwyvmpwo2qzrprbnzzdbjpi3vrgvq6ft: ProcessError: Command exited with status 127:
    '/usr/bin/sh' '/tmp/root/spack-stage/spack-stage-cuda-13.3.0-hwyvmpwo2qzrprbnzzdbjpi3vrgvq6ft/spack-src/cuda_13.3.0_610.43.02_linux.run' '--silent' '--override' '--toolkit' '--tmpdir=/tmp/root/spack-stage/spack-stage-cuda-13.3.0-hwyvmpwo2qzrprbnzzdbjpi3vrgvq6ft/tmp' '--installpath=/opt/cobalt/spack/latest/opt/spack/linux-skylake/cuda-13.3.0-hwyvmpwo2qzrprbnzzdbjpi3vrgvq6ft'
==> Error: cuda-13.3.0-hwyvmpwo2qzrprbnzzdbjpi3vrgvq6ft: Package was not installed
==> Error: Installation request failed.  Refer to reported errors for failing package(s).

Information on your system

Spack 1.2.2. (also works for any other version say 1.1.1)
GCC 14.2
OS: Debian 13

Spack debug report

* **Spack:** 1.1.1 (https://github.com/spack/spack/commit/2e2169d5282d166f63e3ee4db8d4446c43cefa8a)
* **Builtin repo:** https://github.com/spack/spack-packages/commit/2c145b567f109021dbd738b823ebaabbbc7bd868
* **Python:** 3.13.5
* **Platform:** linux-debian13-skylake

General information

  • I have run spack debug report and 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageThe issue needs to be prioritized

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions