diff mbox series

[meta-multimedia] libcamera: add libdrm dependency

Message ID 20260713091756.66416-1-f_l_k@t-online.de
State New
Headers show
Series [meta-multimedia] libcamera: add libdrm dependency | expand

Commit Message

Markus Volk July 13, 2026, 9:17 a.m. UTC
This fixes an issue seeen if 'glvnd' is in DISTRO_FEATURES:
| FAILED: [code=1] src/libcamera/libcamera.so.0.7.1.p/egl.cpp.o
| x86_64-oe-linux-g++ -m64 -march=nehalem -mtune=generic -mfpmath=sse -msse4.2 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/flk/bitbake/bitbake-builds/oe/build/tmp/work/corei7-64-oe-linux/libcamera/0.7.1/recipe-sysroot -Isrc/libcamera/libcamera.so.0.7.1.p -Isrc/libcamera -I../sources/libcamera-0.7.1/src/libcamera -Iinclude -I../sources/libcamera-0.7.1/include -Iinclude/libcamera -Iinclude/libcamera/ipa -Iinclude/libcamera/internal -Isrc/libcamera/proxy -I/home/flk/bitbake/bitbake-builds/oe/build/tmp/work/corei7-64-oe-linux/libcamera/0.7.1/recipe-sysroot/usr/include/p11-kit-1 -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c++20 -Wnon-virtual-dtor -Wno-redundant-move -Wmissing-declarations -Wshadow -include /home/flk/bitbake/bitbake-builds/oe/build/tmp/work/corei7-64-oe-linux/libcamera/0.7.1/build/config.h -O2 -g -fcanon-prefix-map -ffile-prefix-map=/home/flk/bitbake/bitbake-builds/oe/build/tmp/work/corei7-64-oe-linux/libcamera/0.7.1/sources/libcamera-0.7.1=/usr/src/debug/libcamera/0.7.1 -ffile-prefix-map=/home/flk/bitbake/bitbake-builds/oe/build/tmp/work/corei7-64-oe-linux/libcamera/0.7.1/build=/usr/src/debug/libcamera/0.7.1 -ffile-prefix-map=/home/flk/bitbake/bitbake-builds/oe/build/tmp/work/corei7-64-oe-linux/libcamera/0.7.1/recipe-sysroot= -ffile-prefix-map=/home/flk/bitbake/bitbake-builds/oe/build/tmp/work/corei7-64-oe-linux/libcamera/0.7.1/recipe-sysroot-native= -pipe -fvisibility-inlines-hidden -Wno-error=array-bounds -fPIC -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/libcamera/libcamera.so.0.7.1.p/egl.cpp.o -MF src/libcamera/libcamera.so.0.7.1.p/egl.cpp.o.d -o src/libcamera/libcamera.so.0.7.1.p/egl.cpp.o -c ../sources/libcamera-0.7.1/src/libcamera/egl.cpp
| ../sources/libcamera-0.7.1/src/libcamera/egl.cpp:22:10: fatal error: libdrm/drm_fourcc.h: No such file or directory
|    22 | #include <libdrm/drm_fourcc.h>
|       |          ^~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
 meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kieran Bingham July 13, 2026, 10:38 a.m. UTC | #1
Hi Markus,

