Closed mshurutov closed 4 months ago
I tried disabling libselinux library search but cmake was still searching for this library:
mshurutov@nbook06 git $ cp -a librepo{.orig,}
mshurutov@nbook06 git $ mkdir librepo/build
mshurutov@nbook06 git $ cd librepo/build
mshurutov@nbook06 build $ cmake -DCMAKE_DISABLE_FIND_PACKAGE_libselinux=ON ..
-- The C compiler identification is GNU 13.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "2.1.1")
-- Checking for modules 'glib-2.0>=2.66;gio-2.0'
-- Found glib-2.0, version 2.78.3
-- Found gio-2.0, version 2.78.3
-- Checking for one of the modules 'libcrypto;openssl'
-- Checking for module 'libxml-2.0'
-- Found libxml-2.0, version 2.12.5
-- Found CURL: /usr/lib64/libcurl.so (found suitable version "8.6.0", minimum required is "7.52.0")
-- Found gpgme-config at /usr/bin/gpgme-config
-- Found gpgme v1.23.2, checking for flavours...
-- Found flavour 'vanilla', checking whether it's usable...yes
-- Found flavour 'pthread', checking whether it's usable...yes
-- Usable gpgme flavours found: vanilla pthread
-- Checking for module 'libselinux'
-- Package 'libselinux', required by 'virtual:world', not found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:607 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPkgConfig.cmake:829 (_pkg_check_modules_internal)
CMakeLists.txt:42 (PKG_CHECK_MODULES)
-- Configuring incomplete, errors occurred!
mshurutov@nbook06 build $
Hi, there was an ENABLE_SELINUX
option with default = true
added recently to librepo: https://github.com/rpm-software-management/librepo/blob/1.17.0/CMakeLists.txt#L10. I think you just need to disable this one.
@jan-kolarik, Thank you very much for your answer!
Hi,
I don't use SELINUX, it is disabled in the kernel and no selinux packages arw installed. But cmake looks for it during configure:
How can I disable selinux library search?