Closed jtojnar closed 5 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.
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:
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.
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?
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
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
Indeed, CMake seems to only use pkgconfig for getting the variables, resulting in hacks like this. I opened a pull request fixing this.
Fixed by commit https://github.com/TelepathyIM/telepathy-qt/commit/456f1ee885358998eb5c68f37c3a70a3d6200b3e. Thanks, @jtojnar!
On NixOS, the build fails with the following error:
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 theCMakeLists
.