Skip to content

Testing issue: hdf5 run test unable to find C++ compiler #5616

Description

@ethanjohnsloan

Steps to reproduce the failure(s) or link(s) to test output(s)

$> spack spec /dgkfk
==> Compilers have been configured automatically from PATH inspection
[+]  hdf5@1.14.6~cxx+fortran+hl~ipo~java~map+mpi+shared~subfiling~szip~threadsafe+tools api=default build_system=cmake build_type=Release generator=make platform=linux os=rhel9 target=zen4 %c,fortran=gcc@13.3.1
[+]      ^cmake@3.31.12~doc+ncurses+ownlibs~qtgui build_system=generic build_type=Release platform=linux os=rhel9 target=zen4 %c,cxx=gcc@13.3.1
[+]          ^curl@8.20.0~gssapi~ldap~libidn2~librtmp~libssh~libssh2+nghttp2 build_system=autotools libs:=shared,static tls:=openssl platform=linux os=rhel9 target=zen4 %c,cxx=gcc@13.3.1
[+]              ^nghttp2@1.67.1 build_system=autotools platform=linux os=rhel9 target=zen4 %c,cxx=gcc@13.3.1
[+]                  ^diffutils@3.12 build_system=autotools platform=linux os=rhel9 target=zen4 %c=gcc@13.3.1
[+]                      ^libiconv@1.18 build_system=autotools libs:=shared,static platform=linux os=rhel9 target=zen4 %c=gcc@13.3.1
[+]              ^openssl@3.6.1~docs+shared build_system=generic certs=mozilla platform=linux os=rhel9 target=zen4 %c,cxx=gcc@13.3.1
[+]                  ^ca-certificates-mozilla@2026-05-14 build_system=generic platform=linux os=rhel9 target=zen4 
[+]                  ^perl@5.42.2+cpanm+opcode+open+shared+threads build_system=generic platform=linux os=rhel9 target=zen4 %c=gcc@13.3.1
[+]                      ^berkeley-db@18.1.40+cxx~docs+stl build_system=autotools patches:=26090f4,b231fcc platform=linux os=rhel9 target=zen4 %c,cxx=gcc@13.3.1
[+]                      ^bzip2@1.0.8~debug~pic+shared build_system=generic platform=linux os=rhel9 target=zen4 %c=gcc@13.3.1
[+]                      ^gdbm@1.26 build_system=autotools platform=linux os=rhel9 target=zen4 %c=gcc@13.3.1
[+]                          ^readline@8.3 build_system=autotools patches:=21f0a03,72dee13,e273643 platform=linux os=rhel9 target=zen4 %c=gcc@13.3.1
[+]                      ^less@692 build_system=autotools platform=linux os=rhel9 target=zen4 %c=gcc@13.3.1
[+]          ^ncurses@6.6~symlinks+termlib abi=none build_system=autotools patches:=7a351bc platform=linux os=rhel9 target=zen4 %c,cxx=gcc@13.3.1
[+]      ^compiler-wrapper@1.1.0 build_system=generic platform=linux os=rhel9 target=zen4 
[e]      ^gcc@13.3.1+binutils+bootstrap~graphite+libsanitizer~mold~nvptx~piclibs~profiled~strip build_system=autotools build_type=RelWithDebInfo languages:='c,c++,fortran' platform=linux os=rhel9 target=x86_64 
[+]      ^gcc-runtime@13.3.1 build_system=generic platform=linux os=rhel9 target=zen4 
[e]      ^glibc@2.34 build_system=autotools platform=linux os=rhel9 target=x86_64 
[+]      ^gmake@4.4.1~guile build_system=generic platform=linux os=rhel9 target=zen4 %c=gcc@13.3.1
[e]      ^mvapich@4.0~alloca~debug~errs+fast+regcache+wrapperrpath build_system=autotools file_systems:=auto netmod=ofi process_managers:=auto threads=multiple platform=linux os=rhel9 target=x86_64 
[+]      ^pkgconf@2.5.1 build_system=autotools platform=linux os=rhel9 target=zen4 %c=gcc@13.3.1
[+]      ^zlib-ng@2.3.3+compat+new_strategies+opt+pic+shared build_system=autotools platform=linux os=rhel9 target=zen4 %c,cxx=gcc@13.3.1

$> spack test run /dgkfk
hdf5 : dgkfkl2jqhc6s3vddznfiprgcymaufmz
--- ==> Spack test ao4hcxpcgs5b2misrbmrwy7dfmzmsd43
==> Testing package hdf5-1.14.6-dgkfkl2
==> Error: TestFailure: 1 test failed.


