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

zlib: reflect correct library name on Windows mingw #26165

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

jcar87
Copy link
Contributor

@jcar87 jcar87 commented Dec 11, 2024

Summary

Changes to recipe: zlib

Motivation

Close #14440

Details

  • Fix an issue where if zlib is built with clang on msys2/clang64 - the library in cpp_info does not match the generated files

  • Note that this is a legacy bug as a result of zlib: fix lib name in CMakeLists directly instead of fragile renaming #10771, perhaps to work around a Conan limitation at the time. Nowadays we wouldn't accept a recipe that modifies the generated library files, and cpp_info should merely reflect the generated files - but we also can't undo that now, because renaming libraries across recipe revisions would cause widespread issues.

  • Note that as a result of the aforementioned PR, windows + msys2/clang + zlib with shared=True will not build - no attempt is made in this PR to fix this.

tested on Windows to work with:

  • msvc (shared and static)
  • clang-cl from an msvc installation (shared and static)
  • gcc14 mingw (shared and static)
  • clang19 msys2 (static only, for shared lld does not accept --version-script)

@jcar87 jcar87 requested a review from memsharded December 11, 2024 17:23
@jcar87
Copy link
Contributor Author

jcar87 commented Dec 11, 2024

cc @mhthies

@jcar87 jcar87 marked this pull request as ready for review December 11, 2024 21:07
@jcar87 jcar87 merged commit 9ed9933 into master Dec 12, 2024
9 checks passed
@jcar87 jcar87 deleted the lcc/bugfix/zlib-mingw-names branch December 12, 2024 07:41
@mhthies
Copy link

mhthies commented Dec 12, 2024

Thanks for fixing and merging this so quickly! :)

OMGtechy pushed a commit to OMGtechy/conan-center-index that referenced this pull request Dec 31, 2024
* zlib: reflect correct library name on Windows mingw

* Simplify logic and add comment
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] minizip/1.2.13: Windows MinGW Clang fails to compile
3 participants