There is a related issue once finding hip-lang-config.cmake is handled. The
next problem is this:

    CMake Error at /usr/share/cmake-3.25/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):       By not providing "Findamd_comgr.cmake" in CMAKE_MODULE_PATH this project
      has asked CMake to find a package configuration file provided by
      "amd_comgr", but CMake did not find one.

      Could not find a package configuration file provided by "amd_comgr" with
      any of the following names:

        amd_comgrConfig.cmake
        amd_comgr-config.cmake

      Add the installation prefix of "amd_comgr" to CMAKE_PREFIX_PATH or set
      "amd_comgr_DIR" to a directory containing one of the above files.  If
      "amd_comgr" provides a separate development package or SDK, be sure it has
      been installed.
    Call Stack (most recent call first):
/usr/lib/x86_64-linux-gnu/cmake/hip-lang/hip-lang-config.cmake:98 (find_dependency)       /usr/share/cmake-3.25/Modules/CMakeHIPInformation.cmake:146 (find_package) /root/build/CMakeFiles/CMakeScratch/TryCompile-9ltYBc/CMakeLists.txt:2 (project)


    CMake Error at /usr/share/cmake-3.25/Modules/CMakeDetermineCompilerABI.cmake:57 (try_compile):
      Failed to configure test project build system.
    Call Stack (most recent call first):
      /usr/share/cmake-3.25/Modules/CMakeTestHIPCompiler.cmake:29 (CMAKE_DETERMINE_COMPILER_ABI)
      CMakeLists.txt:6 (enable_language)


    -- Configuring incomplete, errors occurred!

I haven't pinned down the exact cause, but I think this is because
project(example LANGUAGE HIP) will call hip-lang-config.cmake before
CMAKE_HIP_LIBRARY_ARCHITECTURE is detected and therefore
/usr/lib/x86_64-linux-gnu/amd_comgr is not in the search path. It only checks
/usr/lib/amd_comgr. You can workaround the issue by passing the architecture
explicitly or by adding /usr/lib/x86_64-linux-gnu/amd_comgr to your PATH.

It's not immediately clear to me whether this aspect of the failure should be
considered a HIP bug or a CMake bug. I'm tempted to ask for some advice from
upstream.

Reply via email to