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

Release 1.3.2 tag to support libpng >1.6.40 #1019

Open
gitoss opened this issue Oct 30, 2024 · 8 comments
Open

Release 1.3.2 tag to support libpng >1.6.40 #1019

gitoss opened this issue Oct 30, 2024 · 8 comments

Comments

@gitoss
Copy link

gitoss commented Oct 30, 2024

Not to put too fine a point on it :-)

Releasing a zlib 1.3.2 tag would be nice, or software that relies on a tag to pull zlib is stuck with an outdated libpng 1.6.40 version: https://github.com/AOMediaCodec/libavif/blob/main/cmake/Modules/LocalZlibpng.cmake

@madler
Copy link
Owner

madler commented Nov 2, 2024

What is the issue with libpng?

@gitoss
Copy link
Author

gitoss commented Nov 2, 2024

What is the issue with libpng?

I dunno, I just read the comment in the file above that zlib 1.3.1 is incompatible with png > 1.6.40 - I you want to track the actual problem, you'd have to ask the libavif dev(s).

I just notified you here because I recommended switching to zlib-ng (the dev mentioned chrome zlib) to not have these kinds of problems: AOMediaCodec/libavif#2496

@Neustradamus
Copy link

@madler: Can you look it?

Thanks in advance.

@gregg-platogo
Copy link

grpc/grpc#35855 also related

@vrabaud
Copy link

vrabaud commented Feb 11, 2025

Hi, stumbling here to see if a new release is coming up :) I wrote the comment mentioned by @gitoss. libpng's CMake got cleaner in 1.6.41 (cf https://github.com/pnggroup/libpng/blob/812c34c13c27a963073e546c720f5a7b88b1ed00/CHANGES#L6147) and when installing it, we get the error:

CMake Error: install(EXPORT "libpng" ...) includes target "png_static" which requires target "zlibstatic" that is not in any export set.

which requires https://github.com/AOMediaCodec/libavif/blob/906a8a5bd18a744f0e2e603e1841c1ef5e712677/cmake/Modules/LocalZlibpng.cmake#L61-L64 to work, but necessitates f1f503d to be in an official release

@Vollstrecker
Copy link
Contributor

There's the problem with submodules and deps between them. f1f503d is over a year old and superseeded. You define ZLIB::ZLIB for zlibstatic. ZLIB::ZLIB is the alias for the shared version and you'll get conflicts when current state get's release or you update your submodules. And yes, zlibstatic is not and will not be part of any exportset. For this purpose are the aliases created that work as submodule and when installed under the same name.

shared -> ZLIB:ZLIB
static ->ZLIB::ZLIBSTATIC

@vrabaud
Copy link

vrabaud commented Feb 11, 2025

Thx for the analysis @Vollstrecker . Indeed, ZLIB::ZLIB is an alias to zlibstatic as this is what png_static needs: https://github.com/pnggroup/libpng/blob/812c34c13c27a963073e546c720f5a7b88b1ed00/CMakeLists.txt#L647 . This seems to be what people do (cf pnggroup/libpng#600 for a similar solution). I guess once ZLIB::ZLIBSTSTATIC is in an official release, libpng will have to be fixed too.

@Vollstrecker
Copy link
Contributor

This is the perfect example. It fetches without tag, which means master, and the example fetches a commit that fixes something, but both don't export the complete config with targets. FindZLIB finds something, but static or shared is not specified anywhere. So yes, after this is released and hits distros, many projects out there need to get fixed, or better need to drop their workarounds.

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

No branches or pull requests

6 participants