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

zlib not found but zlib found #32

Open
jengelh opened this issue Sep 6, 2022 · 1 comment
Open

zlib not found but zlib found #32

jengelh opened this issue Sep 6, 2022 · 1 comment

Comments

@jengelh
Copy link

jengelh commented Sep 6, 2022

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
Copy link
Author

jengelh commented Sep 6, 2022

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

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

1 participant