Your message dated Fri, 15 Nov 2024 15:54:33 +0200
with message-id <[email protected]>
and subject line Re: Bug#1087550: cmake-data: FindZLIB.cmake fails to populate 
ZLIB_INCLUDE_DIRS and ZLIB_LIBRARIES
has caused the Debian Bug report #1087550,
regarding cmake-data: FindZLIB.cmake fails to populate ZLIB_INCLUDE_DIRS and 
ZLIB_LIBRARIES
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1087550: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1087550
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: cmake-data
Version: 3.31.0-1
Severity: important
Affects: macromoleculebuilder
Control: block 1086362 by -1

Hello,

FindZLIB.cmake does not populate the declared result variables ZLIB_INCLUDE_DIRS, ZLIB_LIBRARIES and so on. In fact, it seems as if it does not find ZLIB at all (ZLIB_FOUND is undefined). Minimal failing example:

cmake_minimum_required(VERSION 3.31)
project(test LANGUAGES CXX)
find_package(ZLIB REQUIRED)

Resulting CMakeCache.txt does not contain neither ZLIB_INCLUDE_DIRS nor ZLIB_LIBRARIES.

zlib1g-dev 1:1.3.dfsg+really1.3.1-1 is installed.

Interestingly, it seems that this problem persists for a longer time. I tried running the same MFE (without cmake_minimum_required()) on Ubuntu 20.04 (cmake-data 3.16.3-1ubuntu1.20.04.1, zlib1g-dev 1:1.2.11.dfsg-2ubuntu1.5) and the declared result variables ZLIB_INCLUDE_DIRS and ZLIB_LIBRARIES are not set there as well.

Not sure whether this issue is Debian-specific or belongs with the upstream. I spotted it when dealing with #1086362.

Andrius

--- End Message ---
--- Begin Message ---
Hi,

On 2024-11-15 15:48, Brad King wrote:
On Fri, Nov 15, 2024 at 2:45 AM Andrius Merkys wrote:
find_package(ZLIB REQUIRED)
Resulting CMakeCache.txt does not contain neither
ZLIB_INCLUDE_DIRS nor ZLIB_LIBRARIES.

Those are not expected to be in the cache.  FindZLIB
sets them as normal variables that are available to the
caller of `find_package(ZLIB)`.  The cache should have
entries corresponding to individual zlib artifacts, such as
`ZLIB_INCLUDE_DIR` and `ZLIB_LIBRARY_RELEASE`

You are right, these variables do not appear in cache, but are indeed seen as set when outputted as:

message(STATUS "${ZLIB_LIBRARIES}")

Then this is not a bug. Sorry for the noise, closing.

Andrius

--- End Message ---

Reply via email to