'CC'

/home/users/me/.spack/package_repos/fncqgg4/repos/spack_repo/builtin/packages/hdf5/package.py:782, in test_check_prog:
        779            with open(prog, "w") as f:
        780                f.write(source.format(fmt, arg_line1, arg_line2))
        781
  >>    782            cc = Executable(os.environ["CC"])
        783            cc(*(["-c", "check.c"] + spec["hdf5"].headers.cpp_flags.split()))
        784            cc(*(["-o", "check", "check.o"] + spec["hdf5"].libs.ld_flags.split()))
        785            try:

See test log for details:
  /home/users/me/.spack/test/ao4hcxpcgs5b2misrbmrwy7dfmzmsd43/hdf5-1.14.6-dgkfkl2-test-out.txt

Error message

Error message
==> Testing package hdf5-1.14.6-dgkfkl2
==> [2026-07-16-11:30:09.074632] test: test_check_prog: build, run and check output of check.c
Checking HDF5 installation...
FAILED: Hdf5::test_check_prog: 'CC'
  File "/home/users/username/my-env/spack/bin/spack", line 49, in 
    sys.exit(main())
  File "/storage/users/username/my-env/spack/lib/spack/spack/main.py", line 1139, in main
    return _main(argv)
  File "/storage/users/username/my-env/spack/lib/spack/spack/main.py", line 1047, in _main
    return finish_parse_and_run(parser, cmd_name, args, env_format_error)
  File "/storage/users/username/my-env/spack/lib/spack/spack/main.py", line 1109, in finish_parse_and_run
    return _invoke_command(command, parser, args, unknown)
  File "/storage/users/username/my-env/spack/lib/spack/spack/main.py", line 633, in _invoke_command
    return_val = command(parser, args)
  File "/storage/users/username/my-env/spack/lib/spack/spack/cmd/test.py", line 446, in test
    globals()["test_%s" % args.test_command](args)
  File "/storage/users/username/my-env/spack/lib/spack/spack/cmd/test.py", line 205, in test_run
    test_suite(
  File "/storage/users/username/my-env/spack/lib/spack/spack/install_test.py", line 907, in __call__
    spec.package.do_test(dirty=dirty, externals=externals, timeout=timeout)
  File "/storage/users/username/my-env/spack/lib/spack/spack/package_base.py", line 2047, in do_test
    self.tester.stand_alone_tests(kwargs, timeout=timeout)
  File "/storage/users/username/my-env/spack/lib/spack/spack/install_test.py", line 404, in stand_alone_tests
    process = spack.build_environment.start_build_process(
  File "/storage/users/username/my-env/spack/lib/spack/spack/build_environment.py", line 1412, in start_build_process
    p.start()
  File "/storage/users/username/my-env/spack/lib/spack/spack/build_environment.py", line 1293, in start
    self.p.start()
  File "/opt/python/pkgs/python-3.12.13/lib/python3.12/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File "/opt/python/pkgs/python-3.12.13/lib/python3.12/multiprocessing/context.py", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "/opt/python/pkgs/python-3.12.13/lib/python3.12/multiprocessing/context.py", line 282, in _Popen
    return Popen(process_obj)
  File "/opt/python/pkgs/python-3.12.13/lib/python3.12/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/opt/python/pkgs/python-3.12.13/lib/python3.12/multiprocessing/popen_fork.py", line 71, in _launch
    code = process_obj._bootstrap(parent_sentinel=child_r)
  File "/opt/python/pkgs/python-3.12.13/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/opt/python/pkgs/python-3.12.13/lib/python3.12/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/storage/users/username/my-env/spack/lib/spack/spack/build_environment.py", line 1201, in _setup_pkg_and_run
    return_value = function(pkg, kwargs)
  File "/storage/users/username/my-env/spack/lib/spack/spack/install_test.py", line 730, in test_process
    process_test_parts(pkg, test_specs, verbose)
  File "/storage/users/username/my-env/spack/lib/spack/spack/install_test.py", line 676, in process_test_parts
    with test_part(
  File "/opt/python/pkgs/python-3.12.13/lib/python3.12/contextlib.py", line 158, in __exit__
    self.gen.throw(value)
==> [2026-07-16-11:30:09.090962] test: test_example: copy, dump, and diff example hdf5 file
==> [2026-07-16-11:30:09.091505] /storage/users/username/my-env/spack/opt/spack/linux-zen4/hdf5-1.14.6-dgkfkl2jqhc6s3vddznfiprgcymaufmz/bin/h5dump spack.h5
HDF5 "spack.h5" {
GROUP "/" {
   GROUP "Spack" {
      GROUP "Software" {
         ATTRIBUTE "Distribution" {
            DATATYPE  H5T_STRING {
               STRSIZE H5T_VARIABLE;
               STRPAD H5T_STR_NULLTERM;
               CSET H5T_CSET_UTF8;
               CTYPE H5T_C_S1;
            }
            DATASPACE  SCALAR
            DATA {
            (0): "Open Source"
            }
         }
         DATASET "data" {
            DATATYPE  H5T_IEEE_F64LE
            DATASPACE  SIMPLE { ( 7, 11 ) / ( 7, 11 ) }
            DATA {
            (0,0): 0.371141, 0.508482, 0.585975, 0.0944911, 0.684849,
            (0,5): 0.580396, 0.720271, 0.693561, 0.340432, 0.217145,
            (0,10): 0.636083,
            (1,0): 0.686996, 0.773501, 0.656767, 0.617543, 0.226132,
            (1,5): 0.768632, 0.0548711, 0.54572, 0.355544, 0.591548,
            (1,10): 0.233007,
            (2,0): 0.230032, 0.192087, 0.293845, 0.0369338, 0.038727,
            (2,5): 0.0977931, 0.966522, 0.0821391, 0.857921, 0.495703,
            (2,10): 0.746006,
            (3,0): 0.598494, 0.990266, 0.993009, 0.187481, 0.746391,
            (3,5): 0.140095, 0.122661, 0.929242, 0.542415, 0.802758,
            (3,10): 0.757941,
            (4,0): 0.372124, 0.411982, 0.270479, 0.950033, 0.329948,
            (4,5): 0.936704, 0.105097, 0.742285, 0.556565, 0.18988, 0.72797,
            (5,0): 0.801669, 0.271807, 0.910649, 0.186251, 0.868865,
            (5,5): 0.191484, 0.788371, 0.920173, 0.582249, 0.682022,
            (5,10): 0.146883,
            (6,0): 0.826824, 0.0886705, 0.402606, 0.0532444, 0.72509,
            (6,5): 0.964683, 0.330362, 0.833284, 0.630456, 0.411489, 0.247806
            }
         }
      }
   }
}
}
==> [2026-07-16-11:30:09.101372] /storage/users/username/my-env/spack/opt/spack/linux-zen4/hdf5-1.14.6-dgkfkl2jqhc6s3vddznfiprgcymaufmz/bin/h5copy -i spack.h5 -s Spack -o test.h5 -d Spack
==> [2026-07-16-11:30:09.107947] /storage/users/username/my-env/spack/opt/spack/linux-zen4/hdf5-1.14.6-dgkfkl2jqhc6s3vddznfiprgcymaufmz/bin/h5diff spack.h5 test.h5
PASSED: Hdf5::test_example
==> [2026-07-16-11:30:09.112881] test: test_version: Perform version checks on selected installed package binaries.
==> [2026-07-16-11:30:09.112923] test: test_version_h5copy: ensure version of h5copy is 1.14.6
==> [2026-07-16-11:30:09.113062] /storage/users/username/my-env/spack/opt/spack/linux-zen4/hdf5-1.14.6-dgkfkl2jqhc6s3vddznfiprgcymaufmz/bin/h5copy --version
h5copy: Version 1.14.6
PASSED: Hdf5::test_version_h5copy
==> [2026-07-16-11:30:09.116384] test: test_version_h5diff: ensure version of h5diff is 1.14.6
==> [2026-07-16-11:30:09.116652] /storage/users/username/my-env/spack/opt/spack/linux-zen4/hdf5-1.14.6-dgkfkl2jqhc6s3vddznfiprgcymaufmz/bin/h5diff --version
h5diff: Version 1.14.6
PASSED: Hdf5::test_version_h5diff
==> [2026-07-16-11:30:09.119544] test: test_version_h5dump: ensure version of h5dump is 1.14.6
==> [2026-07-16-11:30:09.119961] /storage/users/username/my-env/spack/opt/spack/linux-zen4/hdf5-1.14.6-dgkfkl2jqhc6s3vddznfiprgcymaufmz/bin/h5dump --version
h5dump: Version 1.14.6
PASSED: Hdf5::test_version_h5dump
==> [2026-07-16-11:30:09.123275] test: test_version_h5format_convert: ensure version of h5format_convert is 1.14.6
==> [2026-07-16-11:30:09.123844] /storage/users/username/my-env/spack/opt/spack/linux-zen4/hdf5-1.14.6-dgkfkl2jqhc6s3vddznfiprgcymaufmz/bin/h5format_convert --version
h5format_convert: Version 1.14.6
PASSED: Hdf5::test_version_h5format_convert
==> [2026-07-16-11:30:09.127523] test: test_version_h5ls: ensure version of h5ls is 1.14.6
==> [2026-07-16-11:30:09.128048] /storage/users/username/my-env/spack/opt/spack/linux-zen4/hdf5-1.14.6-dgkfkl2jqhc6s3vddznfiprgcymaufmz/bin/h5ls --version
h5ls: Version 1.14.6
PASSED: Hdf5::test_version_h5ls
==> [2026-07-16-11:30:09.131212] test: test_version_h5mkgrp: ensure version of h5mkgrp is 1.14.6
==> [2026-07-16-11:30:09.131882] /storage/users/username/my-env/spack/opt/spack/linux-zen4/hdf5-1.14.6-dgkfkl2jqhc6s3vddznfiprgcymaufmz/bin/h5mkgrp --version
h5mkgrp: Version 1.14.6
PASSED: Hdf5::test_version_h5mkgrp
==> [2026-07-16-11:30:09.135266] test: test_version_h5repack: ensure version of h5repack is 1.14.6
==> [2026-07-16-11:30:09.135690] /storage/users/username/my-env/spack/opt/spack/linux-zen4/hdf5-1.14.6-dgkfkl2jqhc6s3vddznfiprgcymaufmz/bin/h5repack --version
h5repack: Version 1.14.6
PASSED: Hdf5::test_version_h5repack
==> [2026-07-16-11:30:09.138634] test: test_version_h5stat: ensure version of h5stat is 1.14.6
==> [2026-07-16-11:30:09.139078] /storage/users/username/my-env/spack/opt/spack/linux-zen4/hdf5-1.14.6-dgkfkl2jqhc6s3vddznfiprgcymaufmz/bin/h5stat --version
h5stat: Version 1.14.6
PASSED: Hdf5::test_version_h5stat
==> [2026-07-16-11:30:09.141629] test: test_version_h5unjam: ensure version of h5unjam is 1.14.6
==> [2026-07-16-11:30:09.142061] /storage/users/username/my-env/spack/opt/spack/linux-zen4/hdf5-1.14.6-dgkfkl2jqhc6s3vddznfiprgcymaufmz/bin/h5unjam -V
h5unjam: Version 1.14.6
PASSED: Hdf5::test_version_h5unjam
PASSED: Hdf5::test_version
==> [2026-07-16-11:30:09.145045] Completed testing
==> [2026-07-16-11:30:09.145090] 
========================= SUMMARY: hdf5-1.14.6-dgkfkl2 =========================
Hdf5::test_check_prog .. FAILED
Hdf5::test_example .. PASSED
Hdf5::test_version_h5copy .. PASSED
Hdf5::test_version_h5diff .. PASSED
Hdf5::test_version_h5dump .. PASSED
Hdf5::test_version_h5format_convert .. PASSED
Hdf5::test_version_h5ls .. PASSED
Hdf5::test_version_h5mkgrp .. PASSED
Hdf5::test_version_h5repack .. PASSED
Hdf5::test_version_h5stat .. PASSED
Hdf5::test_version_h5unjam .. PASSED
Hdf5::test_version .. PASSED
======================= 1 failed, 11 passed of 12 parts ========================
==> [2026-07-16-11:30:09.145105] 

...

Information on your system or the test runner

* **Spack:** 1.3.0.dev0 (https://github.com/spack/spack/commit/0fe003d068e00450c4862e40ba317e8335deb6fc)
* **Builtin repo:** https://github.com/spack/spack-packages/commit/522167f3ac29d8665f58d0198259dd0176a0a68c
* **Python:** 3.12.13
* **Platform:** linux-rhel9-zen5

Additional information

@wspear @brtnfld @byrnHDF @gheber @hyoklee @lkurz @lrknox

General information

  • I have reported the version of Spack/Python/Platform/Runner
  • I have run spack maintainers <name-of-the-package> and @mentioned any maintainers
  • I have uploaded any available logs
  • I have searched the issues of this repo and believe this is not a duplicate

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions