acmel / dwarves

Pahole and the dwarves
GNU General Public License v2.0
187 stars 50 forks source link

zlib not found but zlib found #32

Open jengelh opened 2 years ago

jengelh commented 2 years ago

dwarves-1.24:

[    2s] + /usr/bin/cmake /home/abuild/rpmbuild/BUILD/dwarves-1.24/. '-GUnix Makefiles' -DCMAKE_INSTALL_PREFIX:PATH=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DCMAKE_INSTALL_LIBDIR:PATH=lib64 -DCMAKE_INSTALL_LIBEXECDIR=/usr/libexec -DCMAKE_BUILD_TYPE=RelWithDebInfo '-DCMAKE_C_FLAGS=-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g' '-DCMAKE_CXX_FLAGS=-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g' '-DCMAKE_Fortran_FLAGS=-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g' '-DCMAKE_EXE_LINKER_FLAGS=-flto=auto -Wl,--as-needed -Wl,--no-undefined -Wl,-z,now' '-DCMAKE_MODULE_LINKER_FLAGS=-flto=auto -Wl,--as-needed' '-DCMAKE_SHARED_LINKER_FLAGS=-flto=auto -Wl,--as-needed -Wl,--no-undefined -Wl,-z,now' -DLIB_SUFFIX=64 -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF -DCMAKE_COLOR_MAKEFILE:BOOL=OFF -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF -DCMAKE_MODULES_INSTALL_DIR=/usr/lib64/cmake/dwarves -DLIBBPF_EMBEDDED=OFF -DCMAKE_SHARED_LINKER_FLAGS:STRING=-Wl,--version-script=/home/abuild/rpmbuild/BUILD/dwarves-1.24/lib.v
[    2s] -- The C compiler identification is GNU 12.2.1
[    2s] -- Detecting C compiler ABI info
[    2s] -- Detecting C compiler ABI info - done
[    2s] -- Check for working C compiler: /usr/bin/cc - skipped
[    2s] -- Detecting C compile features
[    2s] -- Detecting C compile features - done
[    2s] -- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.0") 
[    2s] -- Checking for module 'libbpf>=0.4.0'
[    2s] --   Found libbpf, version 0.8.1
[    2s] -- Checking availability of DWARF and ELF development libraries
[    2s] -- Looking for dwfl_module_build_id in elf
[    2s] -- Looking for dwfl_module_build_id in elf - found
[    2s] -- Found dwarf.h header: /usr/include
[    2s] -- Found elfutils/libdw.h header: /usr/include
[    2s] -- Found libdw library: /usr/lib64/libdw.so
[    2s] -- Found libelf library: /usr/lib64/libelf.so
[    2s] -- Checking availability of DWARF and ELF development libraries - done
[    2s] CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
[    2s]   Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.12")
[    2s] Call Stack (most recent call first):
[    2s]   /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
[    2s]   /usr/share/cmake/Modules/FindZLIB.cmake:150 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
[    2s]   CMakeLists.txt:61 (find_package)

In CMakeFiles/CMakeOutput.log there's absolutely no mention of zlib (other than what gcc -v would say about itself) or line 230.

jengelh commented 2 years ago

aaand it works once zlib-devel-static (libz.a) is installed. Well that's really stupid of cmake.