Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sail: Fix compilation with shared=True #26150

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

perseoGI
Copy link
Contributor

Summary

Changes to recipe: sail

  • Bump libavif to fix linkage issues against yuv and libwebp
  • conan v2 refactor

Motivation

When building sail as shared and their dependencies as static, following error appears:

$ conan create recipes/sail/all --version 0.9.6  --build=missing -o '&:shared=True'
...
 "std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char>>::str() const", referenced from:
      jxl::ModularStreamId::DebugString() const in libjxl.a[82](dec_modular.cc.o)
      jxl::BlendingInfo::DebugString() const in libjxl.a[92](frame_header.cc.o)
      jxl::Passes::DebugString() const in libjxl.a[92](frame_header.cc.o)
      jxl::FrameHeader::DebugString() const in libjxl.a[92](frame_header.cc.o)
      jxl::BitDepth::DebugString() const in libjxl.a[100](image_metadata.cc.o)
      jxl::ExtraChannelInfo::DebugString() const in libjxl.a[100](image_metadata.cc.o)
      jxl::ImageMetadata::DebugString() const in libjxl.a[100](image_metadata.cc.o)
      ...
  "std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from:
      std::__1::basic_ostream<char, std::__1::char_traits<char>>& std::__1::__put_character_sequence[abi:un170006]<char, std::__1::char_traits<char>>(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, char const*, unsigned long) in libjxl.a[82](dec_modular.cc.o)
...

New patches aim to modify sail-codecs/jpegxl/CMakeLists.txt to use a standard find_package instead of custom find library logic.
This way conan libjxl can be found by project.

Also, other errors have been found when the previous error were solved:

Undefined symbols for architecture arm64:
  "_SharpYuvConvertWithOptions", referenced from:
      _avifImageRGBToYUVLibSharpYUV in libavif.a[13](reformat_libsharpyuv.c.o)
  "_SharpYuvOptionsInitInternal", referenced from:
      _avifImageRGBToYUVLibSharpYUV in libavif.a[13](reformat_libsharpyuv.c.o)

This error exists in every sail version compiling statically or shared.
Can be fixed bumping libavif dependency to a newer one, as upstream does in their CI downloading the latest version from homebrew. See upstream code.

Minor changes made, removed conan v1 old logic.

Fix #25807


- Bump libavif to fix linkage issues against yuv and libwebp
- conan v2 refactor

Co-authored-by: czoido <mrgalleta@gmail.com>
@perseoGI perseoGI marked this pull request as ready for review December 12, 2024 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[package] libjxl/0.8.2: Cannot be linked against
3 participants