libavif-rs icon indicating copy to clipboard operation
libavif-rs copied to clipboard

Compile with libyuv

Open njaard opened this issue 3 years ago • 3 comments

libavif doesn't get compiled with libyuv right now, because it causes linking to fail.

njaard avatar Apr 05 '22 22:04 njaard

I'm having an issue simply compiling libavif (v0.11.0 from crates.io):

  = note: ld.lld: error: undefined symbol: SharpYuvComputeConversionMatrix
          >>> referenced by reformat_libsharpyuv.c:18 (/home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libavif-sys-0.14.1/libavif/src/reformat_libsharpyuv.c:18)
          >>>               reformat_libsharpyuv.c.o:(avifImageRGBToYUVLibSharpYUV) in archive /home/user/test-av1/target/debug/deps/liblibavif_sys-d6b741de7f38e7b1.rlib
          
          ld.lld: error: undefined symbol: SharpYuvConvert
          >>> referenced by reformat_libsharpyuv.c:19 (/home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libavif-sys-0.14.1/libavif/src/reformat_libsharpyuv.c:19)
          >>>               reformat_libsharpyuv.c.o:(avifImageRGBToYUVLibSharpYUV) in archive /home/user/test-av1/target/debug/deps/liblibavif_sys-d6b741de7f38e7b1.rlib

From a bit of digging, I figured that it requires libsharpyuv, which I have on my system from libwebp. Do you know by any chance what the issue is? Is it related to this issue?

daxpedda avatar Apr 09 '23 22:04 daxpedda

@daxpedda it's not really related, but I just pushed a new version of libavif-sys to crates.io which should fix your problem, by disabling searching for that library.

njaard avatar Apr 10 '23 17:04 njaard

Thanks, can confirm it works now!

daxpedda avatar Apr 11 '23 08:04 daxpedda