Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Alessandro Rubini <rubini@gnudd.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] package/opencv: depend on webp mux/demux
Date: Fri, 21 Aug 2026 12:23:00 +0200	[thread overview]
Message-ID: <aoglkraRzHufPBHQ@windsurf> (raw)
In-Reply-To: <amaDQ/RxzLn24+me@arcana.i.gnudd.com>

Hello Alessandro,

Thanks for your patch!

On Sun, Jul 26, 2026 at 11:59:31PM +0200, Alessandro Rubini wrote:
> Without this dependency, autoconfiguration fails:
> 
>     CMake Error: The following variables are used in this project,
>          but they are set to NOTFOUND.
>     Please set them or make sure they are set and tested correctly
>          in the CMake files:
>     WEBP_DEMUX_LIBRARY
>     linked by target "opencv_imgcodecs"
>          in directory [...]/build/opencv4-4.13.0/modules/imgcodecs
>     WEBP_MUX_LIBRARY
>     linked by target "opencv_imgcodecs"
>          in directory [...]/build/opencv4-4.13.0/modules/imgcodecs
> 
> Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
> ---
>  package/opencv4/Config.in  | 2 ++
>  package/opencv4/opencv4.mk | 1 +
>  2 files changed, 3 insertions(+)
> 
> diff --git a/package/opencv4/Config.in b/package/opencv4/Config.in
> index 47c1cf3f4a..856f3e8abd 100644
> --- a/package/opencv4/Config.in
> +++ b/package/opencv4/Config.in
> @@ -7,6 +7,8 @@ menuconfig BR2_PACKAGE_OPENCV4
>  	depends on !BR2_STATIC_LIBS # include dlfcn.h
>  	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
>  	select BR2_PACKAGE_ZLIB
> +	select BR2_PACKAGE_WEBP_DEMUX
> +	select BR2_PACKAGE_WEBP_MUX

I don't think this is correct, because here a build of opencv4 with
nothing special works fine, so it means that webp doesn't seem to be a
mandatory dependency of opencv4, but your patch turns webp into a
mandatory dependency of opencv4.

Basically here:

BR2_aarch64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y
BR2_PACKAGE_OPENCV4=y

builds fine.

But I do see autobuilder failures for this issue, for example:

  https://autobuild.buildroot.net/results/acb/acbddbea6d18272b5830be1b5fa5f40cf37e0389/build-end.log

In the autobuilders, I see that the few occurrences of this failures
occur when BR2_PACKAGE_OPENCV4_WITH_WEBP is enabled, which pulls in
webp as a dependency already.

So two things need to be figured out:

1. Under what conditions exactly is webp required, so that the
   dependency can be added only when needed

2. Since when the problem exists. Indeed, when we are fixing bugs, we
   always have to figure out if the fix needs to be backported to our
   stable branch (currently 2025.02.x), so every fix must come with a
   reference to the commit that introduced the problem in the first
   place. Or at least figure out whether 2025.02.x was affected or
   not.

Also, your patch could anyway not be correct, because we already have:

ifeq ($(BR2_PACKAGE_OPENCV4_WITH_WEBP),y)
OPENCV4_CONF_OPTS += -DWITH_WEBP=ON
OPENCV4_DEPENDENCIES += webp
else
OPENCV4_CONF_OPTS += -DWITH_WEBP=OFF
endif

which adds webp conditionally, and it wouldn't make sense to add it
unconditionally, and then have some logic to add it conditionally.

Could you have a look into this?

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2026-08-21 10:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-26 21:59 [Buildroot] [PATCH] package/opencv: depend on webp mux/demux Alessandro Rubini
2026-08-21 10:23 ` Thomas Petazzoni via buildroot [this message]
2026-08-21 10:28   ` Thomas Petazzoni via buildroot
2026-08-21 12:40     ` Thomas Petazzoni via buildroot

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=aoglkraRzHufPBHQ@windsurf \
    --to=buildroot@buildroot.org \
    --cc=rubini@gnudd.com \
    --cc=thomas.petazzoni@bootlin.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox