Skip to content

Update OpenGL/OpenCL dependencies in camxlib#2560

Merged
Dmitry Baryshkov (lumag) merged 3 commits into
qualcomm-linux:masterfrom
kripal-qipl:meta-qcom-camx-compilation-fix
Jun 22, 2026
Merged

Update OpenGL/OpenCL dependencies in camxlib#2560
Dmitry Baryshkov (lumag) merged 3 commits into
qualcomm-linux:masterfrom
kripal-qipl:meta-qcom-camx-compilation-fix

Conversation

@kripal-qipl

@kripal-qipl Kripalsinh Rana (kripal-qipl) commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

camxlib-kodiak: guard OpenGL/OpenCL dependencies
Replace unconditional dependency on OpenGL (EGL/GLES2) and
OpenCL libraries with DISTRO_FEATURES-based guards.
This ensures the dependencies are enabled only when
opengl/opencl features are present, allowing camx to build
successfully in configurations where these features are disabled.

camxlib-lemans: Updated OpenGL/OpenCL dependency handling
Introduce DISTRO_FEATURES-based handling for OpenCL and
OpenGL (EGL/GLES2) dependencies.
Added guard logic to remove OpenCL/OpenGL dependent libs
when opengl/opencl distro features are disabled.
This ensures camx builds successfully when opengl/opencl
features are disabled and aligns with Yocto best practices
for optional GPU/compute components.

camxlib-talos: Updated OpenGL/OpenCL dependency handling
Introduce DISTRO_FEATURES-based handling for OpenCL and
OpenGL (EGL/GLES2) dependencies.
Added guard logic to remove OpenCL/OpenGL dependent libs
when opengl/opencl distro features are disabled.
This ensures camx builds successfully when opengl/opencl
features are disabled and aligns with Yocto best practices
for optional GPU/compute components.

qli-2.0 GA Critical Fix

COMPONENT_PATH="${D}${libdir}/camx/kodiak"

# Remove OpenCL-dependent files when opencl is not enabled.
if [ "${@bb.utils.contains('DISTRO_FEATURES', 'opencl', 'yes', 'no', d)}" = "no" ]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if ${@bb.utils.contains('DISTRO_FEATURES', 'opencl', 'false', 'yrue', d)}; then


# Remove all shared libraries that dynamically link against libOpenCL
for lib in $(find "${COMPONENT_PATH}" -type f -name "*.so*"); do
if readelf -d "$lib" 2>/dev/null | grep -q "libOpenCL\.so"; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You know the libraries which use CL. Use the list instead of using readelf.

fi

# Remove OpenGL/EGL-dependent libraries when opengl is not enabled.
if [ "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'yes', 'no', d)}" = "no" ]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comments

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

fi
done
# Remove dangling symlinks left after removing OpenGL-dependent libraries
find "${COMPONENT_PATH}" -name "*.so*" -xtype l -delete 2>/dev/null || true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No

@kripal-qipl

Copy link
Copy Markdown
Contributor Author

Updated PR with new changes.
Dmitry Baryshkov (@lumag) , pls review latest changes

rm -f ${D}${libdir}/camx/kodiak/*.cl
rm -f ${D}${libdir}/camx/kodiak/lib_algo_svhdr*
rm -f ${D}${libdir}/camx/kodiak/camera/components/libshdr3*
rm -f ${D}${libdir}/camx/kodiak/camera/components/libbanding_correction*

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No improvement. You are still removing unwanted paths instead of installing only the required binaries.

@kripal-qipl Kripalsinh Rana (kripal-qipl) Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can u pls suggest reference solution where we can exclude opencl and opengl dependent libs and install other libs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it valid scenario when opencl, opengl distro feature is disable.
i am getting compilation error when i disable those in meta-qcom build.
validation steps:
--> add "DISTRO_FEATURES:remove = "opencl opengl"" in /build/conf/local.conf.
--> bitbake qcom-multimedia-proprietary-image

image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #2552

SRC_URI[chicdk.sha256sum] = "9b08fe81bc9177826fe5d9aff185de16bdb216cab20304bfea60a8c8a5c2eb48"
SRC_URI[camxcommon.sha256sum] = "9e8a7b595242916962bb018f2dffc3136c399f1bf80b0aecd91f4ac97f6293f9"

DEPENDS += "virtual/egl virtual/libgles2 ${@bb.utils.contains('DISTRO_FEATURES', 'opencl', 'qcom-adreno virtual/libopencl1', '', d)}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change-Id: Ib67d464be8f89cf16cfb25065ceb190bef9fe43f

Please remove Gerrit git hooks from your work environment. This repo doesn't use Gerrint and will never use it in future.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@lumag Dmitry Baryshkov (lumag) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Started the build at https://github.com/qualcomm-linux/meta-qcom/actions/runs/27944462314, let's see the outcome.

Remove hard dependency on OpenGL (EGL/GLES2) and OpenCL
libraries and make them optional based on DISTRO_FEATURES.

This ensures camx builds successfully when opengl/opencl
features are disabled and aligns with Yocto best practices
for optional GPU/compute components.

Signed-off-by: Kripalsinh Rana <kripalsi@qti.qualcomm.com>
Introduce DISTRO_FEATURES-based handling for OpenCL and
OpenGL (EGL/GLES2) dependencies.

Added guard logic to remove OpenCL/OpenGL dependent libs
when opengl/opencl distro features are disabled.

This ensures camx builds successfully when opengl/opencl
features are disabled and aligns with Yocto best practices
for optional GPU/compute components.

Signed-off-by: Kripalsinh Rana <kripalsi@qti.qualcomm.com>
Introduce DISTRO_FEATURES-based handling for OpenCL and
OpenGL (EGL/GLES2) dependencies.

Added guard logic to remove OpenCL/OpenGL dependent libs
when opengl/opencl distro features are disabled.

This ensures camx builds successfully when opengl/opencl
features are disabled and aligns with Yocto best practices
for optional GPU/compute components.

Signed-off-by: Kripalsinh Rana <kripalsi@qti.qualcomm.com>
@lumag

Copy link
Copy Markdown
Contributor

@vkraleti Viswanath Kraleti (vkraleti) changed the title Meta qcom camx compilation fix Update OpenGL/OpenCL dependencies in camxlib Jun 22, 2026
@lumag

Copy link
Copy Markdown
Contributor

This has been tested in -next, merging now.

@lumag Dmitry Baryshkov (lumag) merged commit b7a9544 into qualcomm-linux:master Jun 22, 2026
14 checks passed
@github-actions

Copy link
Copy Markdown

Test run workflow

Test jobs for commit b4a0152

nodistro
Pass: 9 | Fail: 0 | Total: 9
qcom-distro_linux-qcom-6.18
Pass: 202 | Fail: 0 | Total: 246
qcom-distro
Pass: 252 | Fail: 1 | Total: 292

Dmitry Baryshkov (lumag) added a commit that referenced this pull request Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants