Issue 583 in webp: WebPConfig CMake module is broken when WEBP_USE_THREADS is ON

377 views
Skip to first unread message

a… via monorail

unread,
Oct 1, 2022, 9:29:44 PM10/1/22
to webp-d...@webmproject.org
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 583 by a...@amyspark.me: WebPConfig CMake module is broken when WEBP_USE_THREADS is ON
https://bugs.chromium.org/p/webp/issues/detail?id=583

What steps will reproduce the problem?
1. Compile WebP.
2. Use WebP in another CMake project.

What is the expected output? What do you see instead?

When trying to use WebP out of the box, this error is logged:

CMake Error at /home/amalia/krita/android-build-arm64/i/share/cmake/WebP/WebPTargets.cmake:77 (set_target_properties):
The link interface of target "WebP::webp" contains:

Threads::Threads

but the target was not found. Possible reasons include:

* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.

Call Stack (most recent call first):
/home/amalia/krita/android-build-arm64/i/share/cmake/WebP/WebPConfig.cmake:30 (include)
cmake/modules/FindWebP.cmake:75 (find_package)
CMakeLists.txt:797 (find_package)

The error will not happen if any other Find module has already looked Threads up.

What version of the product are you using? On what operating system?
WebP 1.2.4 on Android, ndk/22.1.7171670, API level 23, arm64

Please provide any additional information below.

Regression is caused by https://chromium-review.googlesource.com/c/webm/libwebp/+/3680105.

The changeset changes the dependency to use the imported target Threads::Threads, but the author did not add the corresponding lookup to WebPConfig.cmake.in.

Issue was found as part of Krita's 5.1 library update drive: https://invent.kde.org/graphics/krita/-/merge_requests/1594

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

jz… via monorail

unread,
Oct 4, 2022, 3:55:14 PM10/4/22
to webp-d...@webmproject.org
Updates:
Cc: cddeg...@gmail.com
Owner: jz...@google.com
Status: Accepted

Comment #1 on issue 583 by jz...@google.com: WebPConfig CMake module is broken when WEBP_USE_THREADS is ON
https://bugs.chromium.org/p/webp/issues/detail?id=583#c1

Thanks for the report, we must be missing some coverage here. There's something that does find_packge(WebP) after an install, but it doesn't try to add the dependency to a target. I'll fix that and send a patch based on yours.

cddeg… via monorail

unread,
Oct 4, 2022, 3:59:55 PM10/4/22
to webp-d...@webmproject.org

Comment #2 on issue 583 by cddeg...@gmail.com: WebPConfig CMake module is broken when WEBP_USE_THREADS is ON
https://bugs.chromium.org/p/webp/issues/detail?id=583#c2

Sorry about the regression, I mainly tested with pkg-config and don't have many packages locally that build using cmake's find_package, so that flew way under my radar (or maybe above?)

Git Watcher via monorail

unread,
Oct 4, 2022, 6:40:11 PM10/4/22
to webp-d...@webmproject.org
Updates:
Status: Fixed

Comment #3 on issue 583 by Git Watcher: WebPConfig CMake module is broken when WEBP_USE_THREADS is ON
https://bugs.chromium.org/p/webp/issues/detail?id=583#c3

The following revision refers to this bug:
https://chromium.googlesource.com/webm/libwebp/+/5dbc4bfa1b6a6f3b4cc27c99a9e77fc7baa5677c

commit 5dbc4bfa1b6a6f3b4cc27c99a9e77fc7baa5677c
Author: James Zern <jz...@google.com>
Date: Tue Oct 04 20:01:12 2022

WebPConfig.cmake.in: add find_dependency(Threads)

when WEBP_USE_THREAD=1; this is necessary after:
0d1b9bc4 WEBP_DEP_LIBRARIES: use Threads::Threads

fixes:
CMake Error at WebPTargets.cmake:76 (set_target_properties):

The link interface of target "WebP::webp" contains:

Threads::Threads

but the target was not found. Possible reasons include:

* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.

Bug: webp:583
Change-Id: I19633bcceccacb95be06aa9610512127f3c288a6
Fixed: webp:583

[modify] https://crrev.com/5dbc4bfa1b6a6f3b4cc27c99a9e77fc7baa5677c/cmake/WebPConfig.cmake.in

Git Watcher via monorail

unread,
Feb 28, 2023, 7:16:09 PMFeb 28
to webp-d...@webmproject.org
Updates:
Labels: merge-merged-1.2.4

Comment #5 on issue 583 by Git Watcher: WebPConfig CMake module is broken when WEBP_USE_THREADS is ON
https://bugs.chromium.org/p/webp/issues/detail?id=583#c5


The following revision refers to this bug:

Author: James Zern <jz...@google.com>
Date: Tue Oct 04 20:01:12 2022

WebPConfig.cmake.in: add find_dependency(Threads)

when WEBP_USE_THREAD=1; this is necessary after:
0d1b9bc4 WEBP_DEP_LIBRARIES: use Threads::Threads

fixes:
CMake Error at WebPTargets.cmake:76 (set_target_properties):
The link interface of target "WebP::webp" contains:

Threads::Threads

but the target was not found. Possible reasons include:

* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.

Bug: webp:583
Change-Id: I19633bcceccacb95be06aa9610512127f3c288a6
Fixed: webp:583
(cherry picked from commit 5dbc4bfa1b6a6f3b4cc27c99a9e77fc7baa5677c)

[modify] https://crrev.com/b24b22fbc8bc91a8005e5057c2be431ded0e0e11/cmake/WebPConfig.cmake.in
Reply all
Reply to author
Forward
0 new messages