https://bugzilla.redhat.com/show_bug.cgi?id=2209759

Philipp K. <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]



--- Comment #3 from Philipp K. <[email protected]> ---
I really like this moving forward :)
In fact I once tried to package ROCM 3.9 on my own, and sifted through some of
my patches, and it seems some might still be noteworthy. Note that I am usually
not a packager, so it is quite likely that one or the other things needs some
polishing. I will go through some of them one comment at a time, to structure
this stuff a bit.

Regarding the device libs, I also ran in the issue with clang not finding them
in the default paths. Clang seems to expect them in whatever `clang
--print-resource-dir` returns. My spec file accordingly contained the
following:

> %define clang_resource_dir "%(clang --print-resource-dir)"
>
> # TODO: usually cmake would install the .bc files to /usr/amdgcn/bincode/
> #       Moving things to the clang resource dir should be the best choice 
> currently:
> #       https://reviews.llvm.org/D82930
> mkdir -p %{buildroot}%{clang_resource_dir}
> mv %{buildroot}%{_prefix}/amdgcn %{buildroot}%{clang_resource_dir}/
> mv %{buildroot}%{_prefix}/lib/cmake %{buildroot}%{_libdir}

In order to make other depending packages find the moved device libs, my builds
also contained the following patch

From 861de633dd5c6c9ecefa2adf49872f337ee9daa6 Mon Sep 17 00:00:00 2001
From: Philipp Knechtges <[email protected]>
Date: Mon, 23 Nov 2020 19:40:05 +0100
Subject: [PATCH] adjust CMake Target to match install path

---
 cmake/Packages.cmake | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cmake/Packages.cmake b/cmake/Packages.cmake
index 715ed95..55569cd 100644
--- a/cmake/Packages.cmake
+++ b/cmake/Packages.cmake
@@ -30,6 +30,9 @@ foreach(p ${count})
   set(AMD_DEVICE_LIBS_PREFIX_CODE "${AMD_DEVICE_LIBS_PREFIX_CODE}
 get_filename_component(AMD_DEVICE_LIBS_PREFIX \"\${AMD_DEVICE_LIBS_PREFIX}\"
PATH)")
 endforeach()
+
+execute_process(COMMAND clang --print-resource-dir OUTPUT_VARIABLE
CLANG_RESOURCE_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
+set(AMD_DEVICE_LIBS_PREFIX_CODE "set(AMD_DEVICE_LIBS_PREFIX
\"${CLANG_RESOURCE_DIR}\" )")
 set(AMD_DEVICE_LIBS_TARGET_CODE)
 foreach(target ${AMDGCN_LIB_LIST})
   get_target_property(target_name ${target} ARCHIVE_OUTPUT_NAME)
-- 
2.28.0

I suspect I mostly did this for comgr to find the device libs in their new
location. I did not execute anything, but from inspecting the github code, this
patch might still be applicable.


-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
https://bugzilla.redhat.com/show_bug.cgi?id=2209759
_______________________________________________
package-review mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to