[CMake] Problem with CMake _not_ failing due to unsatisfied indirect project dependencies

Bartosz Brachaczek b.brachaczek at gmail.com
Sat Jul 2 14:57:01 EDT 2011


Hello,
I received report from a Debian testing user (using cmake 2.8.4 from
Ubuntu repo) that gadu_protocol plugin for Kadu IM[1] was linked
improperly (it didn't link to libgadu) and refused to load. After
small investigation we found out that it was due to missing gnutls.pc
in his system. I'm attaching some logs. Note that Kadu IM checks for
libgadu using the following command:
    pkg_search_module (LIBGADU REQUIRED libgadu>=${LIBGADU_MIN_VERSION})

My question here is whether there is a way to force CMake to fail in
such case, informing user about unsatisfied dependencies. Or maybe
it's just a regular bug that I should report to your bug tracking
system?

Cheers,
Bartosz

[1] Sources to browse online available here:
https://gitorious.org/kadu/kadu/trees/0.10.0-beta1.
-------------- next part --------------
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: libgadu
Version: 1.11.0
Description: libgadu
Requires:  gnutls
Libs: -L${libdir} -lgadu  -pthread  -lz -lgnutls  
Cflags: -I${includedir}  -pthread  
-------------- next part --------------
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- No NETWORK_IMPLEMENTATION defined. Autodetected implementation: Qt
fatal: Not a git repository (or any parent up to mount parent )
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
-- Looking for include files HAVE_EXECINFO
-- Looking for include files HAVE_EXECINFO - found
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found.
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found.
-- Found Qt-Version 4.7.3 (using /usr/bin/qmake)
-- Found Kadu headers: /usr/local/include/kadu/kadu
-- checking for one of the modules 'qca2'
-- Looking for XOpenDisplay in /usr/lib/i386-linux-gnu/libX11.so;/usr/lib/i386-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/i386-linux-gnu/libX11.so;/usr/lib/i386-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/i386-linux-gnu/libX11.so
-- Found X11 libraries: /usr/lib/i386-linux-gnu/libX11.so
-- Found X11 Xfixes extension: /usr/lib/i386-linux-gnu/libXfixes.so
-- Using Qt network implementation
-- Plugin: amarok1_mediaplayer
-- Plugin: antistring
-- Plugin: auto_hide
-- Plugin: autoaway
-- Plugin: autoresponder
-- Plugin: autostatus
-- Plugin: cenzor
-- Plugin: chat_notify
-- Plugin: config_wizard
-- Plugin: desktop_docking
-- Plugin: docking
-- Plugin: encryption_ng
-- Plugin: encryption_ng_simlite
-- Plugin: exec_notify
-- Plugin: ext_sound
-- Plugin: falf_mediaplayer
-- Plugin: filedesc
-- Plugin: firewall
-- Plugin: freedesktop_notify
-- Plugin: gadu_protocol
-- checking for one of the modules 'libgadu>=1.11.0'
Package gnutls was not found in the pkg-config search path.
Perhaps you should add the directory containing `gnutls.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gnutls', required by 'libgadu', not found
Package gnutls was not found in the pkg-config search path.
Perhaps you should add the directory containing `gnutls.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gnutls', required by 'libgadu', not found
Package gnutls was not found in the pkg-config search path.
Perhaps you should add the directory containing `gnutls.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gnutls', required by 'libgadu', not found
Package gnutls was not found in the pkg-config search path.
Perhaps you should add the directory containing `gnutls.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gnutls', required by 'libgadu', not found
Package gnutls was not found in the pkg-config search path.
Perhaps you should add the directory containing `gnutls.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gnutls', required by 'libgadu', not found
Package gnutls was not found in the pkg-config search path.
Perhaps you should add the directory containing `gnutls.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gnutls', required by 'libgadu', not found
Package gnutls was not found in the pkg-config search path.
Perhaps you should add the directory containing `gnutls.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gnutls', required by 'libgadu', not found
Package gnutls was not found in the pkg-config search path.
Perhaps you should add the directory containing `gnutls.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gnutls', required by 'libgadu', not found
Package gnutls was not found in the pkg-config search path.
Perhaps you should add the directory containing `gnutls.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gnutls', required by 'libgadu', not found
Package gnutls was not found in the pkg-config search path.
Perhaps you should add the directory containing `gnutls.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gnutls', required by 'libgadu', not found
Package gnutls was not found in the pkg-config search path.
Perhaps you should add the directory containing `gnutls.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gnutls', required by 'libgadu', not found
Package gnutls was not found in the pkg-config search path.
Perhaps you should add the directory containing `gnutls.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gnutls', required by 'libgadu', not found
--  * libgadu (version 1.11.0) was found in /usr/lib
-- Plugin: hints
-- Plugin: history
-- Plugin: history_migration
-- Plugin: idle
-- Found X11 Screen Saver extension: /usr/lib/libXss.so
-- Plugin: imagelink
-- Plugin: jabber_protocol
-- checking for one of the modules 'libidn'
-- Found ZLIB: /usr/include (found version "1.2.3.4")
-- Plugin: last_seen
-- Plugin: mediaplayer
-- Plugin: mprisplayer_mediaplayer
-- Plugin: pcspeaker
-- Plugin: phonon_sound
-- Plugin: profiles_import
-- Plugin: qt4_docking
-- Plugin: qt4_docking_notify
-- Plugin: qt4_sound
-- Plugin: screenshot
-- Plugin: simpleview
-- Plugin: single_window
-- Plugin: sms
-- Plugin: sound
-- checking for one of the modules 'sndfile>=1.0'
-- Plugin: speech
-- Plugin: spellchecker
-- Found ASPELL: /usr/lib/libaspell.so 
-- Using aspell as backend. To force enchant use -DWITH_ENCHANT=ON
-- Plugin: sql_history
-- Plugin: tabs
-- Plugin: word_fix
-- Emoticon theme: penguins
-- Emoticon theme: tango
-- Icon theme: default
-- Icon theme: glass
-- Icon theme: oxygen
-- Sound theme: default
-- Kadu (version: 0.10.0-beta1) will be built:
--  * install prefix: /usr/local
--  * build type: Debug
-- Configuring done
-- Generating done
-- Build files have been written to: /home/adam/Pulpit/kadu-0.10.0-beta1/build-2.8.4
-------------- next part --------------
LIBGADU_CFLAGS:INTERNAL=
LIBGADU_CFLAGS_I:INTERNAL=
LIBGADU_CFLAGS_OTHER:INTERNAL=
LIBGADU_FOUND:INTERNAL=1
LIBGADU_INCLUDEDIR:INTERNAL=/usr/include
LIBGADU_INCLUDE_DIRS:INTERNAL=
LIBGADU_LDFLAGS:INTERNAL=
LIBGADU_LDFLAGS_OTHER:INTERNAL=-pthread
LIBGADU_LIBDIR:INTERNAL=/usr/lib
LIBGADU_LIBRARIES:INTERNAL=
LIBGADU_LIBRARY_DIRS:INTERNAL=
LIBGADU_LIBS:INTERNAL=
LIBGADU_LIBS_L:INTERNAL=
LIBGADU_LIBS_OTHER:INTERNAL=
LIBGADU_LIBS_PATHS:INTERNAL=
LIBGADU_PREFIX:INTERNAL=/usr
LIBGADU_STATIC_CFLAGS:INTERNAL=
LIBGADU_STATIC_CFLAGS_I:INTERNAL=
LIBGADU_STATIC_CFLAGS_OTHER:INTERNAL=
LIBGADU_STATIC_INCLUDE_DIRS:INTERNAL=
LIBGADU_STATIC_LDFLAGS:INTERNAL=
LIBGADU_STATIC_LDFLAGS_OTHER:INTERNAL=-pthread
LIBGADU_STATIC_LIBDIR:INTERNAL=
LIBGADU_STATIC_LIBRARIES:INTERNAL=
LIBGADU_STATIC_LIBRARY_DIRS:INTERNAL=
LIBGADU_STATIC_LIBS:INTERNAL=
LIBGADU_STATIC_LIBS_L:INTERNAL=
LIBGADU_STATIC_LIBS_OTHER:INTERNAL=
LIBGADU_STATIC_LIBS_PATHS:INTERNAL=
LIBGADU_VERSION:INTERNAL=1.11.0
LIBGADU_libgadu_INCLUDEDIR:INTERNAL=
LIBGADU_libgadu_LIBDIR:INTERNAL=
LIBGADU_libgadu_PREFIX:INTERNAL=
LIBGADU_libgadu_VERSION:INTERNAL=
__pkg_config_checked_LIBGADU:INTERNAL=1
-------------- next part --------------
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- No NETWORK_IMPLEMENTATION defined. Autodetected implementation: Qt
fatal: Not a git repository (or any parent up to mount parent )
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
-- Looking for include files HAVE_EXECINFO
-- Looking for include files HAVE_EXECINFO - found
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found.
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found.
-- Found Qt4: /usr/bin/qmake (found suitable version "4.7.3", required is "4.7.0")
-- Found Kadu headers: /usr/local/include/kadu/kadu
-- checking for one of the modules 'qca2'
-- Looking for XOpenDisplay in /usr/lib/i386-linux-gnu/libX11.so;/usr/lib/i386-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/i386-linux-gnu/libX11.so;/usr/lib/i386-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/i386-linux-gnu/libX11.so
-- Found X11 libraries: /usr/lib/i386-linux-gnu/libX11.so
-- Found X11 Xfixes extension: /usr/lib/i386-linux-gnu/libXfixes.so
-- Using Qt network implementation
-- Plugin: amarok1_mediaplayer
-- Found Qt4: /usr/bin/qmake (found suitable version "4.7.3", required is "4.7.0")
-- Plugin: antistring
-- Plugin: auto_hide
-- Plugin: autoaway
-- Plugin: autoresponder
-- Plugin: autostatus
-- Plugin: cenzor
-- Plugin: chat_notify
-- Plugin: config_wizard
-- Plugin: desktop_docking
-- Plugin: docking
-- Plugin: encryption_ng
-- Plugin: encryption_ng_simlite
-- Plugin: exec_notify
-- Plugin: ext_sound
-- Plugin: falf_mediaplayer
-- Plugin: filedesc
-- Plugin: firewall
-- Plugin: freedesktop_notify
-- Plugin: gadu_protocol
-- checking for one of the modules 'libgadu>=1.11.0'
--  * libgadu (version 1.11.0) was found in /usr/lib
-- Plugin: hints
-- Plugin: history
-- Plugin: history_migration
-- Plugin: idle
-- Found X11 Screen Saver extension: /usr/lib/libXss.so
-- Plugin: imagelink
-- Plugin: jabber_protocol
-- checking for one of the modules 'libidn'
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.3.4")
-- Plugin: last_seen
-- Plugin: mediaplayer
-- Plugin: mprisplayer_mediaplayer
-- Plugin: pcspeaker
-- Plugin: phonon_sound
-- Plugin: profiles_import
-- Plugin: qt4_docking
-- Plugin: qt4_docking_notify
-- Plugin: qt4_sound
-- Plugin: screenshot
-- Plugin: simpleview
-- Plugin: single_window
-- Plugin: sms
-- Found Qt4: /usr/bin/qmake (found suitable version "4.7.3", required is "4.5.0")
-- Plugin: sound
-- Found Qt4: /usr/bin/qmake (found suitable version "4.7.3", required is "4.7.0")
-- checking for one of the modules 'sndfile>=1.0'
-- Plugin: speech
-- Plugin: spellchecker
-- Found ASPELL: /usr/lib/libaspell.so 
-- Using aspell as backend. To force enchant use -DWITH_ENCHANT=ON
-- Plugin: sql_history
-- Plugin: tabs
-- Plugin: word_fix
-- Emoticon theme: penguins
-- Emoticon theme: tango
-- Icon theme: default
-- Icon theme: glass
-- Icon theme: oxygen
-- Sound theme: default
-- Kadu (version: 0.10.0-beta1) will be built:
--  * install prefix: /usr/local
--  * build type: Debug
-- Configuring done
-- Generating done
-- Build files have been written to: /home/adam/Pulpit/kadu-0.10.0-beta1/build
-------------- next part --------------
LIBGADU_CFLAGS:INTERNAL=-pthread
LIBGADU_CFLAGS_I:INTERNAL=
LIBGADU_CFLAGS_OTHER:INTERNAL=-pthread
LIBGADU_FOUND:INTERNAL=1
LIBGADU_INCLUDEDIR:INTERNAL=/usr/include
LIBGADU_INCLUDE_DIRS:INTERNAL=
LIBGADU_LDFLAGS:INTERNAL=-pthread;-lgadu;-lz;-lgnutls
LIBGADU_LDFLAGS_OTHER:INTERNAL=-pthread
LIBGADU_LIBDIR:INTERNAL=/usr/lib
LIBGADU_LIBRARIES:INTERNAL=gadu;z;gnutls
LIBGADU_LIBRARY_DIRS:INTERNAL=
LIBGADU_LIBS:INTERNAL=
LIBGADU_LIBS_L:INTERNAL=
LIBGADU_LIBS_OTHER:INTERNAL=
LIBGADU_LIBS_PATHS:INTERNAL=
LIBGADU_PREFIX:INTERNAL=/usr
LIBGADU_STATIC_CFLAGS:INTERNAL=-pthread
LIBGADU_STATIC_CFLAGS_I:INTERNAL=
LIBGADU_STATIC_CFLAGS_OTHER:INTERNAL=-pthread
LIBGADU_STATIC_INCLUDE_DIRS:INTERNAL=
LIBGADU_STATIC_LDFLAGS:INTERNAL=-pthread;-lgadu;-lgnutls;-lgcrypt;-ltasn1;-lz
LIBGADU_STATIC_LDFLAGS_OTHER:INTERNAL=-pthread
LIBGADU_STATIC_LIBDIR:INTERNAL=
LIBGADU_STATIC_LIBRARIES:INTERNAL=gadu;gnutls;gcrypt;tasn1;z
LIBGADU_STATIC_LIBRARY_DIRS:INTERNAL=
LIBGADU_STATIC_LIBS:INTERNAL=
LIBGADU_STATIC_LIBS_L:INTERNAL=
LIBGADU_STATIC_LIBS_OTHER:INTERNAL=
LIBGADU_STATIC_LIBS_PATHS:INTERNAL=
LIBGADU_VERSION:INTERNAL=1.11.0
LIBGADU_libgadu_INCLUDEDIR:INTERNAL=
LIBGADU_libgadu_LIBDIR:INTERNAL=
LIBGADU_libgadu_PREFIX:INTERNAL=
LIBGADU_libgadu_VERSION:INTERNAL=
__pkg_config_checked_LIBGADU:INTERNAL=1


More information about the CMake mailing list