TelepathyIM / telepathy-qt

Telepathy Qt bindings
https://telepathy.freedesktop.org
GNU Lesser General Public License v2.1
25 stars 14 forks source link

Missing dbus/dbus-glib.h #25

Closed jtojnar closed 5 years ago

jtojnar commented 6 years ago

On NixOS, the build fails with the following error:

[ 62%] Building CXX object TelepathyQt/Farstream/CMakeFiles/telepathy-qt4-farstream.dir/channel.cpp.o
In file included from /nix/store/kjy4n27qjfyrw3ayxh7351hllwvp9g2k-telepathy-glib-0.24.1/include/telepathy-1.0/telepathy-glib/connection.h:33:0,
                 from /nix/store/kjy4n27qjfyrw3ayxh7351hllwvp9g2k-telepathy-glib-0.24.1/include/telepathy-1.0/telepathy-glib/account.h:31,
                 from /nix/store/kjy4n27qjfyrw3ayxh7351hllwvp9g2k-telepathy-glib-0.24.1/include/telepathy-1.0/telepathy-glib/account-channel-request.h:32,
                 from /nix/store/kjy4n27qjfyrw3ayxh7351hllwvp9g2k-telepathy-glib-0.24.1/include/telepathy-1.0/telepathy-glib/telepathy-glib.h:34,
                 from /nix/store/b7s2b8xjvi7gjfx928v7q655a2p3h3as-telepathy-farstream-0.6.2/include/telepathy-1.0/telepathy-farstream/channel.h:6,
                 from /nix/store/b7s2b8xjvi7gjfx928v7q655a2p3h3as-telepathy-farstream-0.6.2/include/telepathy-1.0/telepathy-farstream/telepathy-farstream.h:23,
                 from /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/TelepathyQt/Farstream/channel.cpp:31:
/nix/store/kjy4n27qjfyrw3ayxh7351hllwvp9g2k-telepathy-glib-0.24.1/include/telepathy-1.0/telepathy-glib/proxy.h:29:28: fatal error: dbus/dbus-glib.h: No such file or directory
 #include <dbus/dbus-glib.h>
                            ^
