Try building without sasl2. Results in: -- The following OPTIONAL packages have not been found: * Sasl2 , The Cyrus-sasl library. , <http://www.cyrussasl.org/> -- Configuring done and an cmake error: -- Configuring done CMake Error in src/CMakeLists.txt: Found relative path while evaluating include directories of "KF5Ldap": "Sasl2_INCLUDE_DIRS-NOTFOUND" Reproducible: Always Steps to Reproduce: 1. don't have sasl2 installed 2. try running kdesrc-build Actual Results: fails with error, although all required packages are found Expected Results: fails with "required package missing" or proper optional package Full cmake log: # kdesrc-build running: 'cmake' '/home/martin/src/kf5/kde/pim/kldap' '-DCMAKE_CXX_FLAGS:STRING=-pipe -DQT_STRICT_ITERATORS -DQURL_NO_CAST_FROM_STRING -DQT_NO_HTTP -DQT_NO_FTP -Wformat -Werror=format-security -Werror=return-type -Wno-variadic-m acros -Wlogical-op ' '-DCMAKE_INSTALL_PREFIX=/opt/kf5/' # from directory: /opt/build/kf5/kde/pim/kldap -- The C compiler identification is GNU 5.3.1 -- The CXX compiler identification is GNU 5.3.1 -- Check for working C compiler: /usr/lib/icecc/bin/cc -- Check for working C compiler: /usr/lib/icecc/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/lib/icecc/bin/c++ -- Check for working CXX compiler: /usr/lib/icecc/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for __GLIBC__ -- Looking for __GLIBC__ - found -- Performing Test _OFFT_IS_64BIT -- Performing Test _OFFT_IS_64BIT - Success -- Found Gettext: /usr/bin/msgmerge (found version "0.19.7") -- Found PythonInterp: /usr/bin/python (found version "2.7.11") -- Found Ldap: /usr/lib/x86_64-linux-gnu/libldap.so;/usr/lib/x86_64-linux-gnu/liblber.so (found version "2.4.42") -- Checking for module 'libsasl2' -- No package 'libsasl2' found -- Could NOT find Sasl2 (missing: Sasl2_LIBRARIES Sasl2_INCLUDE_DIRS) -- Looking for include file sys/time.h -- Looking for include file sys/time.h - found -- Looking for ldap_start_tls_s -- Looking for ldap_start_tls_s - found -- Looking for ldap_initialize -- Looking for ldap_initialize - found -- Looking for ber_memfree -- Looking for ber_memfree - found -- Looking for ldap_unbind_ext -- Looking for ldap_unbind_ext - found -- Looking for ldap_extended_operation -- Looking for ldap_extended_operation - found -- Looking for ldap_extended_operation_s -- Looking for ldap_extended_operation_s - found -- Looking for ldap_extended_operation -- Looking for ldap_extended_operation - found -- Looking for ldap_extended_operation_s -- Looking for ldap_extended_operation_s - found -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success -- Performing Test COMPILER_HAS_DEPRECATED_ATTR -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success -- -- The following RECOMMENDED packages have been found: * Ldap , LDAP (Lightweight Directory Access Protocol) libraries. , <http://www.openldap.org/> Needed to provide LDAP functionality in KDE -- The following REQUIRED packages have been found: * ECM (required version >= 5.19.0) * Qt5Gui (required version >= 5.6.1) * KF5KIO (required version >= 5.19.0) * KF5DocTools (required version >= 5.19.0) * KF5Mbox (required version >= 5.2.40) * KF5Completion (required version >= 5.19.0) * KF5WidgetsAddons (required version >= 5.19.0) * Gettext * PythonInterp * KF5I18n (required version >= 5.19.0) * Qt5Test -- The following OPTIONAL packages have not been found: * Sasl2 , The Cyrus-sasl library. , <http://www.cyrussasl.org/> -- Configuring done CMake Error in src/CMakeLists.txt: Found relative path while evaluating include directories of "KF5Ldap": "Sasl2_INCLUDE_DIRS-NOTFOUND" CMake Error in kioslave/src/ldap/CMakeLists.txt: Target "KF5::Ldap" contains relative path in its INTERFACE_INCLUDE_DIRECTORIES: "Sasl2_INCLUDE_DIRS-NOTFOUND" CMake Error in autotests/CMakeLists.txt: Target "KF5::Ldap" contains relative path in its INTERFACE_INCLUDE_DIRECTORIES: "Sasl2_INCLUDE_DIRS-NOTFOUND" CMake Error in src/CMakeLists.txt: Found relative path while evaluating include directories of "KF5Ldap": "Sasl2_INCLUDE_DIRS-NOTFOUND" CMake Error in src/CMakeLists.txt: Found relative path while evaluating include directories of "KF5Ldap": "Sasl2_INCLUDE_DIRS-NOTFOUND" CMake Error in kioslave/src/ldap/CMakeLists.txt: Target "KF5::Ldap" contains relative path in its INTERFACE_INCLUDE_DIRECTORIES: "Sasl2_INCLUDE_DIRS-NOTFOUND" CMake Error in kioslave/src/ldap/CMakeLists.txt: Target "KF5::Ldap" contains relative path in its INTERFACE_INCLUDE_DIRECTORIES: "Sasl2_INCLUDE_DIRS-NOTFOUND" "Sasl2_INCLUDE_DIRS-NOTFOUND" CMake Error in src/CMakeLists.txt: Found relative path while evaluating include directories of "KF5Ldap": "Sasl2_INCLUDE_DIRS-NOTFOUND" CMake Error in kioslave/src/ldap/CMakeLists.txt: Target "KF5::Ldap" contains relative path in its INTERFACE_INCLUDE_DIRECTORIES: "Sasl2_INCLUDE_DIRS-NOTFOUND" CMake Error in kioslave/src/ldap/CMakeLists.txt: Target "KF5::Ldap" contains relative path in its INTERFACE_INCLUDE_DIRECTORIES: "Sasl2_INCLUDE_DIRS-NOTFOUND" CMake Error in autotests/CMakeLists.txt: Target "KF5::Ldap" contains relative path in its INTERFACE_INCLUDE_DIRECTORIES: "Sasl2_INCLUDE_DIRS-NOTFOUND" CMake Error in autotests/CMakeLists.txt: Target "KF5::Ldap" contains relative path in its INTERFACE_INCLUDE_DIRECTORIES: "Sasl2_INCLUDE_DIRS-NOTFOUND" -- Generating done -- Build files have been written to: /opt/build/kf5/kde/pim/kldap
after installing sasl2, the kldap configures and builds correctly.
Git commit ad7cac6cc31b2f6ecb69a24f5a390945a7e1a3ae by Montel Laurent. Committed on 25/04/2016 at 19:03. Pushed by mlaurent into branch 'Applications/16.04'. Fix Bug 362251 - Sasl2 optional but build fails without it FIXED-IN: 5.2.1 M +7 -2 src/CMakeLists.txt http://commits.kde.org/kldap/ad7cac6cc31b2f6ecb69a24f5a390945a7e1a3ae