Issue 578 in webp: libwebp.pc does not expose -lsharpyuv for linking with ffmpeg

30 views
Skip to first unread message

cddeg… via monorail

unread,
Aug 2, 2022, 2:10:03 PMAug 2
to webp-d...@webmproject.org
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 578 by cddeg...@gmail.com: libwebp.pc does not expose -lsharpyuv for linking with ffmpeg
https://bugs.chromium.org/p/webp/issues/detail?id=578

What steps will reproduce the problem?
1. build and install a static libwebp from repo
2. configure ffmpeg with --enable-libwebp

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

$ pkg-config --libs --static libwebp
-lwebp -lm -lsharpyuv

actual:
$ pkg-config --libs --static libwebp
-lwebp -lm

ld.exe: libwebp.a(picture_csp_enc.c.o):picture_csp_en:(.text+0x79d): undefined reference to `SharpYuvInit'
ld.exe: libwebp.a(picture_csp_enc.c.o):picture_csp_en:(.text+0x7a9): undefined reference to `SharpYuvGetConversionMatrix'
ld.exe: libwebp.a(picture_csp_enc.c.o):picture_csp_en:(.text+0x860): undefined reference to `SharpYuvConvert'

What version of the product are you using? On what operating system?
3fe15b67
Windows 11 with msys2

Please provide any additional information below.

--
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

cddeg… via monorail

unread,
Aug 2, 2022, 2:14:51 PMAug 2
to webp-d...@webmproject.org

Comment #1 on issue 578 by cddeg...@gmail.com: libwebp.pc does not expose -lsharpyuv for linking with ffmpeg
https://bugs.chromium.org/p/webp/issues/detail?id=578#c1

A simple, but possibly wrong fix would be

```diff
diff --git a/src/libwebp.pc.in b/src/libwebp.pc.in
index 733bb6db..411fa210 100644
--- a/src/libwebp.pc.in
+++ b/src/libwebp.pc.in
@@ -8,4 +8,4 @@ Description: Library for the WebP graphics format
Version: @PACKAGE_VERSION@
Cflags: -I${includedir}
Libs: -L${libdir} -lwebp
-Libs.private: -lm @PTHREAD_CFLAGS@ @PTHREAD_LIBS@
+Libs.private: -lm -lsharpyuv @PTHREAD_CFLAGS@ @PTHREAD_LIBS@
```

Mainly as it seem that the library is always unconditionally installed with libwebp, so I don't think this would require using `@VAR@` for it

jz… via monorail

unread,
Aug 2, 2022, 2:49:34 PMAug 2
to webp-d...@webmproject.org
Updates:
Owner: mar...@google.com
Status: Accepted

Comment #2 on issue 578 by jz...@google.com: libwebp.pc does not expose -lsharpyuv for linking with ffmpeg
https://bugs.chromium.org/p/webp/issues/detail?id=578#c2

Thanks for the report. libsharpyuv is in the process of being separated out for the 1.3.0 release. If you need something stable in the meantime you can try using the v1.2.3 tag.

cddeg… via monorail

unread,
Aug 2, 2022, 2:51:09 PMAug 2
to webp-d...@webmproject.org

Comment #3 on issue 578 by cddeg...@gmail.com: libwebp.pc does not expose -lsharpyuv for linking with ffmpeg
https://bugs.chromium.org/p/webp/issues/detail?id=578#c3

Separated as in into a similar situation as libyuv?

jz… via monorail

unread,
Aug 2, 2022, 4:17:34 PMAug 2
to webp-d...@webmproject.org

Comment #4 on issue 578 by jz...@google.com: libwebp.pc does not expose -lsharpyuv for linking with ffmpeg
https://bugs.chromium.org/p/webp/issues/detail?id=578#c4


> Separated as in into a similar situation as libyuv?

Correct. The intent is to use the library in libavif for a start.

jz… via monorail

unread,
Aug 2, 2022, 10:15:24 PMAug 2
to webp-d...@webmproject.org
Updates:
Cc: mar...@google.com
Owner: jz...@google.com
Status: Fixed

Comment #5 on issue 578 by jz...@google.com: libwebp.pc does not expose -lsharpyuv for linking with ffmpeg
https://bugs.chromium.org/p/webp/issues/detail?id=578#c5

I forgot to ask that Bug: webp:578 be added to the commit message before merging.

commit 04764b56a00417d9c3aa5105f3b62a4445ac1fe6
Author: Christopher Degawa <cc...@randomderp.com>
Date: Tue Aug 2 15:58:49 2022 -0500

libwebp.pc: add libsharpyuv to requires

Signed-off-by: Christopher Degawa <cc...@randomderp.com>
Change-Id: I7111d1f7738dad566dc74fc11be99ff92e11c50b

commit 7deee8103edf77bf68095253668f4818d09609e1
Author: Christopher Degawa <cc...@randomderp.com>
Date: Tue Aug 2 15:46:19 2022 -0500

libsharpyuv: add pkg-config file

Signed-off-by: Christopher Degawa <cc...@randomderp.com>
Change-Id: I872cd62ccdf096044c7921afda8289849d141531
Reply all
Reply to author
Forward
0 new messages