From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9D67B15800F for ; Fri, 10 Feb 2023 04:26:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A72C3E07A9; Fri, 10 Feb 2023 04:26:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1E51EE07A9 for ; Fri, 10 Feb 2023 04:26:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 204E2335D3C for ; Fri, 10 Feb 2023 04:26:15 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 57A47531 for ; Fri, 10 Feb 2023 04:26:13 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1676003142.794758cd9e9393bccfddf89d160810220a5913df.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-opencl-runtime/, dev-libs/rocm-opencl-runtime/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/rocm-opencl-runtime/files/rocclr-5.3.3-fix-include.patch dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3-r1.ebuild dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3.ebuild X-VCS-Directories: dev-libs/rocm-opencl-runtime/ dev-libs/rocm-opencl-runtime/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 794758cd9e9393bccfddf89d160810220a5913df X-VCS-Branch: master Date: Fri, 10 Feb 2023 04:26:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 96723cb9-92cf-4bcd-aaab-5e3f95915fe2 X-Archives-Hash: c267dbe5e30e257447b89ead162739f3 commit: 794758cd9e9393bccfddf89d160810220a5913df Author: Yiyang Wu gmail com> AuthorDate: Fri Feb 10 03:53:33 2023 +0000 Commit: Sam James gentoo org> CommitDate: Fri Feb 10 04:25:42 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=794758cd dev-libs/rocm-opencl-runtime: fix rocclr compile issue Due to bbff88f734f62381b0a0624b4b2d182a8d4b8589, /usr/include/hsa.h is gone, so backport patch for rocclr to fix compile error. Also remove the unused prefix.eclass inherit Closes: https://bugs.gentoo.org/893602 Signed-off-by: Yiyang Wu gmail.com> Signed-off-by: Sam James gentoo.org> .../files/rocclr-5.3.3-fix-include.patch | 218 +++++++++++++++++++++ .../rocm-opencl-runtime-5.3.3-r1.ebuild | 3 +- .../rocm-opencl-runtime-5.3.3.ebuild | 122 ------------ 3 files changed, 220 insertions(+), 123 deletions(-) diff --git a/dev-libs/rocm-opencl-runtime/files/rocclr-5.3.3-fix-include.patch b/dev-libs/rocm-opencl-runtime/files/rocclr-5.3.3-fix-include.patch new file mode 100644 index 000000000000..e014fe374bec --- /dev/null +++ b/dev-libs/rocm-opencl-runtime/files/rocclr-5.3.3-fix-include.patch @@ -0,0 +1,218 @@ +For https://bugs.gentoo.org/893602 +================================== +From 197ea6f76f34e0b3c8ab46d96c2fa5014e467e37 Mon Sep 17 00:00:00 2001 +From: Maneesh Gupta +Date: Fri, 5 Aug 2022 05:42:39 +0000 +Subject: [PATCH] SWDEV-350289 - Fix build warnings due to file re-org + +Change-Id: I0066fa163b9f25fdde4c5b3baed1ef0654390c06 +--- + device/comgrctx.hpp | 2 +- + device/devkernel.hpp | 2 +- + device/devprogram.hpp | 2 +- + device/rocm/pro/prodevice.cpp | 2 +- + device/rocm/pro/prodriver.hpp | 2 +- + device/rocm/roccounters.hpp | 2 +- + device/rocm/rocdevice.hpp | 8 ++++---- + device/rocm/rocglinterop.hpp | 2 +- + device/rocm/rockernel.cpp | 2 +- + device/rocm/rocprogram.cpp | 2 +- + device/rocm/rocsignal.hpp | 4 ++-- + device/rocm/rocvirtual.cpp | 4 ++-- + device/rocm/rocvirtual.hpp | 8 ++++---- + 13 files changed, 21 insertions(+), 21 deletions(-) + +diff --git a/device/comgrctx.hpp b/device/comgrctx.hpp +index d69506e2..31ee24e1 100644 +--- a/device/comgrctx.hpp ++++ b/device/comgrctx.hpp +@@ -23,7 +23,7 @@ + #include + #if defined(USE_COMGR_LIBRARY) + #include "top.hpp" +-#include "amd_comgr.h" ++#include "amd_comgr/amd_comgr.h" + + namespace amd { + typedef void (*t_amd_comgr_get_version)(size_t *major, size_t *minor); +diff --git a/device/devkernel.hpp b/device/devkernel.hpp +index 19b3212d..b256abf3 100644 +--- a/device/devkernel.hpp ++++ b/device/devkernel.hpp +@@ -105,7 +105,7 @@ struct RuntimeHandle { + uint32_t group_segment_size; //!< From GROUP_SEGMENT_FIXED_SIZE + }; + +-#include "amd_comgr.h" ++#include "amd_comgr/amd_comgr.h" + + // for Code Object V3 + enum class ArgField : uint8_t { +diff --git a/device/devprogram.hpp b/device/devprogram.hpp +index 099d6a37..741d81b0 100644 +--- a/device/devprogram.hpp ++++ b/device/devprogram.hpp +@@ -29,7 +29,7 @@ + #include "devwavelimiter.hpp" + + #if defined(USE_COMGR_LIBRARY) +-#include "amd_comgr.h" ++#include "amd_comgr/amd_comgr.h" + #endif // defined(USE_COMGR_LIBRARY) + + namespace amd { +diff --git a/device/rocm/pro/prodevice.cpp b/device/rocm/pro/prodevice.cpp +index a0e49461..1e366cd2 100644 +--- a/device/rocm/pro/prodevice.cpp ++++ b/device/rocm/pro/prodevice.cpp +@@ -20,7 +20,7 @@ + + #ifndef WITHOUT_HSA_BACKEND + +-#include "hsa_ext_amd.h" ++#include "hsa/hsa_ext_amd.h" + #include "lnxheaders.h" + #include "prodevice.hpp" + #include "amdgpu_drm.h" +diff --git a/device/rocm/pro/prodriver.hpp b/device/rocm/pro/prodriver.hpp +index bc420697..819ade27 100644 +--- a/device/rocm/pro/prodriver.hpp ++++ b/device/rocm/pro/prodriver.hpp +@@ -23,7 +23,7 @@ + #ifndef WITHOUT_HSA_BACKEND + + #include "top.hpp" +-#include "hsa.h" ++#include "hsa/hsa.h" + + /*! \addtogroup HSA + * @{ +diff --git a/device/rocm/roccounters.hpp b/device/rocm/roccounters.hpp +index ffc9fad0..45ebbe66 100644 +--- a/device/rocm/roccounters.hpp ++++ b/device/rocm/roccounters.hpp +@@ -24,7 +24,7 @@ + #include "top.hpp" + #include "device/device.hpp" + #include "device/rocm/rocdevice.hpp" +-#include "hsa_ven_amd_aqlprofile.h" ++#include "hsa/hsa_ven_amd_aqlprofile.h" + + namespace roc { + +diff --git a/device/rocm/rocdevice.hpp b/device/rocm/rocdevice.hpp +index d8cb4c6c..44339bb9 100644 +--- a/device/rocm/rocdevice.hpp ++++ b/device/rocm/rocdevice.hpp +@@ -40,10 +40,10 @@ + #include "device/rocm/rocprintf.hpp" + #include "device/rocm/rocglinterop.hpp" + +-#include "hsa.h" +-#include "hsa_ext_image.h" +-#include "hsa_ext_amd.h" +-#include "hsa_ven_amd_loader.h" ++#include "hsa/hsa.h" ++#include "hsa/hsa_ext_image.h" ++#include "hsa/hsa_ext_amd.h" ++#include "hsa/hsa_ven_amd_loader.h" + + #include + #include +diff --git a/device/rocm/rocglinterop.hpp b/device/rocm/rocglinterop.hpp +index a539cc6f..588d8a6f 100644 +--- a/device/rocm/rocglinterop.hpp ++++ b/device/rocm/rocglinterop.hpp +@@ -34,7 +34,7 @@ typedef __GLXcontextRec* GLXContext; + + #include "device/rocm/mesa_glinterop.h" + #include "device/rocm/rocregisters.hpp" +-#include "hsa_ext_amd.h" ++#include "hsa/hsa_ext_amd.h" + + namespace roc { + +diff --git a/device/rocm/rockernel.cpp b/device/rocm/rockernel.cpp +index 76ab76ad..5624c877 100644 +--- a/device/rocm/rockernel.cpp ++++ b/device/rocm/rockernel.cpp +@@ -19,7 +19,7 @@ + THE SOFTWARE. */ + + #include "rockernel.hpp" +-#include "amd_hsa_kernel_code.h" ++#include "hsa/amd_hsa_kernel_code.h" + + #include + +diff --git a/device/rocm/rocprogram.cpp b/device/rocm/rocprogram.cpp +index e4559645..4f77026d 100644 +--- a/device/rocm/rocprogram.cpp ++++ b/device/rocm/rocprogram.cpp +@@ -25,7 +25,7 @@ + #include "utils/options.hpp" + #include "rockernel.hpp" + +-#include "amd_hsa_kernel_code.h" ++#include "hsa/amd_hsa_kernel_code.h" + + #include + #include +diff --git a/device/rocm/rocsignal.hpp b/device/rocm/rocsignal.hpp +index 3e8c1e6e..fff310d5 100644 +--- a/device/rocm/rocsignal.hpp ++++ b/device/rocm/rocsignal.hpp +@@ -22,7 +22,7 @@ + + #include "device/devsignal.hpp" + +-#include ++#include "hsa/hsa.h" + + namespace roc { + +@@ -44,4 +44,4 @@ public: + } + }; + +-}; +\ No newline at end of file ++}; +diff --git a/device/rocm/rocvirtual.cpp b/device/rocm/rocvirtual.cpp +index 63b96378..1b6287e9 100644 +--- a/device/rocm/rocvirtual.cpp ++++ b/device/rocm/rocvirtual.cpp +@@ -33,8 +33,8 @@ + #include "platform/sampler.hpp" + #include "utils/debug.hpp" + #include "os/os.hpp" +-#include "amd_hsa_kernel_code.h" +-#include "amd_hsa_queue.h" ++#include "hsa/amd_hsa_kernel_code.h" ++#include "hsa/amd_hsa_queue.h" + + #include + #include +diff --git a/device/rocm/rocvirtual.hpp b/device/rocm/rocvirtual.hpp +index 6c738776..1bb0868c 100644 +--- a/device/rocm/rocvirtual.hpp ++++ b/device/rocm/rocvirtual.hpp +@@ -24,11 +24,11 @@ + #include "rocdefs.hpp" + #include "rocdevice.hpp" + #include "utils/util.hpp" +-#include "hsa.h" +-#include "hsa_ext_image.h" +-#include "hsa_ext_amd.h" ++#include "hsa/hsa.h" ++#include "hsa/hsa_ext_image.h" ++#include "hsa/hsa_ext_amd.h" + #include "rocprintf.hpp" +-#include "hsa_ven_amd_aqlprofile.h" ++#include "hsa/hsa_ven_amd_aqlprofile.h" + #include "rocsched.hpp" + + namespace roc { +-- +2.39.1 + diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3-r1.ebuild b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3-r1.ebuild index 88142c6e203e..169deaf37b79 100644 --- a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3-r1.ebuild +++ b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3-r1.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit cmake edo flag-o-matic prefix +inherit cmake edo flag-o-matic DESCRIPTION="Radeon Open Compute OpenCL Compatible Runtime" HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime" @@ -37,6 +37,7 @@ src_prepare() { # Bug #753377 # patch re-enables accidentally disabled gfx800 family eapply "${FILESDIR}/${PN}-5.0.2-enable-gfx800.patch" + eapply "${FILESDIR}/rocclr-${PV}-fix-include.patch" popd || die } diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3.ebuild b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3.ebuild deleted file mode 100644 index 1dc7f3cf3345..000000000000 --- a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3.ebuild +++ /dev/null @@ -1,122 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit cmake edo flag-o-matic prefix - -DESCRIPTION="Radeon Open Compute OpenCL Compatible Runtime" -HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime" -SRC_URI="https://github.com/ROCm-Developer-Tools/ROCclr/archive/rocm-${PV}.tar.gz -> rocclr-${PV}.tar.gz - https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-${PV}.tar.gz -> rocm-opencl-runtime-${PV}.tar.gz" - -LICENSE="Apache-2.0 MIT" -SLOT="0/$(ver_cut 1-2)" -IUSE="debug test" -RESTRICT="!test? ( test )" -KEYWORDS="~amd64" - -RDEPEND=">=dev-libs/rocr-runtime-${PV} - >=dev-libs/rocm-comgr-${PV} - >=dev-libs/rocm-device-libs-${PV} - >=virtual/opencl-3 - media-libs/mesa" -DEPEND="${RDEPEND}" -BDEPEND=">=dev-util/rocm-cmake-${PV} - media-libs/glew - test? ( >=x11-apps/mesa-progs-8.5.0[X] ) - " - -PATCHES=( - "${FILESDIR}/${PN}-3.5.0-do-not-install-libopencl.patch" -) - -S="${WORKDIR}/ROCm-OpenCL-Runtime-rocm-${PV}" -S1="${WORKDIR}/ROCclr-rocm-${PV}" - -src_prepare() { - # Remove "clinfo" - use "dev-util/clinfo" instead - #[ -d tools/clinfo ] && rm -rf tools/clinfo || die - - cmake_src_prepare - - hprefixify amdocl/CMakeLists.txt - - sed -e "s/DESTINATION lib/DESTINATION ${CMAKE_INSTALL_LIBDIR}/g" -i packaging/CMakeLists.txt || die - # remove trailing CR or it won't work - sed -e "s/\r$//g" -i tests/ocltst/module/perf/oclperf.exclude || die - - pushd ${S1} || die - # Bug #753377 - # patch re-enables accidentally disabled gfx800 family - eapply "${FILESDIR}/${PN}-5.0.2-enable-gfx800.patch" - popd || die -} - -src_configure() { - # Reported upstream: https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/120 - append-cflags -fcommon - - local mycmakeargs=( - -Wno-dev - -DROCCLR_PATH="${S1}" - -DAMD_OPENCL_PATH="${S}" - -DROCM_PATH="${EPREFIX}/usr" - -DBUILD_TESTS=$(usex test ON OFF) - -DEMU_ENV=ON - # -DCMAKE_STRIP="" - ) - cmake_src_configure -} - -src_install() { - insinto /etc/OpenCL/vendors - doins config/amdocl64.icd - - cd "${BUILD_DIR}" || die - insinto /usr/lib64 - doins amdocl/libamdocl64.so - doins tools/cltrace/libcltrace.so -} - -# Copied from rocm.eclass. This ebuild does not need amdgpu_targets -# USE_EXPANDS, so it should not inherit rocm.eclass; it only uses the -# check_amdgpu function in src_test. Rename it to check-amdgpu to avoid -# pkgcheck warning. -check-amdgpu() { - for device in /dev/kfd /dev/dri/render*; do - addwrite ${device} - if [[ ! -r ${device} || ! -w ${device} ]]; then - eerror "Cannot read or write ${device}!" - eerror "Make sure it is present and check the permission." - ewarn "By default render group have access to it. Check if portage user is in render group." - die "${device} inaccessible" - fi - done -} - -src_test() { - check-amdgpu - cd "${BUILD_DIR}"/tests/ocltst || die - export OCL_ICD_FILENAMES="${BUILD_DIR}"/amdocl/libamdocl64.so - local instruction1="Please start an X server using amdgpu driver (not Xvfb!)," - local instruction2="and export OCLGL_DISPLAY=\${DISPLAY} OCLGL_XAUTHORITY=\${XAUTHORITY} before reruning the test." - if [[ -n ${OCLGL_DISPLAY+x} ]]; then - export DISPLAY=${OCLGL_DISPLAY} - export XAUTHORITY=${OCLGL_XAUTHORITY} - ebegin "Running oclgl test under DISPLAY ${OCLGL_DISPLAY}" - if ! glxinfo | grep "OpenGL vendor string: AMD"; then - ewarn "${instruction1}" - ewarn "${instruction2}" - die "This display does not have AMD OpenGL vendor!" - fi - ./ocltst -m liboclgl.so -A ogl.exclude - eend $? || die "oclgl test failed" - else - ewarn "${instruction1}" - ewarn "${instruction2}" - die "\${OCLGL_DISPLAY} not set." - fi - edob ./ocltst -m liboclruntime.so -A oclruntime.exclude - edob ./ocltst -m liboclperf.so -A oclperf.exclude -}