diff mbox series

[v2] package/opencv: fix a webp dependency

Message ID apHpVO5XvrAs52H1@arcana.i.gnudd.com
State New
Headers show
Series [v2] package/opencv: fix a webp dependency | expand

Commit Message

Alessandro Rubini Aug. 28, 2026, 8:02 p.m. UTC
When BR2_PACKAGE_OPENCV4_WITH_WEBP=y we need to enable mux and demux
too, otherwise build fails as follows:

    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

The issue already exists in 2025.02.x (thanks Thomas for checking),
but not in 2023.08.x whence my defconfig originated.

Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
---

This is v2 of what was called "package/opencv: depend on webp mux/demux",
but as suggested by Thomas the dependency is not uplevel, so this is
fixed according to his suggestions. Tested on current master.

 package/opencv4/Config.in | 2 ++
 1 file changed, 2 insertions(+)

Comments

Thomas Petazzoni Aug. 28, 2026, 9:38 p.m. UTC | #1
Hello,

Thanks for this new iteration!

On Fri, Aug 28, 2026 at 10:02:28PM +0200, Alessandro Rubini wrote:
> When BR2_PACKAGE_OPENCV4_WITH_WEBP=y we need to enable mux and demux
> too, otherwise build fails as follows:
> 
>     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
> 
> The issue already exists in 2025.02.x (thanks Thomas for checking),
> but not in 2023.08.x whence my defconfig originated.

The mention of 2023.08.x and your defconfig here is not very useful.

> 
> Signed-off-by: Alessandro Rubini <rubini@gnudd.com>

Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Thomas
Thomas Petazzoni Aug. 29, 2026, 9:34 p.m. UTC | #2
On Fri, Aug 28, 2026 at 10:02:28PM +0200, Alessandro Rubini wrote:
> When BR2_PACKAGE_OPENCV4_WITH_WEBP=y we need to enable mux and demux
> too, otherwise build fails as follows:
> 
>     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
> 
> The issue already exists in 2025.02.x (thanks Thomas for checking),
> but not in 2023.08.x whence my defconfig originated.
> 
> Signed-off-by: Alessandro Rubini <rubini@gnudd.com>

Applied to master after slightly tweaking the commit message,
especially to add a reference to the autobuilder failure being fixed,
thanks!

Best regards,

Thomas Petazzoni
diff mbox series

Patch

diff --git a/package/opencv4/Config.in b/package/opencv4/Config.in
index 47c1cf3f4a..e4a15f742b 100644
--- a/package/opencv4/Config.in
+++ b/package/opencv4/Config.in
@@ -369,6 +369,8 @@  config BR2_PACKAGE_OPENCV4_WITH_V4L
 config BR2_PACKAGE_OPENCV4_WITH_WEBP
 	bool "webp support"
 	select BR2_PACKAGE_WEBP
+	select BR2_PACKAGE_WEBP_DEMUX
+	select BR2_PACKAGE_WEBP_MUX
 	help
 	  Enable WebP support.