Skip to content

Instantly share code, notes, and snippets.

@ulyssesrr
Created August 31, 2019 01:06
Show Gist options
  • Save ulyssesrr/f78e5043e29be20224763bd0ddcdf8ed to your computer and use it in GitHub Desktop.
Save ulyssesrr/f78e5043e29be20224763bd0ddcdf8ed to your computer and use it in GitHub Desktop.
PKGBUILD for rocr-runtime v2.7.0
# Maintainer: Jakub Okoński <jakub@okonski.org>
pkgname=rocr-runtime
pkgver=2.7.0
pkgrel=1
pkgdesc="ROCm HSA"
arch=(x86_64)
url="https://github.com/RadeonOpenCompute/ROCR-Runtime"
license=('unknown')
makedepends=(git cmake gcc ninja)
depends=('roct-thunk-interface')
source=("https://github.com/RadeonOpenCompute/ROCR-Runtime/archive/roc-$pkgver.tar.gz")
sha256sums=("726b6556d4072caa35e751e067f4e5dd283583ed0aff49d72af14e0449bfe318")
build() {
mkdir -p "$srcdir/build"
cd "$srcdir/build"
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$pkgdir/opt/rocm \
-DCMAKE_PREFIX_PATH=/opt/rocm/libhsakmt \
-DHSAKMT_INC_PATH=/opt/rocm/include \
-DHSAKMT_LIB_PATH=/opt/rocm/lib64 \
-G Ninja \
"$srcdir/ROCR-Runtime-roc-$pkgver/src"
ninja
}
package() {
ninja -C "$srcdir/build" install
mkdir -p "$pkgdir/etc/ld.so.conf.d"
cat <<-EOF > $pkgdir/etc/ld.so.conf.d/rocm-runtime.conf
/opt/rocm/lib
/opt/rocm/hsa/lib/
EOF
}
@trougnouf
Copy link

I get /usr/bin/ld: cannot find -lhsakmt

@ulyssesrr
Copy link
Author

You should have /opt/rocm/lib64/libhsakmt.so as it's part of the roct-thunk-interface dependency, could you paste(bin) the output of pacman -Qil roct-thunk-interface

If the lib file above exists, does sudo ldconfig before building solves the problem?

@joeftiger
Copy link

joeftiger commented Sep 11, 2019

I get /usr/bin/ld: cannot find -lhsakmt

I fixed the issue by changing line 21 from
-DHSAKMT_LIB_PATH=/opt/rocm/lib64 \
to
-DHSAKMT_LIB_PATH=/opt/rocm/lib \

It builds without problems now, since the library is in another folder

@trougnouf
Copy link

I get /usr/bin/ld: cannot find -lhsakmt

I fixed the issue by changing line 21 from
-DHSAKMT_LIB_PATH=/opt/rocm/lib64 \
to
-DHSAKMT_LIB_PATH=/opt/rocm/lib \

It builds without problems now, since the library is in another folder

That worked, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment