Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 488640 - net-analyzer/wireshark - automagical Qt 5 use and MOC/UIC confusion
Summary: net-analyzer/wireshark - automagical Qt 5 use and MOC/UIC confusion
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Netmon Herd
URL:
Whiteboard:
Keywords:
: 489614 490430 513476 (view as bug list)
Depends on: qt5-porting
Blocks: qtbindir
  Show dependency tree
 
Reported: 2013-10-19 19:41 UTC by David Heidelberg (okias)
Modified: 2015-03-23 05:39 UTC (History)
1 user (show)

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


Attachments
wireshark-1.11.0.patch (file_488640.txt,1.77 KB, patch)
2013-10-19 21:57 UTC, Tom Wijsman (TomWij) (RETIRED)
Details | Diff
488640-wireshark-1.99.0-qt5.patch (488640-wireshark-1.99.0-qt5.patch,2.26 KB, patch)
2014-10-20 11:05 UTC, Jeroen Roovers (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Heidelberg (okias) 2013-10-19 19:41:37 UTC
Reference fixed ebuild, with workaround for qt5 [1].
[1] https://github.com/okias/ixit/tree/master/net-analyzer/wireshark

Reproducible: Always

Steps to Reproduce:
1. install qtcore:5 and qtgui:5
2. emerge -v wireshark
3. notice, that wireshark detect qt 5.x.y
Actual Results:  
Wireshark use MOC from /usr/bin/moc and UIC from /usr/bin/uic, which refers to 4.8.x version.
This behaviour end with compilation fail, because from .ui files is code generated by Qt:4 instead detected Qt:5

Expected Results:  
Wireshark should USE qt4 and qt5. In case QT5 use, for this moment I avoided fail by patching configure.ac and replacing path (hardcoding to qt5)

Next, I'd like to propose dropping +gtk3 in favor gtk3, as wireshark developers start moving to Qt5 [2]. As replacement, I'd like to discuss +qt4 (until qt5 will be unmasked)

[2] https://blog.wireshark.org/2013/10/switching-to-qt/
Comment 1 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-10-19 21:57:53 UTC
Created attachment 361356 [details, diff]
wireshark-1.11.0.patch
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2013-10-20 13:54:16 UTC
Why would we support dependencies from overlays.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2013-10-28 00:42:59 UTC
*** Bug 489614 has been marked as a duplicate of this bug. ***
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2013-11-05 15:54:30 UTC
*** Bug 490430 has been marked as a duplicate of this bug. ***
Comment 5 Dennis Schridde 2013-11-19 09:07:18 UTC
Could, for the time being, the Qt5 detection of wireshark be patched out?
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2014-04-29 19:11:41 UTC
(In reply to Dennis Schridde from comment #5)
> Could, for the time being, the Qt5 detection of wireshark be patched out?

That detection is going to fail anyway because, apparently, we're not Red Hat.

The 1.11.3 ebuild has a sed script in src_prepare() for that:

     sed -i -e 's|Qt5||g' acinclude.m4 || die

since I happened to be able to test the current state of Qt 5 through the [qt] overlay.

The older branches do not support Qt 5 at all, even if we had a Red Hat like setup.
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2014-06-16 14:11:42 UTC
*** Bug 513476 has been marked as a duplicate of this bug. ***
Comment 8 David Heidelberg (okias) 2014-06-16 14:30:56 UTC
Thanks for reminding me I already filled bug. It's been so long I forgot and not sure why bugzilla didn't find me this when I issued search "wireshark qt5"

So, anyway I keeping version with working qt5 support in ::ixit overlay [1] feel free to improve, contribute and update.

[1] https://github.com/okias/ixit/tree/master/net-analyzer/wireshark
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2014-06-16 14:51:31 UTC
(In reply to David Heidelberger (okias) from comment #8)
> So, anyway I keeping version with working qt5 support in ::ixit overlay [1]

Please _attach_ anything you want to contribute (and don't merely point to external resources), preferably a diff against an existing ebuild.
Comment 10 David Heidelberg (okias) 2014-06-16 15:17:19 UTC
> Please _attach_ anything you want to contribute (and don't merely point to
> external resources), preferably a diff against an existing ebuild.

I'd like to improve my workflow to help you more guys, but at this moment it has few serious issues like
  * pasting diffs into bugzilla isn't much productive as comment, also copypaste is not much friendly
  * uploading it as file requires me to save diff into file and upload
  * wont allow users (and me) to be able test (and use in this case) changes out-of-box

These days I work with things like git and gerrit, which make this work much more effective, but seems you guys didn't adapted to it yet.

External resource as my overlay will persist per time (as long I use Gentoo) and if that time passes, there will be always git history.

I though about improvement in way, that I could import original source from portage, commit it and  then made change on it, which could be more nicer to see what changed. I'll try do that next time.
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2014-06-17 12:31:46 UTC
(In reply to David Heidelberger (okias) from comment #10)
> I'd like to improve my workflow to help you more guys, but at this moment it

Please stay on topic. Your personal workflow preferences obviously collide with the way this project does things and you can do nothing about that right now.
Comment 12 David Heidelberg (okias) 2014-10-18 13:10:41 UTC
Qt5 is in tree at this moment.
Comment 13 Jeroen Roovers (RETIRED) gentoo-dev 2014-10-18 21:37:07 UTC
(In reply to David Heidelberger (okias) from comment #12)
> Qt5 is in tree at this moment.

It's been there for a while, but I still don't see eclass support to conveniently find /usr/lib64/qt5/bin/moc and other needed tools and the build system still assumes it should be able to find something like uic-4 and moc-4 or /else/ it will assume Qt 5 is used. Quoting configure.ac:

# Annoyingly, at least on Fedora 16, uic and moc are named XXX-qt4
# rather than just XXX, perhaps to allow Qt 3 and Qt 4 tools to be
# installed; if they're still doing that in current Fedora releases,
# perhaps there will also be XXX-qt5 when they pick up Qt 5.

Annoyingly, the configure logic excludes perhaps every other distro. We might start to fix this by perhaps setting the UIC and MOC variables or by fixing all of that failed logic with a more elaborate "-gentoo.patch".
Comment 14 Jeroen Roovers (RETIRED) gentoo-dev 2014-10-20 11:05:31 UTC
Created attachment 387038 [details, diff]
488640-wireshark-1.99.0-qt5.patch

This fixes one problem, which is that the build system uses the wrong moc/uic.
The major problem it does not fix is that with both Qt4 and Qt5 installed, the build system will prefer Qt5. Currently the configure script does not handle Qt the way it does GTK+ 2/3. Introducing a --with-qt[45] switch is probably the way to go, and would involve patching both acinclude.m4 and configure.ac.
Comment 15 Jeroen Roovers (RETIRED) gentoo-dev 2014-10-24 21:32:32 UTC
Please try with 1.99.0-r1. It should properly enable/disable Qt4/Qt5 support.
Comment 16 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-06 21:43:45 UTC
*wireshark-1.12.1-r1 (06 Nov 2014)
 
  06 Nov 2014; Jeroen Roovers <jer@gentoo.org> +wireshark-1.12.1-r1.ebuild:
  Add Qt 5 support to the stable branch (bug #488640).
Comment 17 Ben de Groot (RETIRED) gentoo-dev 2015-03-22 15:05:15 UTC
(In reply to Jeroen Roovers from comment #13)
> (In reply to David Heidelberger (okias) from comment #12)
> > Qt5 is in tree at this moment.
> 
> It's been there for a while, but I still don't see eclass support to
> conveniently find /usr/lib64/qt5/bin/moc and other needed tools and the
> build system still assumes it should be able to find something like uic-4
> and moc-4 or /else/ it will assume Qt 5 is used. Quoting configure.ac:

Re-opening, as we now have such eclass support. Please use qt4_get_bindir and qt5_get_bindir from qmake-utils.eclass. This is especially important for Qt4, as the locations have changed in 4.8.6, to allow parallel installation with Qt5, and /usr/bin/moc (& friends) can now point to the Qt5 version, if that's how the user has configured it with qtchooser.
Comment 18 Jeroen Roovers (RETIRED) gentoo-dev 2015-03-23 05:39:45 UTC
Fixed again.