Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 360839 - app-misc/tracker-0.10.5 fails to configure with USE=qt4
Summary: app-misc/tracker-0.10.5 fails to configure with USE=qt4
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2011-03-27 22:12 UTC by Harris Landgarten
Modified: 2011-04-03 21:13 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (1301263639-install-app-misc_tracker-0.10.5:0::gentoo.out,18.74 KB, text/plain)
2011-03-27 22:14 UTC, Harris Landgarten
Details
configure.log for failure (config.log,106.07 KB, text/plain)
2011-03-27 22:15 UTC, Harris Landgarten
Details
ebuild patch to allow tracker to compile with both gtk and qt4 support (tracker-0.10.5.ebuild.patch,632 bytes, patch)
2011-03-30 15:24 UTC, Richard F. Ostrow Jr.
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Harris Landgarten 2011-03-27 22:12:39 UTC
checking unicode/ubrk.h presence... yes
checking for unicode/ubrk.h... yes
checking for PANGO... yes
checking for GNOME_KEYRING... yes
checking for LIBEXIF... yes
checking for TAGLIB... yes
checking for ENCA... yes
checking for LIBXML2... yes
configure: error: Couldn't find Qt >= 4.7.1.

cave show qt-gui
* x11-libs/qt-gui
    ::gentoo                  4.6.2 4.6.2-r1(~) 4.6.3 4.6.3-r2 4.7.0-r1(~) 4.7.1-r1(~) 4.7.2(~)* {:4}
    ::installed               4.7.2 {:4}
Comment 1 Harris Landgarten 2011-03-27 22:14:01 UTC
Created attachment 267453 [details]
build log

Build log
Comment 2 Harris Landgarten 2011-03-27 22:15:01 UTC
Created attachment 267455 [details]
configure.log for failure
Comment 3 Richard F. Ostrow Jr. 2011-03-30 15:14:49 UTC
It's an ebuild bug. gtk USE flag sends the configure script a --enable-gdkpixbuf and the qt4 USE flag sends it a --enable-qt. These configure flags are mutually exclusive in the build system (see below):

##################################################################
# Check for tracker-extract: Choose between GdkPixbuf/Qt
##################################################################

if test "x$enable_qt" != "xno" && test "x$enable_gdkpixbuf" != "xyes"; then
   PKG_CHECK_MODULES(QT,
                     [QtGui >= $QT_REQUIRED],
                     [have_qt=yes],
                     [have_qt=no])

   AC_MSG_ERROR([have_qt=$have_qt])

   TRACKER_EXTRACT_CFLAGS="$TRACKER_EXTRACT_CFLAGS $QT_CFLAGS"
   TRACKER_EXTRACT_LIBS="$TRACKER_EXTRACT_LIBS $QT_LIBS"

   if test "x$have_qt" = "xyes"; then
      AC_DEFINE(HAVE_QT, [], [Define if we have Qt])
      selected_for_albumart="yes (qt)"
   fi
else
   have_qt="no  (disabled)"
fi

if test "x$enable_qt" = "xyes"; then
   if test "x$have_qt" != "xyes"; then
      AC_MSG_ERROR([Couldn't find Qt >= $QT_REQUIRED.])
   fi
fi

As you should be able to see, if 'enable_qt' is 'yes' and 'enable_gdkpixbuf' is 'yes', the condition above will not be entered, qt will _not_ be checked for (pkg_check_modules), and the small part at the end will pop up an error message stating that it cannot find qt. I'm going to propose an ebuild patch in a little bit that should fix this issue (if both qt4 and gtk are USE-flag enabled, do not pass a --enable-gdkpixbuf to the configure script), or you can simply disable the 'gtk' USE flag (or the 'qt4' USE flag) to get around this for now.
Comment 4 Richard F. Ostrow Jr. 2011-03-30 15:24:09 UTC
Created attachment 267831 [details, diff]
ebuild patch to allow tracker to compile with both gtk and qt4 support
Comment 5 Gilles Dartiguelongue (RETIRED) gentoo-dev 2011-03-30 15:28:54 UTC
What your explanation, you can conclude this is an actual upstream bug for doing checks in the wrong place. The ebuild can work it around obviously but I don't think it's a good solution.
Comment 6 Richard F. Ostrow Jr. 2011-03-30 17:30:31 UTC
Actually, it looks to me that the two options are intended to be mutually exclusive (hence why I included the commented section above the configure.ac code to check for qt). They claim that they are using that to "Choose between GdkPixbuf/Qt". Granted, it would have been better if they had put out an error message that matched the context (something like "cannot use both qt and gdkpixbuf" instead of "Couldn't find Qt >= 4.7.1."), but the ebuild should be smart enough to avoid these sorts of issues.

Currently, if both USE flags are enabled, the configure script crashes and burns because enabling the gtk USE flag sets the --enable-gdkpixbuf configure switch. All I'm proposing is that if the qt4 USE flag is set, do not set the --enable-gdkpixbuf configure switch.
Comment 7 Maciej Mrozowski gentoo-dev 2011-03-30 17:52:04 UTC
How about using EAPI-4 and

REQUIRED_USE="
    gtk? ( !qt4 )
    qt4? ( !gtk )
"

It's also easier to revert (just remove REQUIRED_USE block) when it's fixed upstream.
Comment 8 Richard F. Ostrow Jr. 2011-03-30 18:24:55 UTC
Because gtk and qt for the most part operate just fine together in the build - it's gdkpixbuf+qt4 that does not. Disabling gtk is not the right approach, but the gdkpixbuf switch is tied to the gtk USE flag. I'd rather not needlessly disable the gtk USE flag (and numerous --enable switches) just to disable the gdkpixbuf switch.
Comment 9 Gilles Dartiguelongue (RETIRED) gentoo-dev 2011-03-31 08:18:53 UTC
agreed, I'll apply your patch asap.
Comment 10 Gilles Dartiguelongue (RETIRED) gentoo-dev 2011-04-03 21:13:49 UTC
+*tracker-0.10.6 (03 Apr 2011)
+
+  03 Apr 2011; Gilles Dartiguelongue <eva@gentoo.org> tracker-0.10.5.ebuild,
+  +tracker-0.10.6.ebuild, tracker-9999.ebuild:
+  Version bump. Fix qt4 handling, bug #360839.

I went with a slightly different approach, but it should work just fine. Feel
free to reopen if this is not fixed. Thanks for reporting.