Rocm could not find /opt/rocm/llvm/lib/cmake/llvm/

GROMACS version: 2025.2
GROMACS modification: No
GPU CARD : RX7900XT
ROCM VERSION : 6.4.1 (6.2 also encounter this problem)
Hi everyone,
I follow the installation guide Installation guide - GROMACS 2025.2 documentation

when cmake adaptivecpp, it said
" CMake Warning at CMakeLists.txt:302 (message):
Could not find LLVM in the requested location
LLVM_DIR=/opt/rocm/llvm/lib/cmake/llvm/; using LLVM_DIR-NOTFOUND."

I have install rocm through amd installation guide Debian AMDGPU installer installation — ROCm installation (Linux)

“amdgpu-install --usecase=hiplibsdk,rocm --no-dkms”

and I check the directory “/llvm/lib/cmake/llvm/” was not exist indeed.

what should I do to repair this problem?

thanks!

Hi!

Do you have rocm-llvm-dev6.4.1 package installed? The amdgpu-install script does not always install it, but it should be available via normal apt install.

Just to clarify: the error says “LLVM_DIR=/opt/rocm/llvm/lib/cmake/llvm/; using LLVM_DIR-NOTFOUND.”, but you’re later saying that “/llvm/lib/cmake/llvm/” does not exist. To be clear: that’s /opt/rocm/llvm/lib/cmake/llvm/ that we actually need here, not /llvm/lib/cmake/llvm/.

1 Like

yes, it’s /opt/rocm/llvm/lib/cmake/llvm/ , I mean this path.

after apt install rocm-llvm-dev6.4.1, the problem was resolved, thank you!

by the way, I try other packages, apt install rocm-llvm , it said i already install rocm-llvm

apt install rocm-llvm6.4.1 failed with same reason, does dev6.4.1 only work? or some other reason?

Glad that your issue is solved!

rocm-llvm6.4.1 is required, but not sufficient. rocm-llvm-dev6.4.1 package has some additional files that AdaptiveCpp needs.

i got it , thank you very much!

1 Like