Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 844097 - media-video/mkvtoolnix-61.0.0[-gui] searches for uic (provided by dev-qt/qtwidgets) but doesn't use/need it
Summary: media-video/mkvtoolnix-61.0.0[-gui] searches for uic (provided by dev-qt/qtwi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
: 836561 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-05-13 20:01 UTC by Pedro
Modified: 2022-05-18 02:11 UTC (History)
4 users (show)

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


Attachments
Build log (build.log,8.18 KB, text/plain)
2022-05-13 20:02 UTC, Pedro
Details
Environment file (environment,92.55 KB, text/plain)
2022-05-13 20:02 UTC, Pedro
Details
emerge --info (emerge_info.txt,5.54 KB, text/plain)
2022-05-13 20:02 UTC, Pedro
Details
config log (config.log,39.61 KB, text/x-log)
2022-05-13 20:02 UTC, Pedro
Details
overly simple patch to remove uic requirement (mkvtoolnix-61-uic.patch,717 bytes, patch)
2022-05-17 23:56 UTC, Duane Robertson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro 2022-05-13 20:01:17 UTC
Seems that mkvtoolnix expects the Qt5 library despite not having any X/GUI flags enabled:

hecking for moc... /usr/lib64/qt5/bin/moc
checking for rcc... /usr/lib64/qt5/bin/rcc
checking for uic... no
checking for Qt 5... no: could not find the uic executable
configure: error: The Qt library is required for building MKVToolNix.

[...]

Called econf '--disable-debug' '--disable-precompiled-headers' '--disable-dbus' '--disable-gui' '--disable-qt6' '--enable-qt5' '--with-qmake=/usr/lib64/qt5/bin/qmake' '--without-dvdread' '--with-gettext' '--disable-update-check' '--disable-optimization' '--with-boost=/usr' '--with-boost-libdir=/usr/lib64'

econf has --enable-qt5 flag, this is visible also in the ebuild itself, line 94
Comment 1 Pedro 2022-05-13 20:02:18 UTC
Created attachment 778589 [details]
Build log
Comment 2 Pedro 2022-05-13 20:02:31 UTC
Created attachment 778592 [details]
Environment file
Comment 3 Pedro 2022-05-13 20:02:42 UTC
Created attachment 778595 [details]
emerge --info
Comment 4 Pedro 2022-05-13 20:02:53 UTC
Created attachment 778598 [details]
config log
Comment 5 Pedro 2022-05-13 20:04:21 UTC
Seems to be the same in media-video/mkvtoolnix-64.0.0 (https://bugs.gentoo.org/836561)
Comment 6 Duane Robertson 2022-05-17 23:56:13 UTC
Created attachment 779357 [details, diff]
overly simple patch to remove uic requirement

I don't know if this helps any, but this is what I'm using to patch out the requirement. UIC isn't ever actually used in a command-line build.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-05-18 01:29:43 UTC
*** Bug 836561 has been marked as a duplicate of this bug. ***
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-05-18 01:33:26 UTC
From bug 836561:
(In reply to Andreas Sturmlechner from comment #8)
> Turns out this is just the gui switch being broken apparently.
> 
> Package otherwise (somewhat) does okay detecting qtbindir, but in this
> tinderbox run, qtwidgets is requested even though IUSE=-gui is set.
> 
> PS: It seems 9999 ebuild is missing latest changes.

So, let's revisit what happened here, as I try to remember what I did at the time.

Qt really is unconditionally needed (from 59.0.0 release notes);
```
* The Qt library is now required for building all applications, even the
  command-line ones, as they use Qt's MIME type detection capabilities. In
  turn this means that you cannot disable the Qt usage anymore; either Qt5 or
  Qt 6 is required.
```

The unconditional qtcore dependency therefore seems correct, as does the rest of the ebuild in how it looks. But asturm points out that it's looking for qtwidgets (which provides 'uic') unconditionally, ignoring USE=gui.

It seems like Duane's fix is almost it -- but we should just shift it so that it searches conditionally based on --enable-gui, rather than dropping the check entirely.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-05-18 01:39:39 UTC
(In reply to Sam James from comment #8)
> It seems like Duane's fix is almost it -- but we should just shift it so
> that it searches conditionally based on --enable-gui, rather than dropping
> the check entirely.

tbh, it just seems easiest to drop it unconditionally given the --enable-gui logic is in the Qt 6 macro (and a separate file), and just rely on the dependency to provide uic as it.. should/will, rather than evilly conditional patch.
Comment 10 Larry the Git Cow gentoo-dev 2022-05-18 02:07:53 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e20ef76c972a6bfbb900f5d8c36239013b288cd2

commit e20ef76c972a6bfbb900f5d8c36239013b288cd2
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-05-18 02:07:08 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-05-18 02:07:45 +0000

    media-video/mkvtoolnix: add 67.0.0
    
    Quoting same comments I put in the patch:
    """
    We should only check for UIC (provided by qtwidgets) if we're building the GUI.
    
    Qt (just qtcore) itself is *always* needed to build mkvtoolnix (it's used
    for e.g. MIME type detection since 59.0.0), but the rest of Qt
    (like qtwidgets) is only needed for the GUI build.
    
    The build system incorrectly unconditionally checks for UIC. We fix it here
    to only check for it when doing a GUI build.
    
    First hunk (ac/qt5.m4, removing UIC check): Signed-off-by: Duane Robertson duane@duanerobertson.com
    Second hunk (rest, adding UIC check conditional on enable_gui): Signed-off-by: Sam James <sam@gentoo.org>
    """
    
    Closes: https://bugs.gentoo.org/844097
    Signed-off-by: Duane Robertson <duane@duanerobertson.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 media-video/mkvtoolnix/Manifest                    |   1 +
 .../files/mkvtoolnix-67.0.0-no-uic-qtwidgets.patch |  76 +++++++++++++
 media-video/mkvtoolnix/mkvtoolnix-67.0.0.ebuild    | 126 +++++++++++++++++++++
 3 files changed, 203 insertions(+)
Comment 11 Larry the Git Cow gentoo-dev 2022-05-18 02:09:05 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4bfec4188daa52de0eb9d27c483fec11dfed3540

commit 4bfec4188daa52de0eb9d27c483fec11dfed3540
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-05-18 02:08:46 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-05-18 02:08:51 +0000

    media-video/mkvtoolnix: sync live ebuild
    
    Bug: https://bugs.gentoo.org/844097
    Signed-off-by: Sam James <sam@gentoo.org>

 media-video/mkvtoolnix/mkvtoolnix-9999.ebuild | 48 +++++++++++++++------------
 1 file changed, 27 insertions(+), 21 deletions(-)
Comment 12 Larry the Git Cow gentoo-dev 2022-05-18 02:10:40 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9b366048e6e81d451c2210e20f25e7085d7025e

commit b9b366048e6e81d451c2210e20f25e7085d7025e
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-05-18 02:10:25 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-05-18 02:10:25 +0000

    media-video/mkvtoolnix: add comment re --enable-qt5
    
    Bug: https://bugs.gentoo.org/844097
    Signed-off-by: Sam James <sam@gentoo.org>

 media-video/mkvtoolnix/mkvtoolnix-67.0.0.ebuild | 7 ++++++-
 media-video/mkvtoolnix/mkvtoolnix-9999.ebuild   | 7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)