compilation terminated.
make[2]: *** [TelepathyQt/Farstream/CMakeFiles/telepathy-qt4-farstream.dir/build.make:68: TelepathyQt/Farstream/CMakeFiles/telepathy-qt4-farstream.dir/channel.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:8856: TelepathyQt/Farstream/CMakeFiles/telepathy-qt4-farstream.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Nix stores each library in a separate directory in the Nix store. If I add the output of pkg-config --cflags dbus-glib-1 to build flags, it builds fine, it probably needs to be listed somewhere in the CMakeLists.

detrout commented 6 years ago

Can you get a verbose build log?

If its CMake I think its VERBOSE=1 and V=1 for autotools. It'd be useful to see what the -I paths are. Perhaps you're missing reading a pkg-config variable to get the path for dbus-glib?

Also Qt4 is at end of life, you probably should only build the Qt5 version.

jtojnar commented 6 years ago

The same error appears with QT5, here is the verbose output:

[ 79%] Building CXX object TelepathyQt/Farstream/CMakeFiles/telepathy-qt5-farstream.dir/channel.cpp.o
cd /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/build/TelepathyQt/Farstream && /nix/store/wriy1xis74fybcg3m1jnq5bd5myxvhm6-gcc-wrapper-6.4.0/bin/g++  -DBUILDING_TP_QT_FARSTREAM -DENABLE_DEBUG -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_FROM_ASCII -DQT_NO_DEBUG -DQT_NO_KEYWORDS -DQT_XML_LIB -D_BSD_SOURCE -D_DEFAULT_SOURCE -Dtelepathy_qt5_farstream_EXPORTS -I/tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/build/TelepathyQt/Farstream -I/tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/TelepathyQt/Farstream -I/tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7 -I/tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/build -isystem /nix/store/n74jhpy1p48knf8gxiha95hisi47h9lj-qtbase-5.9.1-dev/include -isystem /nix/store/n74jhpy1p48knf8gxiha95hisi47h9lj-qtbase-5.9.1-dev/include/QtCore -isystem /nix/store/n74jhpy1p48knf8gxiha95hisi47h9lj-qtbase-5.9.1-dev/./mkspecs/linux-g++ -isystem /nix/store/n74jhpy1p48knf8gxiha95hisi47h9lj-qtbase-5.9.1-dev/include/QtDBus -I/nix/store/n74jhpy1p48knf8gxiha95hisi47h9lj-qtbase-5.9.1-dev/include/QtGui -I/nix/store/drkvxxasdd1kfd5pb9gcbrfpk42niv5m-mesa-noglu-17.2.6-dev/include -isystem /nix/store/n74jhpy1p48knf8gxiha95hisi47h9lj-qtbase-5.9.1-dev/include/QtNetwork -I/nix/store/n74jhpy1p48knf8gxiha95hisi47h9lj-qtbase-5.9.1-dev/include/QtTest -I/nix/store/n74jhpy1p48knf8gxiha95hisi47h9lj-qtbase-5.9.1-dev/include/QtWidgets -I/nix/store/b7s2b8xjvi7gjfx928v7q655a2p3h3as-telepathy-farstream-0.6.2/include/telepathy-1.0 -I/nix/store/kjy4n27qjfyrw3ayxh7351hllwvp9g2k-telepathy-glib-0.24.1/include/telepathy-1.0 -I/nix/store/pgygaqryb9vqqrrqd8sl25vjvfivfjnz-farstream-0.2.8/include/farstream-0.2 -I/nix/store/63vrwnrihwagrp0xndgxrrf9sr3f6bfs-gstreamer-1.12.2-dev/include/gstreamer-1.0 -I/nix/store/0ffnwaiwfvrrwh0gx1bfybhg14gyngra-glib-2.54.2-dev/include/glib-2.0 -I/nix/store/5q77p9afa9s0qjvqjlspkal73nb5a3za-glib-2.54.2/lib/glib-2.0/include -I/nix/store/xgicb11l777z1nrbxhvl1hd5r1y9z8jl-libxml2-2.9.7-dev/include/libxml2 -I/nix/store/nxixs6cb76ljgwl6cm5r5a0pfi46c1qk-dbus-1.10.24-dev/include/dbus-1.0 -isystem /nix/store/n74jhpy1p48knf8gxiha95hisi47h9lj-qtbase-5.9.1-dev/include/QtXml  -Wall -Wextra -Wsign-compare -Wpointer-arith -Wformat-security -Winit-self -Wnon-virtual-dtor -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-local-typedefs -fPIC -fvisibility=hidden -fvisibility-inlines-hidden  -Wdeprecated-declarations -DTP_QT_DEPRECATED_WARNINGS -O2 -DNDEBUG -fPIC   -fPIC -std=gnu++11 -o CMakeFiles/telepathy-qt5-farstream.dir/channel.cpp.o -c /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/TelepathyQt/Farstream/channel.cpp
In file included from /nix/store/kjy4n27qjfyrw3ayxh7351hllwvp9g2k-telepathy-glib-0.24.1/include/telepathy-1.0/telepathy-glib/connection.h:33:0,
                 from /nix/store/kjy4n27qjfyrw3ayxh7351hllwvp9g2k-telepathy-glib-0.24.1/include/telepathy-1.0/telepathy-glib/account.h:31,
                 from /nix/store/kjy4n27qjfyrw3ayxh7351hllwvp9g2k-telepathy-glib-0.24.1/include/telepathy-1.0/telepathy-glib/account-channel-request.h:32,
                 from /nix/store/kjy4n27qjfyrw3ayxh7351hllwvp9g2k-telepathy-glib-0.24.1/include/telepathy-1.0/telepathy-glib/telepathy-glib.h:34,
                 from /nix/store/b7s2b8xjvi7gjfx928v7q655a2p3h3as-telepathy-farstream-0.6.2/include/telepathy-1.0/telepathy-farstream/channel.h:6,
                 from /nix/store/b7s2b8xjvi7gjfx928v7q655a2p3h3as-telepathy-farstream-0.6.2/include/telepathy-1.0/telepathy-farstream/telepathy-farstream.h:23,
                 from /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/TelepathyQt/Farstream/channel.cpp:31:
/nix/store/kjy4n27qjfyrw3ayxh7351hllwvp9g2k-telepathy-glib-0.24.1/include/telepathy-1.0/telepathy-glib/proxy.h:29:28: fatal error: dbus/dbus-glib.h: No such file or directory
 #include <dbus/dbus-glib.h>
                            ^
compilation terminated.
make[2]: *** [TelepathyQt/Farstream/CMakeFiles/telepathy-qt5-farstream.dir/build.make:67: TelepathyQt/Farstream/CMakeFiles/telepathy-qt5-farstream.dir/channel.cpp.o] Error 1
make[2]: Leaving directory '/tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/build'
make[1]: *** [CMakeFiles/Makefile2:8856: TelepathyQt/Farstream/CMakeFiles/telepathy-qt5-farstream.dir/all] Error 2
make[1]: Leaving directory '/tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/build'
make: *** [Makefile:141: all] Error 2

The dbus/dbus-glib.h is located in /nix/store/gc38p4215d29icsqfykgsy9ijx7vacvx-dbus-glib-0.108-dev/include/dbus-1.0, which is not added with -I option.

As for QT4, telepathy_qt4 does not build for a different reason anyway:

QT4 failure ``` [ 73%] Building CXX object tests/dbus/CMakeFiles/test-base-filetransfer.dir/base-filetransfer.cpp.o /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp: In member function 'void TestBaseFileTranfserChannel::testSendFile()': /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp:541:25: error: 'class QSignalSpy' has no member named 'wait'; did you mean 'at'? spySvcState.wait(); ^~~~ /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp:558:21: error: 'class QSignalSpy' has no member named 'wait'; did you mean 'at'? spySvcState.wait(); ^~~~ /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp:565:58: error: 'QTRY_COMPARE_WITH_TIMEOUT' was not declared in this scope QTRY_COMPARE_WITH_TIMEOUT(spyCliState.count(), 1, 200); ^ /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp:590:25: error: 'class QSignalSpy' has no member named 'wait'; did you mean 'at'? spySvcState.wait(); ^~~~ /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp:606:21: error: 'class QSignalSpy' has no member named 'wait'; did you mean 'at'? spySvcState.wait(); ^~~~ /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp:614:76: error: 'QTRY_VERIFY_WITH_TIMEOUT' was not declared in this scope QTRY_VERIFY_WITH_TIMEOUT(spyCliState.count() == 1, c_defaultTimeout); ^ /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp:619:76: error: 'QTRY_VERIFY_WITH_TIMEOUT' was not declared in this scope QTRY_VERIFY_WITH_TIMEOUT(spyCliState.count() >= 1, c_defaultTimeout); ^ /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp:626:88: error: 'QTRY_VERIFY_WITH_TIMEOUT' was not declared in this scope QTRY_VERIFY_WITH_TIMEOUT(!spyClientTransferredBytes.isEmpty(), c_defaultTimeout); ^ /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp:632:121: error: 'QTRY_VERIFY_WITH_TIMEOUT' was not declared in this scope QTRY_VERIFY_WITH_TIMEOUT(spyClientTransferredBytes.last().first().toInt() == initialOffset, c_defaultTimeout); ^ /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp:637:121: error: 'QTRY_VERIFY_WITH_TIMEOUT' was not declared in this scope QTRY_VERIFY_WITH_TIMEOUT(spyClientTransferredBytes.last().first().toInt() >= initialOffset, c_defaultTimeout); ^ /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp:654:92: error: 'QTRY_VERIFY_WITH_TIMEOUT' was not declared in this scope QTRY_VERIFY_WITH_TIMEOUT(!spyClientTransferredBytes.isEmpty(), c_defaultTimeout); ^ /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp:663:29: error: 'class QSignalSpy' has no member named 'wait'; did you mean 'at'? spySvcState.wait(); ^~~~ /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp:675:84: error: 'QTRY_VERIFY_WITH_TIMEOUT' was not declared in this scope QTRY_VERIFY_WITH_TIMEOUT(!spyClientTransferredBytes.isEmpty(), c_defaultTimeout); ^ /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp:684:89: error: 'QTRY_COMPARE' was not declared in this scope QTRY_COMPARE(uint(cliTransferChannel->state()), uint(Tp::FileTransferStateCompleted)); ^ /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp: In member function 'void TestBaseFileTranfserChannel::testReceiveFile()': /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp:761:25: error: 'class QSignalSpy' has no member named 'wait'; did you mean 'at'? spySvcState.wait(); ^~~~ /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp:777:21: error: 'class QSignalSpy' has no member named 'wait'; did you mean 'at'? spySvcState.wait(); ^~~~ /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp:784:74: error: 'QTRY_COMPARE_WITH_TIMEOUT' was not declared in this scope QTRY_COMPARE_WITH_TIMEOUT(spyClientState.count(), 1, c_defaultTimeout); ^ /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp:799:25: error: 'class QSignalSpy' has no member named 'wait'; did you mean 'at'? spySvcState.wait(); ^~~~ /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp:822:21: error: 'class QSignalSpy' has no member named 'wait'; did you mean 'at'? spySvcState.wait(); ^~~~ /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp:830:79: error: 'QTRY_VERIFY_WITH_TIMEOUT' was not declared in this scope QTRY_VERIFY_WITH_TIMEOUT(spyClientState.count() == 1, c_defaultTimeout); ^ /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp:833:79: error: 'QTRY_VERIFY_WITH_TIMEOUT' was not declared in this scope QTRY_VERIFY_WITH_TIMEOUT(spyClientState.count() >= 1, c_defaultTimeout); ^ /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp:851:88: error: 'QTRY_VERIFY_WITH_TIMEOUT' was not declared in this scope QTRY_VERIFY_WITH_TIMEOUT(!spyClientTransferredBytes.isEmpty(), c_defaultTimeout); ^ /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp:858:29: error: 'class QSignalSpy' has no member named 'wait'; did you mean 'at'? spySvcState.wait(); ^~~~ /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt-0.9.7/tests/dbus/base-filetransfer.cpp:870:84: error: 'QTRY_VERIFY_WITH_TIMEOUT' was not declared in this scope QTRY_VERIFY_WITH_TIMEOUT(!spyClientTransferredBytes.isEmpty(), c_defaultTimeout); ^ make[2]: *** [tests/dbus/CMakeFiles/test-base-filetransfer.dir/build.make:68: tests/dbus/CMakeFiles/test-base-filetransfer.dir/base-filetransfer.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:11839: tests/dbus/CMakeFiles/test-base-filetransfer.dir/all] Error 2 make: *** [Makefile:141: all] Error 2 ```

Since it is only used by an unmaintained Tomahawk package, we can remove it from our repositories but dropping the QT4 support should probably be mentioned in the NEWS file.

detrout commented 6 years ago

Does pkg-config --cflags dbus-glib-1 print the right dbus include path? Do you need to do something to modify the PKG_CONFIG_PATH to find the dbus-glib .pc file?

jtojnar commented 6 years ago

It prints the correct path:

$ nix-shell -p dbus_glib pkgconfig --run "pkg-config --cflags dbus-glib-1"
-I/nix/store/0ffnwaiwfvrrwh0gx1bfybhg14gyngra-glib-2.54.2-dev/include/glib-2.0 -I/nix/store/5q77p9afa9s0qjvqjlspkal73nb5a3za-glib-2.54.2/lib/glib-2.0/include -I/nix/store/gc38p4215d29icsqfykgsy9ijx7vacvx-dbus-glib-0.108-dev/include/dbus-1.0 -I/nix/store/nxixs6cb76ljgwl6cm5r5a0pfi46c1qk-dbus-1.10.24-dev/include/dbus-1.0 -I/nix/store/d64dq638mxwf3c8f55imc74qgxk68bmn-dbus-1.10.24-lib/lib/dbus-1.0/include

Maybe the issue is missing DBUS_GLIB_INCLUDE_DIR

https://github.com/TelepathyIM/telepathy-qt/blob/f81ae2d33ff36baa7938b4f89fa51372c9ff1fcc/TelepathyQt/Farstream/CMakeLists.txt#L2-L8

jtojnar commented 6 years ago

If I add it, it still fails:

[ 80%] Building CXX object TelepathyQt/Farstream/CMakeFiles/telepathy-qt5-farstream.dir/channel.cpp.o
cd /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt/build/TelepathyQt/Farstream && /nix/store/wriy1xis74fybcg3m1jnq5bd5myxvhm6-gcc-wrapper-6.4.0/bin/g++  -DBUILDING_TP_QT_FARSTREAM -DENABLE_DEBUG -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_FROM_ASCII -DQT_NO_DEBUG -DQT_NO_KEYWORDS -DQT_XML_LIB -D_BSD_SOURCE -D_DEFAULT_SOURCE -Dtelepathy_qt5_farstream_EXPORTS -I/tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt/build/TelepathyQt/Farstream -I/tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt/TelepathyQt/Farstream -I/tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt -I/tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt/build -isystem /nix/store/n74jhpy1p48knf8gxiha95hisi47h9lj-qtbase-5.9.1-dev/include -isystem /nix/store/n74jhpy1p48knf8gxiha95hisi47h9lj-qtbase-5.9.1-dev/include/QtCore -isystem /nix/store/n74jhpy1p48knf8gxiha95hisi47h9lj-qtbase-5.9.1-dev/./mkspecs/linux-g++ -isystem /nix/store/n74jhpy1p48knf8gxiha95hisi47h9lj-qtbase-5.9.1-dev/include/QtDBus -I/nix/store/n74jhpy1p48knf8gxiha95hisi47h9lj-qtbase-5.9.1-dev/include/QtGui -I/nix/store/drkvxxasdd1kfd5pb9gcbrfpk42niv5m-mesa-noglu-17.2.6-dev/include -isystem /nix/store/n74jhpy1p48knf8gxiha95hisi47h9lj-qtbase-5.9.1-dev/include/QtNetwork -I/nix/store/n74jhpy1p48knf8gxiha95hisi47h9lj-qtbase-5.9.1-dev/include/QtTest -I/nix/store/n74jhpy1p48knf8gxiha95hisi47h9lj-qtbase-5.9.1-dev/include/QtWidgets -I/nix/store/b7s2b8xjvi7gjfx928v7q655a2p3h3as-telepathy-farstream-0.6.2/include/telepathy-1.0 -I/nix/store/kjy4n27qjfyrw3ayxh7351hllwvp9g2k-telepathy-glib-0.24.1/include/telepathy-1.0 -I/nix/store/pgygaqryb9vqqrrqd8sl25vjvfivfjnz-farstream-0.2.8/include/farstream-0.2 -I/nix/store/63vrwnrihwagrp0xndgxrrf9sr3f6bfs-gstreamer-1.12.2-dev/include/gstreamer-1.0 -I/nix/store/0ffnwaiwfvrrwh0gx1bfybhg14gyngra-glib-2.54.2-dev/include/glib-2.0 -I/nix/store/5q77p9afa9s0qjvqjlspkal73nb5a3za-glib-2.54.2/lib/glib-2.0/include -I/nix/store/xgicb11l777z1nrbxhvl1hd5r1y9z8jl-libxml2-2.9.7-dev/include/libxml2 -I/nix/store/gc38p4215d29icsqfykgsy9ijx7vacvx-dbus-glib-0.108-dev/include -I/nix/store/nxixs6cb76ljgwl6cm5r5a0pfi46c1qk-dbus-1.10.24-dev/include/dbus-1.0 -isystem /nix/store/n74jhpy1p48knf8gxiha95hisi47h9lj-qtbase-5.9.1-dev/include/QtXml  -Wall -Wextra -Wsign-compare -Wpointer-arith -Wformat-security -Winit-self -Wnon-virtual-dtor -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-local-typedefs -fPIC -fvisibility=hidden -fvisibility-inlines-hidden  -Wdeprecated-declarations -DTP_QT_DEPRECATED_WARNINGS -O2 -DNDEBUG -fPIC   -fPIC -std=gnu++11 -o CMakeFiles/telepathy-qt5-farstream.dir/channel.cpp.o -c /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt/TelepathyQt/Farstream/channel.cpp
In file included from /nix/store/kjy4n27qjfyrw3ayxh7351hllwvp9g2k-telepathy-glib-0.24.1/include/telepathy-1.0/telepathy-glib/connection.h:33:0,
                 from /nix/store/kjy4n27qjfyrw3ayxh7351hllwvp9g2k-telepathy-glib-0.24.1/include/telepathy-1.0/telepathy-glib/account.h:31,
                 from /nix/store/kjy4n27qjfyrw3ayxh7351hllwvp9g2k-telepathy-glib-0.24.1/include/telepathy-1.0/telepathy-glib/account-channel-request.h:32,
                 from /nix/store/kjy4n27qjfyrw3ayxh7351hllwvp9g2k-telepathy-glib-0.24.1/include/telepathy-1.0/telepathy-glib/telepathy-glib.h:34,
                 from /nix/store/b7s2b8xjvi7gjfx928v7q655a2p3h3as-telepathy-farstream-0.6.2/include/telepathy-1.0/telepathy-farstream/channel.h:6,
                 from /nix/store/b7s2b8xjvi7gjfx928v7q655a2p3h3as-telepathy-farstream-0.6.2/include/telepathy-1.0/telepathy-farstream/telepathy-farstream.h:23,
                 from /tmp/nix-build-telepathy-qt-0.9.7.drv-0/telepathy-qt/TelepathyQt/Farstream/channel.cpp:31:
/nix/store/kjy4n27qjfyrw3ayxh7351hllwvp9g2k-telepathy-glib-0.24.1/include/telepathy-1.0/telepathy-glib/proxy.h:29:28: fatal error: dbus/dbus-glib.h: No such file or directory
 #include <dbus/dbus-glib.h>

It looks like CMake picks up the includedir variable, not the correct Cflag.

prefix=/nix/store/5nyya5h1hzijvfcc4x9lib866navb1mp-dbus-glib-0.108
exec_prefix=/nix/store/gc38p4215d29icsqfykgsy9ijx7vacvx-dbus-glib-0.108-dev
libdir=/nix/store/5nyya5h1hzijvfcc4x9lib866navb1mp-dbus-glib-0.108/lib
includedir=/nix/store/gc38p4215d29icsqfykgsy9ijx7vacvx-dbus-glib-0.108-dev/include

Name: dbus-glib
Description: GLib integration for the free desktop message bus
Version: 0.108
Requires: dbus-1 glib-2.0 gobject-2.0
Libs: -L${libdir} -ldbus-glib-1
Cflags: -I${includedir}/dbus-1.0
jtojnar commented 6 years ago

Indeed, CMake seems to only use pkgconfig for getting the variables, resulting in hacks like this. I opened a pull request fixing this.

Kaffeine commented 5 years ago

Fixed by commit https://github.com/TelepathyIM/telepathy-qt/commit/456f1ee885358998eb5c68f37c3a70a3d6200b3e. Thanks, @jtojnar!