Trouble building ROCm

I have this issue [hsa-rocr] invalid target ID 'gfx1100' · Issue #870 · rocm-arch/rocm-arch · GitHub

The solution they offered is to build in clean chroot, but that doesn’t work for manjaro

You can use manjaro-chrootbuild to build packages in a clean chroot. After cloning the AUR package, run:

sudo chrootbuild -p <package-name> -c

I am having the same problem as Lycan, but when I tried to run the manjaro-chroot, it failed to build it due to missing dependencies. Isn’t it supposed to automatically install the dependencies or am I missing something? insight would be appreciated.

makepkg and chrootbuild only resolves dependencies avaialable in the repo.

If the build requires a dependency from AUR - manually resolve by cloning → buidling and installing the dependency.

1 Like

You’ll need to build them first. Then you can install them in the chroot:

sudo chrootbuild -p <package-name> -c -i </path/to/package/package-1.pkg.tar.zst> -i </path/to/package/package-2.pkg.tar.zst>

hsa-rocr depends on hsakmt-roct and rocm-device-libs
rocm-device-libs depends on rocm-cmake and rocm-llvm

I am missing the last step on how to actually install the packages, sudo make install??

I think the result is a *.pkg.tar.zst file - an installable package
you install it like any other such package with:
pacman -U (path_to_file)
and inside the chroot with the -i option

Final working script

# Create a clean directory
mkdir -p ~/GIT && cd GIT
# Clone all requirements
git clone https://aur.archlinux.org/rocm-llvm.git
git clone https://aur.archlinux.org/rocm-cmake.git
git clone https://aur.archlinux.org/rocm-device-libs.git
git clone https://aur.archlinux.org/hsakmt-roct.git
git clone https://aur.archlinux.org/hsa-rocr.git
# Build all packages
sudo chrootbuild -p hsakmt-roct -c 
sudo chrootbuild -p rocm-cmake -c
sudo chrootbuild -p rocm-llvm -c
sudo chrootbuild -p rocm-device-libs -c -i rocm-cmake-5.3.0-1-x86_64.pkg.tar.zst -i rocm-llvm-5.3.0-1-x86_64.pkg.tar.zst
sudo chrootbuild -p hsa-rocr -c -i hsakmt-roct-5.3.0-1-x86_64.pkg.tar.zst -i rocm-device-libs-5.3.0-1-x86_64.pkg.tar.zst -i rocm-cmake-5.3.0-1-x86_64.pkg.tar.zst -i rocm-llvm-5.3.0-1-x86_64.pkg.tar.zst
# Install hsa-rocr
pamac install hsa-rocr-5.3.0-1-x86_64.pkg.tar.zst
2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.