ocl-icd, opencl-icd-loader: drop RPROVIDES for virtual-opencl-icd
PATCH v2 1/6 ocl-icd, opencl-icd-loader: drop RPROVIDES for virtual-opencl-icd
These two packages don't provide ICD drivers at runtime. They provide the libOpenCL.so.1. Corresponding package is selected at the build time via the PROVIDES_virtual/opencl-icd. Drop the useless and incorrect RPROVIDES for virtual-opencl-icd.
--- meta-oe/conf/layer.conf | 1 - meta-oe/recipes-core/opencl/ocl-icd_2.3.2.bb | 1 - meta-oe/recipes-core/opencl/opencl-icd-loader_2024.05.08.bb | 2 -- 3 files changed, 4 deletions(-)
meta-oe/conf/layer.conf +0 -1
@@ -59,7 +59,6 @@ PREFERRED_PROVIDER_android-tools-conf ?= "android-tools-conf" # Configures whether coreutils or uutils-coreutils is used. PREFERRED_PROVIDER_coreutils = "coreutils" PREFERRED_PROVIDER_virtual/opencl-icd ?= "opencl-icd-loader" -PREFERRED_RPROVIDER_virtual-opencl-icd ?= "opencl-icd-loader" PREFERRED_RPROVIDER_virtual-redis ?= "redis" SIGGEN_EXCLUDERECIPES_ABISAFE += " \
meta-oe/recipes-core/opencl/ocl-icd_2.3.2.bb +0 -1
@@ -14,6 +14,5 @@ inherit autotools DEPENDS = "ruby-native" PROVIDES = "virtual/opencl-icd" -RPROVIDES:${PN} = "virtual-opencl-icd" BBCLASSEXTEND = "native nativesdk"
meta-oe/recipes-core/opencl/opencl-icd-loader_2024.05.08.bb +0 -2
@@ -9,8 +9,6 @@ inherit pkgconfig cmake DEPENDS += "opencl-headers" PROVIDES = "virtual/opencl-icd" -RPROVIDES:${PN} = "virtual-opencl-icd" - SRCREV = "861b68b290e76d08e7241608479c16431f529945" SRC_URI = "git://github.com/KhronosGroup/OpenCL-ICD-Loader.git;branch=main;protocol=https"
Signature · 1 line
2.47.3
PATCH v2 2/6 opencl: rename virtual/opencl-icd to virtual/libopencl1
The ocl-icd and opencl-icd-loader provide libOpenCL.so.1 rather than the OpenCL Installable Client Driver (ICD). Rename the virtual package accordingly.
--- meta-oe/conf/layer.conf | 2 +- meta-oe/recipes-core/opencl/clpeak_1.1.5.bb | 2 +- meta-oe/recipes-core/opencl/ocl-icd_2.3.2.bb | 2 +- meta-oe/recipes-core/opencl/opencl-icd-loader_2024.05.08.bb | 2 +- meta-oe/recipes-graphics/ktx-software/ktx-software_4.4.0.bb | 2 +- meta-oe/recipes-support/opencl/clinfo_3.0.23.01.25.bb | 3 +-- meta-oe/recipes-support/opencv/opencv_4.12.0.bb | 2 +- 7 files changed, 7 insertions(+), 8 deletions(-)
meta-oe/conf/layer.conf +1 -1
@@ -58,7 +58,7 @@ PREFERRED_RPROVIDER_nativesdk-libdevmapper = "nativesdk-lvm2" PREFERRED_PROVIDER_android-tools-conf ?= "android-tools-conf" # Configures whether coreutils or uutils-coreutils is used. PREFERRED_PROVIDER_coreutils = "coreutils" -PREFERRED_PROVIDER_virtual/opencl-icd ?= "opencl-icd-loader" +PREFERRED_PROVIDER_virtual/libopencl1 ?= "opencl-icd-loader" PREFERRED_RPROVIDER_virtual-redis ?= "redis" SIGGEN_EXCLUDERECIPES_ABISAFE += " \
meta-oe/recipes-core/opencl/clpeak_1.1.5.bb +1 -1
@@ -11,4 +11,4 @@ SRCREV = "b2e647ffb8f42aa22ce4b0194d6ef6d16d5002b0" inherit cmake -DEPENDS += "opencl-clhpp virtual/opencl-icd" +DEPENDS += "opencl-clhpp virtual/libopencl1"
meta-oe/recipes-core/opencl/ocl-icd_2.3.2.bb +1 -1
@@ -13,6 +13,6 @@ SRCREV = "fdde6677b21329432db8b481e2637cd10f7d3cb2" inherit autotools DEPENDS = "ruby-native" -PROVIDES = "virtual/opencl-icd" +PROVIDES = "virtual/libopencl1" BBCLASSEXTEND = "native nativesdk"
meta-oe/recipes-core/opencl/opencl-icd-loader_2024.05.08.bb +1 -1
@@ -8,7 +8,7 @@ inherit pkgconfig cmake DEPENDS += "opencl-headers" -PROVIDES = "virtual/opencl-icd" +PROVIDES = "virtual/libopencl1" SRCREV = "861b68b290e76d08e7241608479c16431f529945" SRC_URI = "git://github.com/KhronosGroup/OpenCL-ICD-Loader.git;branch=main;protocol=https"
meta-oe/recipes-graphics/ktx-software/ktx-software_4.4.0.bb +1 -1
@@ -16,4 +16,4 @@ inherit cmake # BASISU does not work with avx TUNE_CCARGS:append:x86-64 = " -mno-avx" -PACKAGECONFIG[ocl_backend] = "-DBASISU_SUPPORT_OPENCL=ON, -DBASISU_SUPPORT_OPENCL=OFF, virtual/opencl-icd" +PACKAGECONFIG[ocl_backend] = "-DBASISU_SUPPORT_OPENCL=ON, -DBASISU_SUPPORT_OPENCL=OFF, virtual/libopencl1"
meta-oe/recipes-support/opencl/clinfo_3.0.23.01.25.bb +1 -2
@@ -11,8 +11,7 @@ SRC_URI = "git://github.com/Oblomov/clinfo.git;protocol=https;branch=master" SRCREV = "748c3930a9b9cb826e631d77439e2cb8f84f5bcf" - -DEPENDS += "opencl-headers virtual/opencl-icd" +DEPENDS += "opencl-headers virtual/libopencl1" do_install() { oe_runmake install PREFIX=${D}${prefix} MANDIR=${D}${mandir}
meta-oe/recipes-support/opencv/opencv_4.12.0.bb +1 -1
@@ -108,7 +108,7 @@ PACKAGECONFIG[java] = "-DJAVA_INCLUDE_PATH=${JAVA_HOME}/include -DJAVA_INCLUDE_P PACKAGECONFIG[jpeg] = "-DWITH_JPEG=ON,-DWITH_JPEG=OFF,jpeg," PACKAGECONFIG[libav] = "-DWITH_FFMPEG=ON,-DWITH_FFMPEG=OFF,libav," PACKAGECONFIG[libv4l] = "-DWITH_LIBV4L=ON,-DWITH_LIBV4L=OFF,v4l-utils," -PACKAGECONFIG[opencl] = "-DWITH_OPENCL=ON,-DWITH_OPENCL=OFF,opencl-headers virtual/opencl-icd," +PACKAGECONFIG[opencl] = "-DWITH_OPENCL=ON,-DWITH_OPENCL=OFF,opencl-headers virtual/libopencl1," PACKAGECONFIG[openvino] = "-DWITH_OPENVINO=ON,-DWITH_OPENVINO=OFF,openvino-inference-engine,openvino-inference-engine" PACKAGECONFIG[oracle-java] = "-DJAVA_INCLUDE_PATH=${ORACLE_JAVA_HOME}/include -DJAVA_INCLUDE_PATH2=${ORACLE_JAVA_HOME}/include/linux -DJAVA_AWT_INCLUDE_PATH=${ORACLE_JAVA_HOME}/include -DJAVA_AWT_LIBRARY=${ORACLE_JAVA_HOME}/lib/amd64/libjawt.so -DJAVA_JVM_LIBRARY=${ORACLE_JAVA_HOME}/lib/amd64/server/libjvm.so,,ant-native oracle-jse-jdk oracle-jse-jdk-native," PACKAGECONFIG[png] = "-DWITH_PNG=ON,-DWITH_PNG=OFF,libpng,"
Signature · 1 line
2.47.3
PATCH v2 3/6 opencl-cts: depend on virtual/libopencl1 instead of opencl-icd-loader
In reply to Dmitry BaryshkovMake OpenCL CTS package depend on the OpenCL virtual package rather than the exact implementation.
--- meta-oe/recipes-core/opencl/opencl-cts_2025.04.14.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-core/opencl/opencl-cts_2025.04.14.bb +1 -1
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" inherit pkgconfig cmake -DEPENDS += "opencl-headers opencl-icd-loader" +DEPENDS += "opencl-headers virtual/libopencl1" RDEPENDS:${PN} += "python3-core python3-io"
Signature · 1 line
2.47.3
PATCH v2 4/6 freerdp3: depend on virtual/libopencl1 instead of opencl-icd-loader
In reply to Dmitry BaryshkovMake the package depend on the OpenCL virtual package rather than the exact implementation.
--- meta-oe/recipes-support/freerdp/freerdp3_3.5.1.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-support/freerdp/freerdp3_3.5.1.bb +1 -1
@@ -49,7 +49,7 @@ PACKAGECONFIG[manpages] = "-DWITH_MANPAGES=ON,-DWITH_MANPAGES=OFF, libxslt-nativ PACKAGECONFIG[ffmpeg] = "-DWITH_DSP_FFMPEG=ON -DWITH_FFMPEG=ON -DWITH_SWSCALE=ON, -DWITH_DSP_FFMPEG=OFF -DWITH_FFMPEG=OFF -DWITH_SWSCALE=OFF,ffmpeg" PACKAGECONFIG[krb5] = "-DWITH_KRB5=ON -DWITH_KRB5_NO_NTLM_FALLBACK=OFF,-DWITH_KRB5=OFF,krb5" PACKAGECONFIG[openh264] = "-DWITH_OPENH264=ON,-DWITH_OPENH264=OFF,openh264" -PACKAGECONFIG[opencl] = "-DWITH_OPENCL=ON,-DWITH_OPENCL=OFF,opencl-icd-loader" +PACKAGECONFIG[opencl] = "-DWITH_OPENCL=ON,-DWITH_OPENCL=OFF,virtual/libopencl1" PACKAGECONFIG[lame] = "-DWITH_LAME=ON,-DWITH_LAME=OFF,lame" PACKAGECONFIG[faad] = "-DWITH_FAAD=ON,-DWITH_FAAD=OFF,faad2" PACKAGECONFIG[faac] = "-DWITH_FAAC=ON,-DWITH_FAAC=OFF,faac"
Signature · 1 line
2.47.3
PATCH v2 5/6 opencl-icd-loader: pull in ICD packages
In reply to Dmitry BaryshkovMake the OpenCL ICD loader RRECOMMEND the virtual ICD (Installable Client Driver) package, making sure that the BSP can define the most suitable OpenCL driver.
--- meta-oe/recipes-core/opencl/opencl-icd-loader_2024.05.08.bb | 1 + 1 file changed, 1 insertion(+)
meta-oe/recipes-core/opencl/opencl-icd-loader_2024.05.08.bb +1 -0
@@ -50,3 +50,4 @@ FILES:libicdlog = "${libdir}/libIcdLog.so" FILES:libicdlog-dbg = "${libdir}/.debug/libIcdLog.so" RDEPENDS:${PN} = "libicdlog" +RRECOMMENDS:${PN} = "virtual-opencl-icd"
Signature · 1 line
2.47.3
PATCH v2 6/6 opencl: make use of the 'opencl' DISTRO_FEATURE
In reply to Dmitry BaryshkovCurrently packages like Mesa list 'opengl' and 'vulkan' as required DISTRO_FEATURES, disabling GPU support for non-graphics-enabled cases. However in the modern world it's a perfectly fine usecase to have a headless box with GPU being used by OpenCL only. The OE-Core has added the 'opencl' DISTRO_FEATURE, making it possible to specify whether OpenCL is enabled or not and also making it possible to enable GPU packages if only OpenCL is required.
Follow the example of GLVND and vulkan-loader and disable OpenCL ICD packages if corresponding feature is not enabled.
---
Note, this depends on https://lore.kernel.org/openembedded-core/[email protected]/
--- meta-oe/recipes-core/opencl/clpeak_1.1.5.bb | 3 ++- meta-oe/recipes-core/opencl/ocl-icd_2.3.2.bb | 3 ++- meta-oe/recipes-core/opencl/opencl-cts_2025.04.14.bb | 4 +++- meta-oe/recipes-core/opencl/opencl-icd-loader_2024.05.08.bb | 4 +++- meta-oe/recipes-support/opencl/clinfo_3.0.23.01.25.bb | 4 ++++ 5 files changed, 14 insertions(+), 4 deletions(-)
meta-oe/recipes-core/opencl/clpeak_1.1.5.bb +2 -1
@@ -8,7 +8,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" SRCREV = "b2e647ffb8f42aa22ce4b0194d6ef6d16d5002b0" +inherit cmake features_check -inherit cmake +REQUIRED_DISTRO_FEATURES = "opencl" DEPENDS += "opencl-clhpp virtual/libopencl1"
meta-oe/recipes-core/opencl/ocl-icd_2.3.2.bb +2 -1
@@ -9,8 +9,9 @@ SRC_URI = "git://github.com/OCL-dev/ocl-icd.git;protocol=https;branch=master" SRCREV = "fdde6677b21329432db8b481e2637cd10f7d3cb2" +inherit autotools features_check -inherit autotools +REQUIRED_DISTRO_FEATURES = "opencl" DEPENDS = "ruby-native" PROVIDES = "virtual/libopencl1"
meta-oe/recipes-core/opencl/opencl-cts_2025.04.14.bb +3 -1
@@ -3,7 +3,9 @@ DESCRIPTION = "OpenCL CTS test suite" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" -inherit pkgconfig cmake +inherit pkgconfig cmake features_check + +REQUIRED_DISTRO_FEATURES = "opencl" DEPENDS += "opencl-headers virtual/libopencl1" RDEPENDS:${PN} += "python3-core python3-io"
meta-oe/recipes-core/opencl/opencl-icd-loader_2024.05.08.bb +3 -1
@@ -4,7 +4,9 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" SECTION = "base" -inherit pkgconfig cmake +inherit pkgconfig cmake features_check + +REQUIRED_DISTRO_FEATURES = "opencl" DEPENDS += "opencl-headers"
meta-oe/recipes-support/opencl/clinfo_3.0.23.01.25.bb +4 -0
@@ -7,6 +7,10 @@ HOMEPAGE = "https://github.com/Oblomov/clinfo" LICENSE = "CC0-1.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=fd8857f774dfb0eefe1e80c8f9240a7e" +inherit features_check + +REQUIRED_DISTRO_FEATURES = "opencl" + SRC_URI = "git://github.com/Oblomov/clinfo.git;protocol=https;branch=master" SRCREV = "748c3930a9b9cb826e631d77439e2cb8f84f5bcf"
Signature · 1 line
2.47.3
Hi Dmitry
Thanks for v2, it looks more complete. Sadly, it does not apply for me. It will be helpful if you rebase it on master-next and resend
Thanks
-Khem
Quoted 61 lines · Dmitry Baryshkov via lists.openembedded.org
These two packages don't provide ICD drivers at runtime. They provide the libOpenCL.so.1. Corresponding package is selected at the build time via the PROVIDES_virtual/opencl-icd. Drop the useless and incorrect RPROVIDES for virtual-opencl-icd.
Signed-off-by Dmitry Baryshkov <[email protected]>--- meta-oe/conf/layer.conf | 1 - meta-oe/recipes-core/opencl/ocl-icd_2.3.2.bb | 1 - meta-oe/recipes-core/opencl/opencl-icd-loader_2024.05.08.bb | 2 -- 3 files changed, 4 deletions(-)meta-oe/conf/layer.conf +0
-1@@ -59,7 +59,6 @@ PREFERRED_PROVIDER_android-tools-conf ?= "android-tools-conf" # Configures whether coreutils or uutils-coreutils is used. PREFERRED_PROVIDER_coreutils = "coreutils" PREFERRED_PROVIDER_virtual/opencl-icd ?= "opencl-icd-loader" -PREFERRED_RPROVIDER_virtual-opencl-icd ?= "opencl-icd-loader" PREFERRED_RPROVIDER_virtual-redis ?= "redis" SIGGEN_EXCLUDERECIPES_ABISAFE += " \meta-oe/recipes-core/opencl/ocl-icd_2.3.2.bb +0
-1@@ -14,6 +14,5 @@ inherit autotools DEPENDS = "ruby-native" PROVIDES = "virtual/opencl-icd" -RPROVIDES:${PN} = "virtual-opencl-icd" BBCLASSEXTEND = "native nativesdk"meta-oe/recipes-core/opencl/opencl-icd-loader_2024.05.08.bb +0
-3@@ -9,8 +9,6 @@ inherit pkgconfig cmake DEPENDS += "opencl-headers" PROVIDES = "virtual/opencl-icd" -RPROVIDES:${PN} = "virtual-opencl-icd" - SRCREV = "861b68b290e76d08e7241608479c16431f529945" SRC_URI = "git://github.com/KhronosGroup/OpenCL-ICD-Loader.git;branch=main;protocol=https" --2.47.3
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#119491): https://lists.openembedded.org/g/openembedded-devel/message/119491
Mute This Topic: https://lists.openembedded.org/mt/115303503/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 4 lines · Khem Raj
Hi Dmitry
Thanks for v2, it looks more complete. Sadly, it does not apply for me. It will be helpful if you rebase it on master-next and resend
Sure, I've send v3 based on master-next.
Quoted 69 lines
Thanks
-KhemQuoted 61 lines · Dmitry Baryshkov via lists.openembedded.org
These two packages don't provide ICD drivers at runtime. They provide the libOpenCL.so.1. Corresponding package is selected at the build time via the PROVIDES_virtual/opencl-icd. Drop the useless and incorrect RPROVIDES for virtual-opencl-icd.
Signed-off-by Dmitry Baryshkov <[email protected]>--- meta-oe/conf/layer.conf | 1 - meta-oe/recipes-core/opencl/ocl-icd_2.3.2.bb | 1 - meta-oe/recipes-core/opencl/opencl-icd-loader_2024.05.08.bb | 2 -- 3 files changed, 4 deletions(-)meta-oe/conf/layer.conf +0
-1@@ -59,7 +59,6 @@ PREFERRED_PROVIDER_android-tools-conf ?= "android-tools-conf" # Configures whether coreutils or uutils-coreutils is used. PREFERRED_PROVIDER_coreutils = "coreutils" PREFERRED_PROVIDER_virtual/opencl-icd ?= "opencl-icd-loader" -PREFERRED_RPROVIDER_virtual-opencl-icd ?= "opencl-icd-loader" PREFERRED_RPROVIDER_virtual-redis ?= "redis" SIGGEN_EXCLUDERECIPES_ABISAFE += " \meta-oe/recipes-core/opencl/ocl-icd_2.3.2.bb +0
-1@@ -14,6 +14,5 @@ inherit autotools DEPENDS = "ruby-native" PROVIDES = "virtual/opencl-icd" -RPROVIDES:${PN} = "virtual-opencl-icd" BBCLASSEXTEND = "native nativesdk"meta-oe/recipes-core/opencl/opencl-icd-loader_2024.05.08.bb +0
-3@@ -9,8 +9,6 @@ inherit pkgconfig cmake DEPENDS += "opencl-headers" PROVIDES = "virtual/opencl-icd" -RPROVIDES:${PN} = "virtual-opencl-icd" - SRCREV = "861b68b290e76d08e7241608479c16431f529945" SRC_URI = "git://github.com/KhronosGroup/OpenCL-ICD-Loader.git;branch=main;protocol=https" --2.47.3
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#119491): https://lists.openembedded.org/g/openembedded-devel/message/119491
Mute This Topic: https://lists.openembedded.org/mt/115303503/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 2 lines
With best wishes Dmitry