dev-libs/ocl-icd-2.2.14 builds fine against dev-util/opencl-headers-2020.12.18, but with newer dev-util/opencl-headers-2021.04.29 it dies with: ... In file included from /var/tmp/portage/dev-libs/ocl-icd-2.2.14/work/ocl-icd-2.2.14/run_dummy_icd.c:42: /usr/include/CL/cl_gl_ext.h:18:9: note: ‘#pragma message: All OpenGL-related extensions have been moved into cl_gl.h. Please include cl_gl.h directly.’ 18 | #pragma message("All OpenGL-related extensions have been moved into cl_gl.h. Please include cl_gl.h directly.") ... run_dummy_icd_gen.c: In function ‘clCreateSubDevicesEXT’: run_dummy_icd_gen.c:544:51: error: expected declaration specifiers before ‘CL_EXT_SUFFIX__VERSION_1_1’ 544 | cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1;; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ... make[2]: *** [Makefile:837: libOpenCL_la-ocl_icd_loader_gen.lo] Error 1 make[2]: Leaving directory '/var/tmp/portage/dev-libs/ocl-icd-2.2.14/work/ocl-icd-2.2.14-abi_x86_64.amd64' make[1]: *** [Makefile:1030: all-recursive] Error 1 make[1]: Leaving directory '/var/tmp/portage/dev-libs/ocl-icd-2.2.14/work/ocl-icd-2.2.14-abi_x86_64.amd64' make: *** [Makefile:598: all] Error 2 System info below; full build log attached. Upstream opencl-headers https://github.com/KhronosGroup/OpenCL-Headers/issues/145 and https://github.com/KhronosGroup/OpenCL-Headers/pull/156 seem related, but I don't see anybody talking about this in https://github.com/OCL-dev/ocl-icd, possibly because ocl-icd bundles its own copy of the khronos-headers that our ebuild disables in favor of the opencl-headers package? Until sorted out, changing >=dev-util/opencl-headers-2020.12.18 to =dev-util/opencl-headers-2020.12.18 allows ocl-icd-2.2.14 to build again. # emerge --info '=dev-libs/ocl-icd-2.2.14::gentoo' Portage 3.0.18 (python 3.8.10-final-0, default/linux/amd64/17.1/hardened, gcc-10.3.0, glibc-2.33, 5.4.115-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-5.4.115-gentoo-x86_64-AMD_Ryzen_9_3900X_12-Core_Processor-with-glibc2.2.5 KiB Mem: 65824984 total, 17630976 free KiB Swap: 64000956 total, 63908796 free Timestamp of repository gentoo: Tue, 11 May 2021 00:45:01 +0000 sh bash 5.1_p8 ld GNU ld (Gentoo 2.36.1 p3) 2.36.1 app-shells/bash: 5.1_p8::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.32.1::gentoo dev-lang/python: 2.7.18_p9::gentoo, 3.7.10_p3::gentoo, 3.8.10::gentoo dev-lang/rust: 1.52.0::gentoo dev-util/cmake: 3.20.2::gentoo
Created attachment 707229 [details] ocl-icd build failure when opencl-headers-2021.04.29 is installed
Considering the non-ruby alternative (dev-libs/opencl-icd-loader) needs these header bumps, I hope it won't become a recurring issue.
Hank Leininger wrote: "Until sorted out, changing >=dev-util/opencl-headers-2020.12.18 to =dev-util/opencl-headers-2020.12.18 allows ocl-icd-2.2.14 to build again." There's no opencl-headers-2020.12.18 in the tree today, so I changed it to =dev-util/opencl-headers-2020.06.16. Still dev-libs/ocl-icd-2.2.14 would not compile.
If want to use stable =opencl-headers-2020.06.16 as a workaround, should use stable =ocl-icd-2.2.12-r3 as well (could set -~amd64 keywords on both) Alternatively, if don't explicitly want ocl-icd, may want replace ocl-icd: emerge -1 opencl-icd-loader (personally think it should be the default for virtual/opencl).
CC'ing marecki since been handling the opencl-icd-loader/headers side of things.
Not sure what I can bring to this discussion. Khronos Group has been extending both the headers and their official ICD loader to support OpenCL 3, something has indeed changed which is not compatible with old ocl-icd. ocl-icd upstream has already addressed this in Git, see the link. And if ocl-icd versions in the tree require an earlier version of opencl-headers the maintainer of the former should set dependencies accordingly so that the relevant versions of the latter do not accidentally get removed.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33470b53c126038cfb84831516172bd8ff3bbe00 commit 33470b53c126038cfb84831516172bd8ff3bbe00 Author: James Le Cuirot <chewi@gentoo.org> AuthorDate: 2021-05-29 14:42:10 +0000 Commit: James Le Cuirot <chewi@gentoo.org> CommitDate: 2021-05-29 14:43:35 +0000 dev-libs/ocl-icd: Drop old and broken 2.2.14 Closes: https://bugs.gentoo.org/789558 Package-Manager: Portage-3.0.19, Repoman-3.0.3 Signed-off-by: James Le Cuirot <chewi@gentoo.org> dev-libs/ocl-icd/Manifest | 1 - dev-libs/ocl-icd/ocl-icd-2.2.14-r1.ebuild | 57 ------------------------------- dev-libs/ocl-icd/ocl-icd-2.2.14.ebuild | 44 ------------------------ 3 files changed, 102 deletions(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d19af2426ace8a0bbc48ee64c042ef15a18f29ea commit d19af2426ace8a0bbc48ee64c042ef15a18f29ea Author: James Le Cuirot <chewi@gentoo.org> AuthorDate: 2021-05-29 14:41:28 +0000 Commit: James Le Cuirot <chewi@gentoo.org> CommitDate: 2021-05-29 14:43:32 +0000 dev-libs/ocl-icd: Version bump to 2.3.0 This is compatible with the new OpenCL headers. Closes: https://bugs.gentoo.org/789558 Package-Manager: Portage-3.0.19, Repoman-3.0.3 Signed-off-by: James Le Cuirot <chewi@gentoo.org> dev-libs/ocl-icd/Manifest | 1 + .../ocl-icd/files/ocl-icd-2.3.0-new-headers.patch | 94 ++++++++++++++++++++++ dev-libs/ocl-icd/ocl-icd-2.3.0.ebuild | 61 ++++++++++++++ 3 files changed, 156 insertions(+) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58ccd37b4d51a90f951c827b185c6682d165c180 commit 58ccd37b4d51a90f951c827b185c6682d165c180 Author: James Le Cuirot <chewi@gentoo.org> AuthorDate: 2021-05-29 14:30:40 +0000 Commit: James Le Cuirot <chewi@gentoo.org> CommitDate: 2021-05-29 14:43:28 +0000 dev-libs/ocl-icd: Pin opencl-headers on 2.2.12 to compatible version We need to ensure this version isn't removed. Closes: https://bugs.gentoo.org/789558 Package-Manager: Portage-3.0.19, Repoman-3.0.3 Signed-off-by: James Le Cuirot <chewi@gentoo.org> .../ocl-icd/{ocl-icd-2.2.12-r3.ebuild => ocl-icd-2.2.12-r4.ebuild} | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)