I normally call emerge with sudo, but this doesn't work with dbus[qt]. The configure script aborts because it can't find qt, since sudo unsets QTDIR. Also, the configure script can't find moc, since /usr/qt/3/bin is removed from PATH. Reproducible: Always Steps to Reproduce: 1. Install sudo and don't set it to keep the user's environment (clearing the environment is the default) 2. Set qt in USE flags 3. Run sudo emerge dbus Actual Results: Calculating dependencies ...done! >>> emerge (1 of 1) sys-apps/dbus-0.23.4-r1 to / creating temp dir >>> Unpacking source... >>> Unpacking dbus-0.23.4.tar.gz to /var/tmp/portage/dbus-0.23.4-r1/work * Applying dbus-0.23-qt.patch ... [ ok ] * Applying dbus-0.23-fd_set.patch ... [ ok ] * Applying dbus-0.23.2-version_fix.patch ... [ ok ] * Applying dbus-0.23-pyexecdir.patch ... [ ok ] >>> Source unpacked. >>> Compiling source ... * econf: updating dbus-0.23.4/config.guess with /usr/share/gnuconfig/config.guess * econf: updating dbus-0.23.4/config.sub with /usr/share/gnuconfig/config.sub ./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --build=i686-pc-linux-gnu --localstatedir=/var --with-x --enable-gtk --enable-qt --disable-python --disable-mono --enable-glib --enable-verbose-mode --enable-checks --enable-asserts --with-system-socket=/var/run/dbus/system_bus_socket --with-system-pid-file=/var/run/dbus.pid --with-session-socket-dir=/tmp --disable-doxygen-docs --disable-xml-docs --disable-mono-docs --with-xml=libxml [...] checking for gobject-2.0... yes checking DBUS_GLIB_CFLAGS... -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include checking DBUS_GLIB_LIBS... -lgobject-2.0 -lglib-2.0 checking for glib-2.0 gthread-2.0... yes checking DBUS_GLIB_THREADS_CFLAGS... -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include checking DBUS_GLIB_THREADS_LIBS... -pthread -lgthread-2.0 -lglib-2.0 checking for gtk+-2.0... yes checking DBUS_GTK_CFLAGS... -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include checking DBUS_GTK_LIBS... -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 checking for moc... no checking for qglobal.h... not found configure: WARNING: Qt development libraries not found configure: error: Qt integration explicitly required, and Qt libraries not found !!! Please attach the config.log to your bug report: !!! /var/tmp/portage/dbus-0.23.4-r1/work/dbus-0.23.4/config.log !!! ERROR: sys-apps/dbus-0.23.4-r1 failed. !!! Function econf, Line 1052, Exitcode 0 !!! econf failed !!! If you need support, post the topmost build error, NOT this status message. phases failed Expected Results: Install :) Portage 1.589-cvs (default-linux/x86/2005.0, gcc-4.0.2-beta20050818, glibc-2.3.5.20050421-r0, 2.6.13-rc6 i686) ================================================================= System uname: 2.6.13-rc6 i686 AMD Duron(tm) Processor Gentoo Base System version 1.12.0_pre6 Python: dev-lang/python-2.4.1-r1 [2.4.1 (#1, Jun 21 2005, 15:10:54)] distcc: No such file or directory [disabled] ccache: No such file or directory [disabled] dev-lang/python: 2.4.1-r1 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.9.6, 1.5, 1.8.5-r3, 1.6.3, 1.7.9-r1, 1.4_p6 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-tbird -Os -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-tbird -Os -fomit-frame-pointer -fvisibility-inlines-hidden" DISTDIR="/var/dist" FEATURES="autoconfig autopatch collision-protect cvs distlocks noauto notitles sandbox sfperms strict" GENTOO_MIRRORS=" http://ftp.easynet.nl/mirror/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo " LANG="en_GB.UTF-8" LINGUAS="en en_GB ja nl" MAKEOPTS="-j1" PKGDIR="/var/pkg" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/var/portage" PORTDIR_OVERLAY="/etc/portage/cross /etc/portage/overlay /etc/portage/overlay/e17 /etc/portage/overlay/gtk-webcore /var/cvs/gentoo-x86" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow 3dnowext X aac acl alsa berkdb bidi bitmap-fonts bzip2 cdparanoia cjk crypt dlloader dri dvd dvdread encode erandom fbcon firefox flac gdbm gif glx gstreamer gtk gtk2 hal imagemagick imlib imlib2 immqt ipv6 ithreads jpeg kde kdeenablefinal linuxthreads-tls lua lynxkeymap mad mbox mmx mmxext mozdevelop mozsvg mp3 mpeg ncurses nls nntp nocxx nopie nossp nptl offensive ogg oggvorbis oss pcre php pic png postgres qt quicktime readline reiserfs rtc slang spell ssl svg tcpd threads truetype-fonts type1-fonts unicode userlocales vim-pager vorbis win32codecs wmf xface xml2 xvid zlib linguas_en linguas_en_GB linguas_ja linguas_nl userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LC_ALL, LDFLAGS Config files: /etc/make.conf, /etc/portage/bashrc, /etc/portage/package.mask, /etc/portage/package.keywords, /etc/portage/profile/packages, /etc/portage/profile/use.mask
slightly different error, but also seems to be qt related. i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I/usr/qt/3/include -DDBUS_API_SUBJECT_TO_CHANGE=1 -march=athlon-xp -O3 -pipe -fomit-frame-pointer -mmmx -msse -m3dnow -mfpmath=sse,387 -ffast-math -MT connection.lo -MD -MP -MF .deps/connection.Tpo -c ../qt/connection.cpp -fPIC -DPIC -o .libs/connection.o In file included from ../qt/connection.cpp:168: ../qt/connection.moc:12:2: #error "The header file 'connection.h' doesn't include <QObject>." In file included from ../qt/connection.cpp:168: ../qt/connection.moc:47: error: `const QMetaObject DBusQt::Connection::staticMetaObject' is not a static member of `class DBusQt::Connection' ../qt/connection.moc:47: error: variable `const QMetaObject DBusQt::Connection::staticMetaObject' has initializer but incomplete type ../qt/connection.moc:53: error: prototype for `const QMetaObject* DBusQt::Connection::metaObject() const' does not match any in class `DBusQt::Connection' ../qt/connection.h:40: error: candidate is: virtual QMetaObject* DBusQt::Connection::metaObject() const ../qt/connection.moc:53: error: `const QMetaObject* DBusQt::Connection::metaObject() const' and `virtual QMetaObject* DBusQt::Connection::metaObject() const' cannot be overloaded ../qt/connection.moc: In member function `const QMetaObject* DBusQt::Connection::metaObject() const': ../qt/connection.moc:54: error: cannot convert `QMetaObject*(*)()' to `const QMetaObject*' in return ../qt/connection.moc: At global scope: ../qt/connection.moc:58: error: no `void* DBusQt::Connection::qt_metacast(const char*)' member function declared in class `DBusQt::Connection' ../qt/connection.moc: In member function `void* DBusQt::Connection::qt_metacast(const char*)': ../qt/connection.moc:62: error: `qt_metacast' is not a member of `QObject' ../qt/connection.moc: At global scope: ../qt/connection.moc:65: error: `int DBusQt::Connection::qt_metacall' is not a static member of `class DBusQt::Connection' ../qt/connection.moc:65: error: incomplete type `QMetaObject' used in nested name specifier ../qt/connection.moc:65: error: expected primary-expression before "int" ../qt/connection.moc:65: error: expected primary-expression before "void" ../qt/connection.moc:66: error: initializer expression list treated as compound expression ../qt/connection.moc:66: error: expected `,' or `;' before '{' token make[1]: *** [connection.lo] Error 1 make[1]: Leaving directory `/var/tmp/portage/dbus-0.36.1/work/dbus-0.36.1/qt' make: *** [install-recursive] Error 1
Harold, first thing I'd do is run env-update and source /etc/profile again. Then try again. If that doesn't work do me a favor change the following line in the dbus ebuild... inherit eutils mono python multilib debug to inherit eutils mono python multilib debug qt3 And run "emerge --digest dbus" and let me know the results. Also, if you could provide sudo env, that'd be helpful.
In fact... grep QTDIR /etc/env.d/* /etc/profile.env Should give this result... /etc/env.d/50qtdir3:QTDIR=/usr/qt/3 /etc/profile.env:export QTDIR='/usr/qt/3'
(In reply to comment #1) > slightly different error, but also seems to be qt related. I came across that when searching to see if anyone reported my problem, but it's not this. IIRC, that's about problems with dbus and qt 4, but I only have qt-3.3.4-r7 installed. (In reply to comment #2) > Harold, first thing I'd do is run env-update and source /etc/profile again. Then > try again. QTDIR, PATH, etc. were set to include the qt dirs already. When I tried this anyway, no luck. > If that doesn't work do me a favor change the following line in the > dbus ebuild... > > inherit eutils mono python multilib debug > > to > > inherit eutils mono python multilib debug qt3 > > And run "emerge --digest dbus" and let me know the results. Same results (exactly the same). I had mentioned on irc to steev that the qt3 eclass sets QTDIR, but I now notice I missed one detail: it doesn't export it. So the configure script doesn't see it. When I make sure it gets exported (changing econf ... to QTDIR="${QTDIR}" econf ...), the result becomes: [...] checking for moc... no checking for qglobal.h... found [...] no connection.h > connection.moc /bin/sh: no: command not found make[2]: *** [connection.moc] Error 127 make[2]: Leaving directory `/var/tmp/portage/dbus-0.23.4-r1/work/dbus-0.23.4/qt' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/dbus-0.23.4-r1/work/dbus-0.23.4' make: *** [all] Error 2 !!! ERROR: sys-apps/dbus-0.23.4-r1 failed. !!! Function src_compile, Line 2695, Exitcode 2 !!! (no error message) !!! If you need support, post the topmost build error, NOT this status message. because this does not set the path so that moc can be found. But, when I also add QT_MOC="${QTDIR}/bin/moc" on that line (see bug #84256 comment #9), dbus gets installed correctly. The full line becomes QTDIR="${QTDIR}" QT_MOC="${QTDIR}/bin/moc" econf \ > Also, if you could provide sudo env, that'd be helpful. % sudo env CONFIG_PROTECT_MASK=/etc/terminfo PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.0.1-pre20050702:/usr/powerpc-unknown-linux-gnu/gcc-bin/3.4.4 LANG=en_GB.UTF-8 CONFIG_PROTECT=/usr/lib/X11/xkb /usr/kde/3.4/share/config /usr/kde/3.4/env /usr/kde/3.4/shutdown /usr/share/config TERM=xterm HOME=/home/harald SHELL=/bin/zsh LOGNAME=root USER=root SUDO_COMMAND=/bin/env SUDO_USER=harald SUDO_UID=1000 SUDO_GID=100 (In reply to comment #3) > grep QTDIR /etc/env.d/* /etc/profile.env Same results you get. And for completeness: % grep /usr/qt/3 /etc/env.d/* /etc/profile.env /etc/env.d/45qt3:PATH=/usr/qt/3/bin /etc/env.d/45qt3:ROOTPATH=/usr/qt/3/bin /etc/env.d/45qt3:LDPATH=/usr/qt/3/lib /etc/env.d/45qt3:MANPATH=/usr/qt/3/doc/man /etc/env.d/50qtdir3:QTDIR=/usr/qt/3 /etc/profile.env:export ROOTPATH='/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.0.2-beta20050818:/usr/powerpc-unknown-linux-gnu/gcc-bin/3.4.4:/opt/intel/compiler90/bin:/usr/qt/3/bin:/usr/kde/3.4/sbin:/usr/kde/3.4/bin' /etc/profile.env:export MANPATH='/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/i686-pc-linux-gnu/2.16.1/man:/usr/share/gcc-data/i686-pc-linux-gnu/4.0.2-beta20050818/man:/opt/intel/compiler90/man:/usr/qt/3/doc/man' /etc/profile.env:export PATH='/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.0.2-beta20050818:/usr/powerpc-unknown-linux-gnu/gcc-bin/3.4.4:/opt/intel/compiler90/bin:/opt/sourcenav/bin:/usr/qt/3/bin:/usr/kde/3.4/bin:/usr/games/bin' /etc/profile.env:export QTDIR='/usr/qt/3'
I should probably mention that I haven't checked if the changes break anything when qt is not wanted.
dbus-0.36.1 also fails with USE="qt": make[1]: Entering directory `/var/tmp/portage/dbus-0.36.1/work/dbus-0.36.1/qt' if /bin/sh ../libtool --tag=CXX --mode=compile i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I/usr/qt/3/include -DDBUS_API_SUBJECT_TO_CHANGE=1 -march=i686 -mtune=pentium4m -Os -pipe -fomit-frame-pointer -fvisibility-inlines-hidden -MT connection.lo -MD -MP -MF ".deps/connection.Tpo" -c -o connection.lo `test -f '../qt/connection.cpp' || echo './'`../qt/connection.cpp; \ then mv -f ".deps/connection.Tpo" ".deps/connection.Plo"; else rm -f ".deps/connection.Tpo"; exit 1; fi i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I/usr/qt/3/include -DDBUS_API_SUBJECT_TO_CHANGE=1 -march=i686 -mtune=pentium4m -Os -pipe -fomit-frame-pointer -fvisibility-inlines-hidden -MT connection.lo -MD -MP -MF .deps/connection.Tpo -c ../qt/connection.cpp -fPIC -DPIC -o .libs/connection.o In file included from ../qt/connection.cpp:168: ../qt/connection.moc:12:2: #error "The header file 'connection.h' doesn't include <QObject>." In file included from ../qt/connection.cpp:168: ../qt/connection.moc:47: error: `const QMetaObject DBusQt::Connection::staticMetaObject' is not a static member of `class DBusQt::Connection' ../qt/connection.moc:47: error: variable `const QMetaObject DBusQt::Connection::staticMetaObject' has initializer but incomplete type ../qt/connection.moc:53: error: prototype for `const QMetaObject* DBusQt::Connection::metaObject() const' does not match any in class `DBusQt::Connection' ../qt/connection.h:40: error: candidate is: virtual QMetaObject* DBusQt::Connection::metaObject() const ../qt/connection.moc:53: error: `const QMetaObject* DBusQt::Connection::metaObject() const' and `virtual QMetaObject* DBusQt::Connection::metaObject() const' cannot be overloaded ../qt/connection.moc: In member function `const QMetaObject* DBusQt::Connection::metaObject() const': ../qt/connection.moc:54: error: cannot convert `QMetaObject*(*)()' to `const QMetaObject*' in return ../qt/connection.moc: At global scope: ../qt/connection.moc:58: error: no `void* DBusQt::Connection::qt_metacast(const char*)' member function declared in class `DBusQt::Connection' ../qt/connection.moc: In member function `void* DBusQt::Connection::qt_metacast(const char*)': ../qt/connection.moc:62: error: `qt_metacast' is not a member of `QObject' ../qt/connection.moc: At global scope: ../qt/connection.moc:65: error: `int DBusQt::Connection::qt_metacall' is not a static member of `class DBusQt::Connection' ../qt/connection.moc:65: error: incomplete type `QMetaObject' used in nested name specifier ../qt/connection.moc:65: error: expected primary-expression before "int" ../qt/connection.moc:65: error: expected primary-expression before "void" ../qt/connection.moc:66: error: initializer expression list treated as compound expression ../qt/connection.moc:66: error: expected `,' or `;' before '{' token make[1]: *** [connection.lo] Fehler 1 make[1]: Leaving directory `/var/tmp/portage/dbus-0.36.1/work/dbus-0.36.1/qt' make: *** [install-recursive] Fehler 1 !!! ERROR: sys-apps/dbus-0.36.1 failed. !!! Function src_install, Line 103, Exitcode 2 !!! make install failed !!! If you need support, post the topmost build error, NOT this status message. Adding qt3 to the inherit-line of the ebuild doesn't help.
This is really two different bugs we're talking about here. The one mentioned by the reporter involves emerging DBUS with sudo while Qt 3 is installed. Comments 1 & 6 deal with a problem emerging DBUS while Qt 4 is installed. Apparently the DBUS ebuild tries to use Qt 4 when it needs Qt 3. This affects me when as well (trying to emerge sys-apps/dbus-0.23.4-r1). However, by unmerging Qt 4 I was able to get it to work. I wonder whether Qt 4 installing directly into /usr instead of /usr/qt/4 was a good idea...
Thanks !! It works for me now when doing this : change : inherit eutils mono python multilib debug to inherit eutils mono python multilib debug qt3 And run "emerge --digest dbus" and let me know the results.
HUmm ... no, it doesn't work. Dunno what I did last time, but was not compiled with qt use flag. I tried with both v0.23.4 and v0.36.2 (adding the qt3 inherit)
Bug #109823 for (continuation of) the unrelated Qt4 problems.
This should now be fixed in dbus-0.50-r1 (v 1.2), please sync up in an hour or so and test the modified ebuild. This should fix both issues encountered here.