From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Marcus Folkesson <marcus.folkesson@gmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] package/libcamera-apps: enable LIBAV only if libdrm is present
Date: Tue, 7 Feb 2023 16:22:46 +0100 [thread overview]
Message-ID: <20230207152246.GG4124@scaer> (raw)
In-Reply-To: <20230207085445.1651226-1-marcus.folkesson@gmail.com>
Marcus, All,
On 2023-02-07 09:54 +0100, Marcus Folkesson spake thusly:
> Since commit 35266e84043f880d7591e52b71a8c5b8d0e4717d, libcamera-apps
> does enable LIBAV by default which depends on libdrm.
>
> Fixes:
> - http://autobuild.buildroot.net/results/548f2a3b353ce4693fb60d7fb1e06e02af22991c/
>
> /home/buildroot/autobuild/run/instance-1/output-1/build/libcamera-apps-1.1.1/encoder/libav_encoder.cpp:13:10: fatal error: libdrm/drm_fourcc.h: No such file or directory
> 13 | #include <libdrm/drm_fourcc.h>
> | ^~~~~~~~~~~~~~~~~~~~~
>
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> ---
> package/libcamera-apps/libcamera-apps.mk | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/package/libcamera-apps/libcamera-apps.mk b/package/libcamera-apps/libcamera-apps.mk
> index 290ee9a026..385c65136e 100644
> --- a/package/libcamera-apps/libcamera-apps.mk
> +++ b/package/libcamera-apps/libcamera-apps.mk
> @@ -25,8 +25,10 @@ LIBCAMERA_APPS_CONF_OPTS = \
> ifeq ($(BR2_PACKAGE_LIBDRM),y)
> LIBCAMERA_APPS_DEPENDENCIES += libdrm
> LIBCAMERA_APPS_CONF_OPTS += -DENABLE_DRM=1
> +LIBCAMERA_APPS_CONF_OPTS += -DENABLE_LIBAV=1
But doesn't ENABLE_LIBAV also need a few libraries? From libcamera-apps'
encoder/CMakeLists.txt:
13 if (ENABLE_LIBAV)
14 message(STATUS "Checking for libavcodec")
15 pkg_check_modules(LIBAV QUIET IMPORTED_TARGET
16 libavcodec
17 libavdevice
18 libavformat
19 libswresample
20 )
libavcodec, libavdevice, libavformat, and libswresample come with
ffmpeg, so this should be added to dependencies too.
Note: in fact, if the libs are not found, the feature will be silently
disabled:
21 if (LIBAV_FOUND)
22 include_directories(${LIBAV_INCLUDE_DIRS})
23 set(SRC ${SRC} libav_encoder.cpp)
24 set(TARGET_LIBS ${TARGET_LIBS} ${LIBAV_LIBRARIES})
25 set(LIBAV_PRESENT 1)
26 message(STATUS "libavcodec found:")
27 message(STATUS " libraries: ${LIBAV_LIBRARIES}")
28 endif()
29 else()
30 message(STATUS "Omitting libavcodec")
31 endif()
However, this is not clean, because we explicitly asked for a feature
(enable libav suport) but it gets disabled because of missing
dependencies.
So, either we explicitly and unconditionally disable it, or we add the
necessary dependencies.
Regards,
Yann E. MORIN.
> else
> LIBCAMERA_APPS_CONF_OPTS += -DENABLE_DRM=0
> +LIBCAMERA_APPS_CONF_OPTS += -DENABLE_LIBAV=0
> endif
>
> ifeq ($(BR2_PACKAGE_XORG7),y)
> --
> 2.38.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2023-02-07 15:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-07 8:54 [Buildroot] [PATCH] package/libcamera-apps: enable LIBAV only if libdrm is present Marcus Folkesson
2023-02-07 15:22 ` Yann E. MORIN [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230207152246.GG4124@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=marcus.folkesson@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.