Quoting Markus Volk (2026-07-13 10:17:56)
> This fixes an issue seeen if 'glvnd' is in DISTRO_FEATURES:
> | FAILED: [code=1] src/libcamera/libcamera.so.0.7.1.p/egl.cpp.o
> | x86_64-oe-linux-g++ -m64 -march=nehalem -mtune=generic -mfpmath=sse -msse4.2 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/flk/bitbake/bitbake-builds/oe/build/tmp/work/corei7-64-oe-linux/libcamera/0.7.1/recipe-sysroot -Isrc/libcamera/libcamera.so.0.7.1.p -Isrc/libcamera -I../sources/libcamera-0.7.1/src/libcamera -Iinclude -I../sources/libcamera-0.7.1/include -Iinclude/libcamera -Iinclude/libcamera/ipa -Iinclude/libcamera/internal -Isrc/libcamera/proxy -I/home/flk/bitbake/bitbake-builds/oe/build/tmp/work/corei7-64-oe-linux/libcamera/0.7.1/recipe-sysroot/usr/include/p11-kit-1 -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c++20 -Wnon-virtual-dtor -Wno-redundant-move -Wmissing-declarations -Wshadow -include /home/flk/bitbake/bitbake-builds/oe/build/tmp/work/corei7-64-oe-linux/libcamera/0.7.1/build/config.h -O2 -g -fcanon-prefix-map -ffile-prefix-map=/home/flk/bitbake/bitbake-builds/oe/build/tmp/work/corei7-64-oe-linux/libcamera/0.7.1/sources/libcamera-0.7.1=/usr/src/debug/libcamera/0.7.1 -ffile-prefix-map=/home/flk/bitbake/bitbake-builds/oe/build/tmp/work/corei7-64-oe-linux/libcamera/0.7.1/build=/usr/src/debug/libcamera/0.7.1 -ffile-prefix-map=/home/flk/bitbake/bitbake-builds/oe/build/tmp/work/corei7-64-oe-linux/libcamera/0.7.1/recipe-sysroot= -ffile-prefix-map=/home/flk/bitbake/bitbake-builds/oe/build/tmp/work/corei7-64-oe-linux/libcamera/0.7.1/recipe-sysroot-native= -pipe -fvisibility-inlines-hidden -Wno-error=array-bounds -fPIC -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/libcamera/libcamera.so.0.7.1.p/egl.cpp.o -MF src/libcamera/libcamera.so.0.7.1.p/egl.cpp.o.d -o src/libcamera/libcamera.so.0.7.1.p/egl.cpp.o -c ../sources/libcamera-0.7.1/src/libcamera/egl.cpp
> | ../sources/libcamera-0.7.1/src/libcamera/egl.cpp:22:10: fatal error: libdrm/drm_fourcc.h: No such file or directory
> |    22 | #include <libdrm/drm_fourcc.h>
> |       |          ^~~~~~~~~~~~~~~~~~~~~
> 

libcamera doesn't actually depend on libdrm but this egl.cpp shouldn't
point to libdrm/drm_fourcc as we have a local copy of this header in the
libcamera project.

https://gitlab.freedesktop.org/camera/libcamera/-/blob/master/include/linux/drm_fourcc.h?ref_type=heads

This incorrect dependency was fixed in 

https://gitlab.freedesktop.org/camera/libcamera/-/commit/b9302237231471c043bb102dd8dc045fa05eb983

which is integrated in libcamera-0.7.2.

Perhaps rather than add an incorrect dependency, we could backport the
patch for the recipe or bump to libcamera-0.7.2?

Regards
--
Kieran

> Signed-off-by: Markus Volk <f_l_k@t-online.de>
> ---
>  meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.1.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.1.bb b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.1.bb
> index 2b351a39be..68b2c6648c 100644
> --- a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.1.bb
> +++ b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.1.bb
> @@ -17,7 +17,7 @@ SRCREV = "183e37362f57ff3ce7493abf0bc6f1b57b931f55"
>  
>  PE = "1"
>  
> -DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls chrpath-native libevent libyaml"
> +DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls chrpath-native libevent libyaml libdrm"
>  DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}"
>  
>  PACKAGES =+ "${PN}-compliance ${PN}-gst ${PN}-pycamera"
> -- 
> 2.55.0
> 
>
Markus Volk July 13, 2026, 4:23 p.m. UTC | #2
Am Mo, 13. Jul 2026 um 11:38:14 +01:00:00 schrieb Kieran Bingham via 
lists.openembedded.org 
<kieran.bingham=ideasonboard.com@lists.openembedded.org>:
> Perhaps rather than add an incorrect dependency, we could backport the
> patch for the recipe or bump to libcamera-0.7.2?

That sounds reasonable. I have updated libcamera to v0.7.2 and now 
libyuv seems to be a requirement. It was formerly added by the 'virtual'
PACKAGECONFIG where I have no idea what this is for but removing this 
PACKAGECONFIG  and adding libyuv to DEPENDS fixes the build.
Since you know about libcameras dependencies: Is this the right thing 
to do or am I missing something about 'virtual'?

0.7.2 builds for me like this:

diff --git 
a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.1.bb 
b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.2.bb
similarity index 97%
rename from 
meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.1.bb
rename to 
meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.2.bb
index 2b351a39be..4b5e735a37 100644
--- a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.1.bb
+++ b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.2.bb
@@ -13,11 +13,11 @@ SRC_URI = " \
         
git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master;tag=v${PV 
<git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master;tag=v$%7BPV>} 
\
 "

-SRCREV = "183e37362f57ff3ce7493abf0bc6f1b57b931f55"
+SRCREV = "191e202178f02430b5942397c70d215cdd2056fa"

 PE = "1"

-DEPENDS = "python3-pyyaml-native python3-jinja2-native 
python3-ply-native python3-jinja2-native udev gnutls chrpath-native 
libevent libyaml"
+DEPENDS = "python3-pyyaml-native python3-jinja2-native 
python3-ply-native python3-jinja2-native udev gnutls chrpath-native 
libevent libyaml libyuv"
 DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase 
qtbase-native', '', d)}"

 PACKAGES =+ "${PN}-compliance ${PN}-gst ${PN}-pycamera"
@@ -38,7 +38,6 @@ PACKAGECONFIG[raspberrypi] = ",,libpisp"
 PACKAGECONFIG[sdl] = 
"-Dcam-output-sdl2=enabled,-Dcam-output-sdl2=disabled,virtual/libsdl2"
 PACKAGECONFIG[unwind] = 
"-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind"
 PACKAGECONFIG[vimc] = ",,"
-PACKAGECONFIG[virtual] = ",,libyuv libjpeg-turbo"

 ARM_PIPELINES = "imx8-isi,mali-c55,simple,uvcvideo"
 # Raspberry Pi requires the meta-raspberrypi layer
Kieran Bingham July 13, 2026, 4:36 p.m. UTC | #3
+Cc libcamera-devel, Robert,

Quoting Markus Volk (2026-07-13 17:23:12)
> Am Mo, 13. Jul 2026 um 11:38:14 +01:00:00 schrieb Kieran Bingham via 
> lists.openembedded.org 
> <kieran.bingham=ideasonboard.com@lists.openembedded.org>:
> > Perhaps rather than add an incorrect dependency, we could backport the
> > patch for the recipe or bump to libcamera-0.7.2?
> 
> That sounds reasonable. I have updated libcamera to v0.7.2 and now 
> libyuv seems to be a requirement. It was formerly added by the 'virtual'
> PACKAGECONFIG where I have no idea what this is for but removing this 
> PACKAGECONFIG  and adding libyuv to DEPENDS fixes the build.
> Since you know about libcameras dependencies: Is this the right thing 
> to do or am I missing something about 'virtual'?

Aha, I wish I'd thought of that for the release notes.

There was a patch merged that makes virtual built in by default.

So adding libyuv as a dependency for 0.7.2 probably makes sense. I
wonder if virtual should instead only be defaulted to build in when
libyuv is available!

--
Kieran


> 
> 0.7.2 builds for me like this:
> 
> diff --git 
> a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.1.bb 
> b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.2.bb
> similarity index 97%
> rename from 
> meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.1.bb
> rename to 
> meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.2.bb
> index 2b351a39be..4b5e735a37 100644
> --- a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.1.bb
> +++ b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.2.bb
> @@ -13,11 +13,11 @@ SRC_URI = " \
>          
> git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master;tag=v${PV 
> <git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master;tag=v$%7BPV>} 
> \
>  "
> 
> -SRCREV = "183e37362f57ff3ce7493abf0bc6f1b57b931f55"
> +SRCREV = "191e202178f02430b5942397c70d215cdd2056fa"
> 
>  PE = "1"
> 
> -DEPENDS = "python3-pyyaml-native python3-jinja2-native 
> python3-ply-native python3-jinja2-native udev gnutls chrpath-native 
> libevent libyaml"
> +DEPENDS = "python3-pyyaml-native python3-jinja2-native 
> python3-ply-native python3-jinja2-native udev gnutls chrpath-native 
> libevent libyaml libyuv"
>  DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase 
> qtbase-native', '', d)}"
> 
>  PACKAGES =+ "${PN}-compliance ${PN}-gst ${PN}-pycamera"
> @@ -38,7 +38,6 @@ PACKAGECONFIG[raspberrypi] = ",,libpisp"
>  PACKAGECONFIG[sdl] = 
> "-Dcam-output-sdl2=enabled,-Dcam-output-sdl2=disabled,virtual/libsdl2"
>  PACKAGECONFIG[unwind] = 
> "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind"
>  PACKAGECONFIG[vimc] = ",,"
> -PACKAGECONFIG[virtual] = ",,libyuv libjpeg-turbo"
> 
>  ARM_PIPELINES = "imx8-isi,mali-c55,simple,uvcvideo"
>  # Raspberry Pi requires the meta-raspberrypi layer
> 
>
Laurent Pinchart July 13, 2026, 4:44 p.m. UTC | #4
On Mon, Jul 13, 2026 at 05:36:35PM +0100, Kieran Bingham wrote:
> +Cc libcamera-devel, Robert,
> 
> Quoting Markus Volk (2026-07-13 17:23:12)
> > Am Mo, 13. Jul 2026 um 11:38:14 +01:00:00 schrieb Kieran Bingham via 
> > lists.openembedded.org 
> > <kieran.bingham=ideasonboard.com@lists.openembedded.org>:
> > > Perhaps rather than add an incorrect dependency, we could backport the
> > > patch for the recipe or bump to libcamera-0.7.2?
> > 
> > That sounds reasonable. I have updated libcamera to v0.7.2 and now 
> > libyuv seems to be a requirement. It was formerly added by the 'virtual'
> > PACKAGECONFIG where I have no idea what this is for but removing this 
> > PACKAGECONFIG  and adding libyuv to DEPENDS fixes the build.
> > Since you know about libcameras dependencies: Is this the right thing 
> > to do or am I missing something about 'virtual'?
> 
> Aha, I wish I'd thought of that for the release notes.
> 
> There was a patch merged that makes virtual built in by default.
> 
> So adding libyuv as a dependency for 0.7.2 probably makes sense. I
> wonder if virtual should instead only be defaulted to build in when
> libyuv is available!

Not a good idea, that would break reproducible builds badly.

> > 0.7.2 builds for me like this:
> > 
> > diff --git 
> > a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.1.bb 
> > b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.2.bb
> > similarity index 97%
> > rename from 
> > meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.1.bb
> > rename to 
> > meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.2.bb
> > index 2b351a39be..4b5e735a37 100644
> > --- a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.1.bb
> > +++ b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.2.bb
> > @@ -13,11 +13,11 @@ SRC_URI = " \
> >          
> > git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master;tag=v${PV 
> > <git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master;tag=v$%7BPV>} 
> > \
> >  "
> > 
> > -SRCREV = "183e37362f57ff3ce7493abf0bc6f1b57b931f55"
> > +SRCREV = "191e202178f02430b5942397c70d215cdd2056fa"
> > 
> >  PE = "1"
> > 
> > -DEPENDS = "python3-pyyaml-native python3-jinja2-native 
> > python3-ply-native python3-jinja2-native udev gnutls chrpath-native 
> > libevent libyaml"
> > +DEPENDS = "python3-pyyaml-native python3-jinja2-native 
> > python3-ply-native python3-jinja2-native udev gnutls chrpath-native 
> > libevent libyaml libyuv"
> >  DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase 
> > qtbase-native', '', d)}"
> > 
> >  PACKAGES =+ "${PN}-compliance ${PN}-gst ${PN}-pycamera"
> > @@ -38,7 +38,6 @@ PACKAGECONFIG[raspberrypi] = ",,libpisp"
> >  PACKAGECONFIG[sdl] = 
> > "-Dcam-output-sdl2=enabled,-Dcam-output-sdl2=disabled,virtual/libsdl2"
> >  PACKAGECONFIG[unwind] = 
> > "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind"
> >  PACKAGECONFIG[vimc] = ",,"
> > -PACKAGECONFIG[virtual] = ",,libyuv libjpeg-turbo"
> > 
> >  ARM_PIPELINES = "imx8-isi,mali-c55,simple,uvcvideo"
> >  # Raspberry Pi requires the meta-raspberrypi layer
diff mbox series

Patch

diff --git a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.1.bb b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.1.bb
index 2b351a39be..68b2c6648c 100644
--- a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.1.bb
+++ b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.7.1.bb
@@ -17,7 +17,7 @@  SRCREV = "183e37362f57ff3ce7493abf0bc6f1b57b931f55"
 
 PE = "1"
 
-DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls chrpath-native libevent libyaml"
+DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls chrpath-native libevent libyaml libdrm"
 DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}"
 
 PACKAGES =+ "${PN}-compliance ${PN}-gst ${PN}-pycamera"