Install (or build) rocmprofiler on fedora

My current ROCm installation is achieved through the official fedora repo metapackage “rocm-devel”:

yikerman@rufus:~/Developer/rocprofiler$ dnf info rocm-devel
Updating and loading repositories:
Repositories loaded.
Installed packages
Name            : rocm-devel
Epoch           : 0
Version         : 6.3.1
Release         : 1.fc42
Architecture    : noarch
Installed size  : 1.0 KiB
Source          : rocm-6.3.1-1.fc42.src.rpm
From repository : updates
Summary         : Development environment for ROCm
URL             : 
License         : MIT
Description     : This is a meta package for all of the ROCm devel packages.
Vendor          : Fedora Project

As far as I know fedora doesn’t package rocmprof, so I have to build it from source. But it fails with:

yikerman@rufus:~/Developer/rocprofiler$ ./build.sh 
-- The C compiler identification is GNU 15.2.1
-- The CXX compiler identification is GNU 15.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at cmake_modules/rocprofiler_env.cmake:52 (find_package):
  Could not find a package configuration file provided by "hsakmt" with any
  of the following names:

    hsakmtConfig.cmake
    hsakmt-config.cmake

  Add the installation prefix of "hsakmt" to CMAKE_PREFIX_PATH or set
  "hsakmt_DIR" to a directory containing one of the above files.  If "hsakmt"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  CMakeLists.txt:78 (include)


-- Configuring incomplete, errors occurred!

And hsakmt is deprecated since it is now offered in hsa64-runtime as a static-linked private API. How do I install rocmprof now?

The current ROCm shipped with fedora 42 is 6.3.1, which requires this deprecated version.