[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1108159: marked as done (libamdhip64-dev: CMakeDetermineHIPCompiler.cmake unable to find HIP runtime CMake package)



Your message dated Mon, 23 Jun 2025 10:10:11 -0600
with message-id <595de46a-0d93-4e31-b68c-95d20fbc268a@slerp.xyz>
and subject line Closing as per reporter request
has caused the Debian Bug report #1108159,
regarding libamdhip64-dev: CMakeDetermineHIPCompiler.cmake unable to find HIP runtime CMake package
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1108159: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1108159
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libamdhip64-dev
Version: 5.7.1-6
Severity: normal
X-Debbugs-Cc: spaarshthakkar11010@gmail.com, cgmb@slerp.xyz, debian-ai@lists.debian.org

Dear Maintainer,

I am trying to enable ROCm in dbcsr[1] and one of the dependencies is libamdhip64-dev since it contains the hip-config.cmake file. When I try to build my package, it fails with the following error message:
```
-- The HIP compiler identification is unknown
CMake Error at /usr/share/cmake-3.31/Modules/CMakeDetermineHIPCompiler.cmake:217 (message):
  The ROCm root directory:

   /usr

  does not contain the HIP runtime CMake package, expected at one of:

   /usr/lib/cmake/hip-lang/hip-lang-config.cmake
   /usr/lib64/cmake/hip-lang/hip-lang-config.cmake

Call Stack (most recent call first):
  CMakeLists.txt:277 (enable_language)
```
The issue is that debian stores the hip-config.cmake file at `/usr/lib/x86_64-linux-gnu/cmake/hip/hip-config.cmake`.

It does not work even if I try to pass the location of the file explicitly via `CMAKE_HIP_COMPILER_ROCM_LIB` flag during building the package, due to the hardcoded logic in  `CMakeDetermineHIPCompiler.cmake`, it appends the `CMAKE_HIP_COMPILER_ROCM_LIB` variable with `/lib/cmake` or `/lib64/cmake`:
```
set(_CMAKE_HIP_COMPILER_ROCM_LIB_DIRS
      "${CMAKE_HIP_COMPILER_ROCM_ROOT}/lib"
      "${CMAKE_HIP_COMPILER_ROCM_ROOT}/lib64"
      )
```

I am not entirely sure if this is a `libamdhip64-dev` bug or something related to `CMake`.

My dbcsr fork can be found here[2] and I am using a docker container.

Additional Information:
CMake version: 3.31.6

Regards,
Spaarsh

[1]: https://salsa.debian.org/debichem-team/dbcsr/
[2]: https://salsa.debian.org/Spaarsh/dbcsr/

Note: This is a docker container.
-- System Information:
Debian Release: trixie/sid
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-37-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect

Versions of packages libamdhip64-dev depends on:
ii  libamd-comgr-dev     6.0+git20231212.4510c28+dfsg-3+b2
ii  libamdhip64-5        5.7.1-6
ii  libhiprtc-builtins5  5.7.1-6
ii  libhsa-runtime-dev   6.1.2-3

libamdhip64-dev recommends no packages.

Versions of packages libamdhip64-dev suggests:
pn  hipcc            <none>
pn  libamdhip64-doc  <none>

-- no debconf information

--- End Message ---
--- Begin Message ---
Dear Maintainer,

The CMake support for the HIP language does not support using hipcc as the CMAKE_HIP_COMPILER as was being attempted by the original reporter. The problem was resolved by setting clang++-17 as the CMAKE_HIP_COMPILER via the HIPCXX environment variable.

Sincerely,
Cory Bloor

--- End Message ---

Reply to: