#1125782 rocm-opencl-icd: could not find file '/usr/lib/llvm-21/lib/clang/21/include/opencl-c-base.h

Package:
rocm-opencl-icd
Source:
rocm-opencl-icd
Description:
ROCm implementation of OpenCL API - ICD runtime
Submitter:
Picca Frédéric-Emmanuel
Date:
2026-02-06 02:39:02 UTC
Severity:
normal
#1125782#5
Date:
2026-01-17 15:19:02 UTC
From:
To:
Hello,

while preparing the pyfai package which contain OpenCL test, I got this error message from the rocm CI/CD

146s ======================================================================
146s ERROR: test_sort4 (pyFAI.opencl.test.test_collective.TestGroupFunction.test_sort4)
146s tests the sort of floating points in a workgroup
146s ----------------------------------------------------------------------
146s Traceback (most recent call last):
146s   File "/usr/lib/python3/dist-packages/pyFAI/opencl/test/test_collective.py", line 91, in setUp
146s     get_opencl_code("pyfai:openCL/collective/comb_sort.cl")).build()
146s                                                              ~~~~~^^
146s   File "/usr/lib/python3/dist-packages/pyopencl/__init__.py", line 526, in build
146s     self._prg, was_cached = self._build_and_catch_errors(
146s                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
146s             lambda: create_built_program_from_source_cached(
146s             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
146s                 self._context, self._source, options_bytes, devices,
146s                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
146s                 cache_dir=cache_dir, include_path=include_path),
146s                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
146s             options_bytes=options_bytes, source=self._source)
146s             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
146s   File "/usr/lib/python3/dist-packages/pyopencl/__init__.py", line 574, in _build_and_catch_errors
146s     raise err
146s pyopencl._cl.RuntimeError: clBuildProgram failed: BUILD_PROGRAM_FAILURE - clBuildProgram failed: BUILD_PROGRAM_FAILURE - clBuildProgram failed: BUILD_PROGRAM_FAILURE
146s
146s Build on <pyopencl.Device 'gfx90a:sramecc+:xnack-' on 'AMD Accelerated Parallel Processing' at 0x92eb260>:
146s
146s fatal error: malformed or corrupted precompiled file: 'could not find file '/usr/lib/llvm-21/lib/clang/21/include/opencl-c-base.h' referenced by AST file '/tmp/comgr-90146f/include/opencl1.2-c.pch''
146s 1 error generated.
146s Error: Failed to compile source (from CL or HIP source to LLVM IR).
146s
146s (options: -I /usr/lib/python3/dist-packages/pyopencl/cl)
146s (source saved as /tmp/tmp3yrn6l5p.cl)
146s
146s ----------------------------------------------------------------------
146s Ran 44 tests in 11.785s
146s
146s FAILED (errors=28, skipped=4)
147s autopkgtest [14:57:42]: test opencl-rocm: -----------------------]

The autopkgtest depends only on rocm-opencl-icd

Test-Command: rocm-test-launcher debian/tests/opencl
Architecture: amd64 arm64 armel armhf i386
Depends:
 bitshuffle,
 rocm-opencl-icd,
 pkg-rocm-tools,
 python3-all,
 python3-pyfai,
 python3-tk,
 xauth,
 xvfb,
Features: test-name=opencl-rocm
Restrictions: allow-stderr, skip-not-installable, skippable


We can find this opencl-c-base.h files  in different packages.

$ apt-file search opencl-c-base.h
  castxml: /usr/share/castxml/clang/include/opencl-c-base.h
  libclang-common-14-dev: /usr/lib/llvm-14/lib/clang/14.0.6/include/opencl-c-base.h
  libclang-common-17-dev: /usr/lib/llvm-17/lib/clang/17/include/opencl-c-base.h
  libclang-common-18-dev: /usr/lib/llvm-18/lib/clang/18/include/opencl-c-base.h
  libclang-common-19-dev: /usr/lib/llvm-19/lib/clang/19/include/opencl-c-base.h
  libclang-common-21-dev: /usr/lib/llvm-21/lib/clang/21/include/opencl-c-base.h
  libopencl-clang-14-dev: /usr/include/cclang/opencl-c-base.h
  libopencl-clang-17-dev: /usr/include/cclang/opencl-c-base.h
  libopencl-clang-18-dev: /usr/include/cclang/opencl-c-base.h
  libopencl-clang-19-dev: /usr/include/cclang/opencl-c-base.h
  libpocl2-common: /usr/share/pocl/include/opencl-c-base.h
  swiftlang: /usr/libexec/swift/lib/clang/17/include/opencl-c-base.h


It seems to me that something is missing in order to have a working OpenCL stack with rocm-openc-icd.

thanks for considering.

Frederic

#1125782#10
Date:
2026-02-06 02:36:25 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
rocm-hipamd, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1125782@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Cordell Bloor <cgmb@debian.org> (supplier of updated rocm-hipamd package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Thu, 05 Feb 2026 18:55:50 -0700
Source: rocm-hipamd
Architecture: source
Version: 6.4.3-5
Distribution: unstable
Urgency: medium
Maintainer: Debian ROCm Team <debian-ai@lists.debian.org>
Changed-By: Cordell Bloor <cgmb@debian.org>
Closes: 1125782
Changes:
 rocm-hipamd (6.4.3-5) unstable; urgency=medium
 .
   * Add libamd-comgr3 to rocm-opencl-icd dependencies
     (Closes: #1125782)
Checksums-Sha1:
 5a048a502698ce12be07fb328f2f814b126ac740 3118 rocm-hipamd_6.4.3-5.dsc
 1bb3b72c5f88b9971a93be681d86b6a95e1b4667 26308 rocm-hipamd_6.4.3-5.debian.tar.xz
 6e2eda9e02e2e4d2f1eaac803f9a0a2cf7a20aca 9476 rocm-hipamd_6.4.3-5_source.buildinfo
Checksums-Sha256:
 8b6d382cd754c6bbed700d19acc8ae9544c43bd07f5b09a80213acfd68e512bb 3118 rocm-hipamd_6.4.3-5.dsc
 c5fda2daaf8229fda9dbc65ed9d40ac8100f5d676f5fb9b84f237289681d65d9 26308 rocm-hipamd_6.4.3-5.debian.tar.xz
 4eccf9f2ee78e7404ce5f17d1aa6a3dbec82af5008fe66adbc8716f653b69b9d 9476 rocm-hipamd_6.4.3-5_source.buildinfo
Files:
 3f035fb4ba4e7b12ee3322de45733d50 3118 devel optional rocm-hipamd_6.4.3-5.dsc
 d86616ff3aeb5ce115a1c10cbede53bd 26308 devel optional rocm-hipamd_6.4.3-5.debian.tar.xz
 d512e60ff39fdac0e7b172e40b4450e0 9476 devel optional rocm-hipamd_6.4.3-5_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJEBAEBCgAuFiEEDOBv45KqSPjSLkRx+e+O4MAhYw8FAmmFSwIQHGNnbWJAZGVi
aWFuLm9yZwAKCRD5747gwCFjD4X0D/9bERXp2Htv4imk72Eio73isT/sQY/vmIen
TeJcT/dlymoug0P5Bf4Qok9ktkd04KCrgyZako2+pZi8RE6/GLUf2WdQ97oH83tL
3E38bXUvBUllUPi3eHkLXsu0VgGQmnbLfZ2UkB6g/6RczLWcsrz/cpPcgnbC90Aa
C3RPyotiCtYyymdmAA1+UQ52ICSWBTmrtt3iHMjqznyhLl3KtvmhcDqlmlQ3yHKJ
UHK68m2rUDy6qm/8kO5GN6D7hO51svLT0xateZ91MNP1vYNmwcI3t/fMFaJatH4B
6GBI3dcYHjwPUnghoAImoeTZefgQXvO3iXwUXuIxLnjQBjp9ClyX+dGxKOn3eclm
qGMPCSJ1y14yeF2fTFPeobtMVg4QhbdV5Ju8E62Qu7D+genIcdVK5TWqKIwppwDZ
uVJ9QuC12B6QwuFvZnd6Jmqwgbmj/gWLjROds1gR05SgjgfcnbwGOGhx5AqKLAb+
jfRq1RvMLrS9ndyKuHdNbHzrw38DB91XXxgB8huTP+hQTPFAtpE6g+qTcbCP9NaE
X7Adxf4WebO2Ga3RzxsEbrAsVVSYT5CUqeQnjyseexOtx83AX5f0Vypsdrwlfm5d
UbuYqKmit8G7kb8tM4bu9fsRRkkHtDkEteXI0bLJCRHsP1NNepg4+iZApSpuBwcC
qg5rNBDvXQ==
=/2ke
-----END PGP SIGNATURE-----