I've been trying to pick up where @saitam work in building ROCm for solus. I've mostly had luck but as of yet I haven't been able to find a way around the permission error when building findlib. The current package.yml can be found here and the specific error is below:

+ make -j24 install DESTDIR=/home/build/YPKG/root/findlib/install
mkdir -p "usr/bin"
mkdir -p "usr/share/man"
make install-config
make[1]: Entering directory '/home/build/YPKG/root/findlib/build/findlib-1.8.1'
mkdir -p "`dirname \"/etc/findlib/findlib.conf\"`"
mkdir: cannot create directory ‘/etc/findlib’: Permission denied
make[1]: *** [Makefile:97: install-config] Error 1
make[1]: Leaving directory '/home/build/YPKG/root/findlib/build/findlib-1.8.1'
make: *** [Makefile:22: install] Error 2
Command '['/bin/bash', '--norc', '--noprofile', '/tmp/ypkg-installSG_JLM']' returned non-zero exit status 2
[Build] install failed

The only thing I was able to find is that permission errors are usually due to running configure without specifying the --prefix option. Attempting to either use the %configure macro or manually adding --prefix as %PREFIX% wasn't working due to the findlib configure being non-standard as far as I could tell. For reference the output of ./configure -h is also posted below:

usage: configure [options]
  -bindir path         where binaries are installed
  -mandir path         where manual pages are installed
  -sitelib path        set the location of the site-specific packages
  -config path         set the location of the configuration file
  -no-custom           don't link in custom runtime mode
  -system <systype>    override system type (esp. mingw and win32)
  -with-toolbox        also build the toolbox
  -no-topfind          don't install topfind script into stdlib directory
  -no-camlp4           don't install the camlp4 META file

Any assistance would be greatly appreciated! Hopefully if I haven't missed anything on the other libraries I will be ready to try building ROCm-OpenCL-Runtime and test if I can at least get OpenCL tests to run.

    SirRujak it's ignoring DESTDIR because they assume you are building for a local install only. You'll need to patch the Makefile to respect it.

    20 days later

    Thank you for the info! I was able to get findlib to compile and install with a simple patch so I appreciate you pointing me in the right direction. I am pretty sure I have ROCm-OpenCL-Runtime building and installing now. I have tried testing both with clinfo from the repositories and rocminfo that is built for ROCm but neither found my GPU. I have two theories for this but unfortunately I don't have enough exposure to really know where to go from here.

    Theory 1:
    In this pull request it says that there are three required kernel flags(CONFIG_HMM_MIRROR, CONFIG_DRM_AMDGPU_USERPTR, and CONFIG_HSA_AMD) and Solus currently only has the CONFIG_HSA_AMD flag active from what I can tell. I know very little about kernel flags sadly so can't really make heads or tails if the other two would do anything on kernel 5.5+.

    Theory 2:
    Assuming that it isn't the kernel flags causing it to fail there has been another issue reported to the ROCm repository where someone has had issues running it on a motherboard with an X570 chipset which is what I have. So if @saitam or anyone else interested is up for giving it a try I would be very appreciative!

    P.S. While it does build I haven't had time to clean up the package.yml files so apologies for anyone that ends up taking a look at them. The overall repository is a fork of @saitam original work and can be found here.

      I'm still waiting for someone to find an actual bug report asking for kernel flags to be enabled. I will continue to forget until someone does 😉

      2 months later

      SirRujak Recently, I found this thread. Currently, some effort is going on to package ROCm-OpenCL for Solus. The activities are bundled at this github repo. If you are interested you can join us here.