Bug 430348 - Failure in dependency detection for “zlib”
Summary: Failure in dependency detection for “zlib”
Status: RESOLVED DOWNSTREAM
Alias: None
Product: frameworks-karchive
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.77.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-13 18:01 UTC by Markus Elfring
Modified: 2020-12-16 15:16 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Log file variant for a build approach from 2020-12-13 (58.31 KB, text/plain)
2020-12-14 20:10 UTC, Markus Elfring
Details
Another log file from 2020-12-13 (3.33 KB, text/plain)
2020-12-14 20:16 UTC, Markus Elfring
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Elfring 2020-12-13 18:01:01 UTC
SUMMARY
I would like to build a selection of components for an application.

STEPS TO REPRODUCE
elfring@Sonne:~/Projekte/KDE/src/kdesrc-build> ./kdesrc-build karchive

OBSERVED RESULT
The software build try fails.
A file “cmake.log” contains the following information despite of the installed software package “zlib-devel 1.2.11-18.1”.

“…
-- The following REQUIRED packages have not been found:

 * ZLIB, Support for gzip compressed files and data streams, …
…”


EXPECTED RESULT
The dependency resolution will succeed so that the build attempt can be continued.
Comment 1 Markus Elfring 2020-12-13 19:46:36 UTC
(In reply to comment #0)
Is really a manual configuration needed for corresponding CMake variables?
Comment 2 Christophe Marin 2020-12-14 15:26:10 UTC
the log file is missing in your report.

Note that FindZLIB.cmake is provided by CMake directly.
Comment 3 Markus Elfring 2020-12-14 15:50:26 UTC
(In reply to Christophe Giboudeaux from comment #2)
I observed that the script “/usr/share/cmake/Modules/FindZLIB.cmake” triggers special configuration challenges for my development system.

Would you like to help any more with possible software adjustments?
Comment 4 Christophe Marin 2020-12-14 17:08:01 UTC
FindZLIB.cmake is a relatively simple CMake module that looks for zlib headers and library. 

The log in your report is incomplete. CMake likely gave more details.
Comment 5 Markus Elfring 2020-12-14 17:38:03 UTC
(In reply to Christophe Giboudeaux from comment #4)
Would you find an information like the following more helpful?

~/Projekte/KDE/src/log/2020-12-13-01/karchive/cmake.log:
“…
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.11")
…”


How do you think about to clarify any more system configuration options?
Comment 6 Christophe Marin 2020-12-14 17:42:31 UTC
This is the feature summary, not the CMake log.

mkdir build
cd build
cmake ..

and you will see why detection fails.
Comment 7 Markus Elfring 2020-12-14 19:22:26 UTC
(In reply to Christophe Giboudeaux from comment #6)
I determined possible reasons already for the failed build checks.

* I find that a storage location like “/usr/lib64/pkgconfig/zlib.pc”
  (or “/usr/lib64/libz.so”) should be also considered by the build script
  (besides the found header file).

* My Linux software distribution does not provide a debug package so far.
  https://build.opensuse.org/package/show/openSUSE%3AFactory/zlib

* I can choose a setting for the variable “ZLIB_LIBRARY”
  which let a build generation succeed by the program
  “CMake GUI 3.19.1-438.d_t_b.2”.
  But it seems that such a selection is not picked up by
  the tool “kdesrc-build” so far.
Comment 8 Christophe Marin 2020-12-14 19:59:48 UTC
Please attach the CMake log output.
Comment 9 Markus Elfring 2020-12-14 20:10:23 UTC
Created attachment 134079 [details]
Log file variant for a build approach from 2020-12-13
Comment 10 Markus Elfring 2020-12-14 20:12:18 UTC
(In reply to Christophe Giboudeaux from comment #8)
Do you find the attachment 134079 [details] more helpful for a corresponding software build inspection?
Comment 11 Markus Elfring 2020-12-14 20:16:58 UTC
Created attachment 134080 [details]
Another log file from 2020-12-13

I hope that such data reduce the probability for undesirable misunderstandings another bit.
Comment 12 Christophe Marin 2020-12-14 20:53:54 UTC
> -- Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.11")

This indicates the zlib headers were found but not the library.

Which distribution is it?

is /usr/lib64/libz.so present?
Comment 13 Markus Elfring 2020-12-14 21:04:43 UTC
(In reply to Christophe Giboudeaux from comment #12)
The package “zlib-devel 1.2.11-18.1” of the software distribution “openSUSE Tumbleweed” provides also the files “/usr/lib64/pkgconfig/zlib.pc” and “/usr/lib64/libz.so”.
https://build.opensuse.org/package/view_file/openSUSE:Factory/zlib/zlib.spec
Comment 14 Christophe Marin 2020-12-14 21:25:10 UTC
(In reply to Markus Elfring from comment #13)
> (In reply to Christophe Giboudeaux from comment #12)
> The package “zlib-devel 1.2.11-18.1” of the software distribution “openSUSE
> Tumbleweed” provides also the files “/usr/lib64/pkgconfig/zlib.pc” and
> “/usr/lib64/libz.so”.

Builds fine locally and our package tracking git also builds successfully: https://build.opensuse.org/package/show/KDE:Unstable:Frameworks/karchive
Comment 15 Markus Elfring 2020-12-14 21:30:08 UTC
(In reply to Christophe Giboudeaux from comment #14)
Do you use subdirectories and file names for this library in your software build environment which are different from my system configuration?
Comment 16 Markus Elfring 2020-12-15 10:38:12 UTC
(In reply to Christophe Giboudeaux from comment #4)
Would you like to add any information to another bug report?

Adjust module “FindZLIB.cmake”
https://gitlab.kitware.com/cmake/cmake/-/issues/21600
Comment 17 Markus Elfring 2020-12-15 16:00:27 UTC
(In reply to Christophe Giboudeaux from comment #12)
> is /usr/lib64/libz.so present?

Would you like to share further ideas for the following information?

Sonne:~ # zypper in -f zlib-devel
Loading repository data...
Reading installed packages...
Forcing installation of 'zlib-devel-1.2.11-18.1.x86_64' from repository 'Steppenläufer'.
Resolving package dependencies...

The following package is going to be reinstalled:
  zlib-devel

1 package to reinstall.
Overall download size: 122.7 KiB. Already cached: 0 B. No additional space will be used or freed after the operation.
Continue? [y/n/v/...? shows all options] (y): 
Retrieving package zlib-devel-1.2.11-18.1.x86_64                                                                                       (1/1), 122.7 KiB (386.0 KiB unpacked)
Retrieving: zlib-devel-1.2.11-18.1.x86_64.rpm ........................................................................................................................[done]

Checking for file conflicts: .........................................................................................................................................[done]
(1/1) Installing: zlib-devel-1.2.11-18.1.x86_64 ......................................................................................................................[done]
Sonne:~ # ls -l /usr/lib64/libz.so /usr/lib64/libz.so.1.2.11
ls: cannot access '/usr/lib64/libz.so.1.2.11': No such file or directory
lrwxrwxrwx 1 root root 14 Dec  3 18:48 /usr/lib64/libz.so -> libz.so.1.2.11
Comment 18 Markus Elfring 2020-12-15 16:10:48 UTC
elfring@Sonne:~> locate libz.so.1.2.11
/lib/libz.so.1.2.11
/lib64/libz.so.1.2.11
Comment 19 Markus Elfring 2020-12-15 17:03:17 UTC
(In reply to comment #0)
Do I really need to “fix” a software package like “zlib-devel” (which was broken anyhow?) by a command like the following?

Sonne:~ # my_target=/usr/lib64/libz.so && rm $my_target && my_zlib=libz.so.1.2.11 && cp -p "/lib64/$my_zlib" /usr/lib64 && ln -s "/usr/lib64/$my_zlib" $my_target
Comment 20 Markus Elfring 2020-12-16 09:34:25 UTC
(In reply to comment #7)
A debug package is also available with a name alternative.
http://download.opensuse.org/tumbleweed/repo/debug/x86_64/libz1-debuginfo-1.2.11-18.1.x86_64.rpm
Comment 21 Christophe Marin 2020-12-16 11:37:00 UTC
Looks like your libz1 package is obsolete. Please run zypper dup. or force a reinstallation (zypper in -f libz1).

Not a KDE issue however.
Comment 22 Markus Elfring 2020-12-16 15:16:19 UTC
(In reply to Christophe Giboudeaux from comment #21)
A build attempt was temporarily affected for this software because of a known dependency on a (de)compression library.