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

minizip-ng-config.cmake relies on non-existant zlib-ng-config.cmake #722

Open
negril opened this issue Jun 27, 2023 · 4 comments
Open

minizip-ng-config.cmake relies on non-existant zlib-ng-config.cmake #722

negril opened this issue Jun 27, 2023 · 4 comments
Labels
build system Build system and script changes

Comments

@negril
Copy link

negril commented Jun 27, 2023

As per https://cmake.org/cmake/help/latest/module/CMakeFindDependencyMacro.html calling find_dependency(ZLIBNG REQUIRED) requires a zlib-ng-config.cmake which zlib-ng does not install.

@nmoinvaz nmoinvaz added the build system Build system and script changes label Feb 17, 2024
@negril
Copy link
Author

negril commented Feb 8, 2025

Seemingly fixed in zlib-ng/zlib-ng#1601

@negril negril closed this as completed Feb 8, 2025
@negril negril reopened this Feb 8, 2025
@nmoinvaz
Copy link
Member

nmoinvaz commented Feb 9, 2025

Why reopened?

@parona-source
Copy link

parona-source commented Feb 10, 2025

Why reopened?

minizip-ng uses find_package(ZLIBNG QUIET) which matches zlibng-config.cmake but not zlib-ng-config.cmake. This then gets added to minizip-ng.cmake which doesn't work with zlib-ng-config.cmake.

Thinking about a change like this parona-source@982eda6. Ive to see if other distribution install FindZLIBNG systemwide without a zlib-ng package config file, meaning this change would break it for them.

parona-source added a commit to parona-source/minizip-ng that referenced this issue Feb 10, 2025
Modify in tree zlib-ng find module to the same name.

Bug: zlib-ng#722
Signed-off-by: Alfred Wingate <[email protected]>
@negril
Copy link
Author

negril commented Feb 11, 2025

To add to that.
Relevant here is that zlib-ng installs zlib-ng-config.cmake not zlibng-config.cmake that minizip-ng tries to find in
FindZLIBNG.cmake.

cmake_minimum_required(VERSION 3.26)
project(test CXX)

find_package(minizip-ng REQUIRED)

yields

CMake Error at /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:76 (find_package):
  By not providing "FindZLIBNG.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "ZLIBNG", but
  CMake did not find one.

  Could not find a package configuration file provided by "ZLIBNG" with any
  of the following names:

    ZLIBNGConfig.cmake
    zlibng-config.cmake

  Add the installation prefix of "ZLIBNG" to CMAKE_PREFIX_PATH or set
  "ZLIBNG_DIR" to a directory containing one of the above files.  If "ZLIBNG"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  /usr/lib64/cmake/minizip-ng/minizip-ng-config.cmake:37 (find_dependency)
  CMakeLists.txt:4 (find_package)


-- Configuring incomplete, errors occurred!

This is was caused by having a ZLIBNG as the internal name and then using the custom FindZLIBNG.cmake as zlib-ng used to not install zlib-ng-config.cmake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build system Build system and script changes
Projects
None yet
Development

No branches or pull requests

3 participants