Summary: | dev-util/hip-4.3.0-r1 - /.../command.hpp: error: CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR was not declared in this scope | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Current packages | Assignee: | Gentoo Science Related Packages <sci> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | candrews, dschridde+gentoobugs, gentoo, ionen, kamikaze.is.waiting.you, lssndrbarbieri, nowa, paul |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
emerge-info.txt
dev-util:hip-4.1.0:20210514-085345.log emerge-history.txt environment etc.portage.tar.bz2 logs.tar.bz2 temp.tar.bz2 fix-opencl-headers-2021.04.29-compat.patch |
Description
Toralf Förster
![]() Created attachment 708357 [details]
emerge-info.txt
Created attachment 708360 [details]
dev-util:hip-4.1.0:20210514-085345.log
Created attachment 708363 [details]
emerge-history.txt
Created attachment 708366 [details]
environment
Created attachment 708369 [details]
etc.portage.tar.bz2
Created attachment 708372 [details]
logs.tar.bz2
Created attachment 708375 [details]
temp.tar.bz2
2021-05-14T08:05:53 >>> dev-util/opencl-headers-2021.04.29 It uses the system's if available and it's incompatible with 2021.04.29 If missing, builds fine using bundled headers. (In reply to Ionen Wolkens from comment #8) > 2021-05-14T08:05:53 >>> dev-util/opencl-headers-2021.04.29 > > It uses the system's if available and it's incompatible with 2021.04.29 > > If missing, builds fine using bundled headers. Very interesting discovery. We need to file an upstream bug to hip to update it to be compatible with the newest opencl headers. Issue persists in dev-util/hip-4.3.0. Created attachment 737860 [details, diff] fix-opencl-headers-2021.04.29-compat.patch (In reply to Benda Xu from comment #9) > (In reply to Ionen Wolkens from comment #8) > > 2021-05-14T08:05:53 >>> dev-util/opencl-headers-2021.04.29 > > > > It uses the system's if available and it's incompatible with 2021.04.29 > > > > If missing, builds fine using bundled headers. > > Very interesting discovery. We need to file an upstream bug to hip to > update it to be compatible with the newest opencl headers. https://github.com/ROCm-Developer-Tools/ROCclr/pull/25 (In reply to Dennis Schridde from comment #11) > Created attachment 737860 [details, diff] [details, diff] > fix-opencl-headers-2021.04.29-compat.patch > > (In reply to Benda Xu from comment #9) > > (In reply to Ionen Wolkens from comment #8) > > > 2021-05-14T08:05:53 >>> dev-util/opencl-headers-2021.04.29 > > > > > > It uses the system's if available and it's incompatible with 2021.04.29 > > > > > > If missing, builds fine using bundled headers. > > > > Very interesting discovery. We need to file an upstream bug to hip to > > update it to be compatible with the newest opencl headers. > > https://github.com/ROCm-Developer-Tools/ROCclr/pull/25 This also needs an addition to `src_prepare` of dev-util/hip-4.3.0, since different source code files appear to use different OpenCL headers (system or bundled) and we need to force it to use the system OpenCL headers, except for the AMD extensions in `CL/cl_ext.h`: ``` rm amdocl/CL/cl{,_icd,_gl,_gl_ext,_platform}.h sed -i 's/CL_EXT_SUFFIX/CL_API_SUFFIX/' \ amdocl/CL/cl_icd_amd.h \ amdocl/CL/cl_ext.h \ rocclr/cl_lqdflash_amd.h ``` FOREWORD NOTE... The identical errors as this issue also occurs with dev-util/hip-4.3.0::gentoo --which I have resolved after reading this bug report and exploring lines + looking at code, thus, I am posting my resolution in this comment here instead of creating a new issue. While I believe this fix will fix both versions, I did not test dev-util/hip-4.1.0 so please accept my apologies if it doesn't completely resolve the issues with v4.1.0. 1) A side note: I have been able to compile dev-libs/rocclr-4.3.0 without any fix-opencl-headers-2021.04.29-compat.patch. That said, I have dev-util/opencl-headers-2021.06.30::gentoo installed not the 2021.04.29 version. (To me it appears this patch is not required at all.) 2) dev-util/hip-4.3.0 will compile without issues by adding the following to the dev-util/hip-4.3.0::gentoo ebuild: $ diff /var/db/repos/gentoo/dev-util/hip/hip-4.3.0.ebuild /var/db/repos/local/dev-util/hip/hip-4.3.0.ebuild 54a55,58 > rm amdocl/CL/cl{,_icd,_gl,_gl_ext,_platform}.h > sed -i 's/CL_EXT_SUFFIX/CL_API_SUFFIX/' amdocl/cl_icd_amd.h amdocl/cl_ext.h rocclr/cl_lqdflash_amd.h > sed -i 's/CL_EXT_SUFFIX/CL_API_SUFFIX/' amdocl/CL/cl_icd_amd.h amdocl/CL/cl_ext.h in src_prepare(). Essentially I added one more sed line to the rm and sed lines presented in Comment 12 since I was still getting the same compilation errors. (Looking at the errors and the code, I realized I needed to add an identical sed line that does not have "CL/" in it.) This fixed all compilation issues leading to a successful installation of dev-util/hip-4.3.0 and dependent packages. Along with my ::local dev-util/hip, I now have these ::gentoo v4.3.0 ROCm-related packages installed: dev-util/hip-4.3.0::local -debug -profile dev-util/opencl-headers-2021.06.30::gentoo dev-libs/rocr-runtime-4.3.0::gentoo dev-libs/roct-thunk-interface-4.3.0::gentoo dev-util/rocm-cmake-4.3.0::gentoo dev-util/rocminfo-4.3.0::gentoo sys-devel/llvm-roc-4.3.0-r1::gentoo -debug runtime dev-libs/rocclr-4.3.0::gentoo dev-libs/rocm-device-libs-4.3.0::gentoo dev-libs/rocm-opencl-runtime-4.3.0::gentoo dev-libs/rocm-comgr-4.3.0::gentoo dev-util/roctracer-4.3.0::gentoo sci-libs/rocBLAS-4.3.0::gentoo -benchmark -test sci-libs/rocSPARSE-4.3.0::gentoo -benchmark -test sci-libs/rocPRIM-4.3.0::gentoo -benchmark -test I did not try the patching the dev-util/hip-4.1.0 ebuild since I don't want to remove/downgrade the above packages but hopefully such also works for others. *** Bug 829515 has been marked as a duplicate of this bug. *** The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cadd3e208390316e2bfb03345cfb922eb67555a1 commit cadd3e208390316e2bfb03345cfb922eb67555a1 Author: Andrew Ammerlaan <andrewammerlaan@gentoo.org> AuthorDate: 2022-03-05 14:03:17 +0000 Commit: Andrew Ammerlaan <andrewammerlaan@gentoo.org> CommitDate: 2022-03-05 20:51:51 +0000 dev-util/hip: fix compile, add missing dep Co-authored-by: Dennis Schridde <devurandom@gmx.net> Co-authored-by: Paul Preney <paul@preney.ca> Closes: https://bugs.gentoo.org/790164 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> dev-util/hip/hip-4.3.0-r2.ebuild | 112 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) |