Bug 241548 - net/wireshark not compiling with rcc
Summary: net/wireshark not compiling with rcc
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Joe Marcus Clarke
URL:
Keywords:
: 241589 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-10-28 17:18 UTC by doctor
Modified: 2019-10-31 13:36 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (marcus)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description doctor 2019-10-28 17:18:41 UTC
[2016/2368] cd /usr/ports/net/wireshark/work/.build/ui/qt && /usr/local/bin/cmake -E cmake_autorcc /usr/ports/net/wireshark/work/.build/ui/qt/CMakeFiles/qtui_autogen.dir/RCCaboutInfo.cmake Release
FAILED: ui/qt/qtui_autogen/EF4ICWSDIF/qrc_about.cpp 
cd /usr/ports/net/wireshark/work/.build/ui/qt && /usr/local/bin/cmake -E cmake_autorcc /usr/ports/net/wireshark/work/.build/ui/qt/CMakeFiles/qtui_autogen.dir/RCCaboutInfo.cmake Release

AutoRcc subprocess error
------------------------
The rcc process failed to compile
  "/usr/ports/net/wireshark/work/wireshark-3.0.6/image/about.qrc"
into
  "/usr/ports/net/wireshark/work/.build/ui/qt/qtui_autogen/EF4ICWSDIF/qrc_about.cpp"

Command
-------
/usr/local/lib/qt5/bin/rcc --format-version 1 -name about -o /usr/ports/net/wireshark/work/.build/ui/qt/qtui_autogen/EF4ICWSDIF/qrc_about.cpp /usr/ports/net/wireshark/work/wireshark-3.0.6/image/about.qrc

Output
------
Usage: /usr/local/lib/qt5/bin/rcc [options] inputs
Qt Resource Compiler version 5.13.0

Options:
  -h, --help                 Displays this help.
  -v, --version              Displays version information.
  -o, --output <file>        Write output to <file> rather than stdout.
  -t, --temp <file>          Use temporary <file> for big resources.
  --name <name>              Create an external initialization function with
                             <name>.
  --root <path>              Prefix resource access path with root path.
  --compress-algo <algo>     Compress input files using algorithm <algo>
                             ([zstd], zlib, none).
  --compress <level>         Compress input files by <level>.
  --no-compress              Disable all compression. Same as
                             --compress-algo=none.
  --threshold <level>        Threshold to consider compressing files.
  --binary                   Output a binary file for use as a dynamic
                             resource.
  --pass <number>            Pass number for big resources
  --namespace                Turn off namespace macros.
  --verbose                  Enable verbose mode.
  --list                     Only list .qrc file entries, do not generate code.
  --list-mapping             Only output a mapping of resource paths to file
                             system paths defined in the .qrc file, do not
                             generate code.
  --project                  Output a resource file containing all files from
                             the current directory.
  --format-version <number>  The RCC format version to write

Arguments:
  inputs                     Input files (*.qrc).
/usr/local/lib/qt5/bin/rcc: Zstandard compression requires format version 3 or higher

ninja: build stopped: subcommand failed.
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/net/wireshark
*** Error code 1

Stop.
make: stopped in /usr/ports/net/wireshark


The above is the showstopper.  Please fix.
Comment 1 Joe Marcus Clarke freebsd_committer freebsd_triage 2019-10-28 22:17:51 UTC
It appears you may have the zstd port installed.  If so, it would appear there may be a hidden dependency in qt5-buildtools on this, and this is breaking wireshark, which forces format-version 1 for reproducible builds.

If you have zstd installed, and you remove it, rebuild qt5-buildtools, and then try to build wireshark?
Comment 2 doctor 2019-10-29 17:34:33 UTC
Maybe force a rebuild of archivers/zstd
Comment 3 Joe Marcus Clarke freebsd_committer freebsd_triage 2019-10-29 17:39:00 UTC
No, that won't work.  It's the presence of zstd that is breaking the build.
Comment 4 rkoberman 2019-10-30 03:20:45 UTC
Deleted zsrd, but fails immediately with:
===>   wireshark-3.0.6 depends on file: /usr/local/bin/cmake - found
===>   wireshark-3.0.6 depends on executable: ninja - found
===>   wireshark-3.0.6 depends on package: pkgconf>=1.3.0_1 - found
===>   wireshark-3.0.6 depends on file: /usr/local/bin/python3.6 - found
===>   wireshark-3.0.6 depends on executable: update-desktop-database - found
===>   wireshark-3.0.6 depends on executable: update-mime-database - found
===>   wireshark-3.0.6 depends on executable: gtk-update-icon-cache - found
===>   wireshark-3.0.6 depends on package: perl5>=5.30.r1<5.31 - found
===>   wireshark-3.0.6 depends on file: /usr/local/lib/qt5/bin/moc - found
===>   wireshark-3.0.6 depends on file: /usr/local/lib/qt5/bin/lrelease - found
===>   wireshark-3.0.6 depends on file: /usr/local/lib/qt5/bin/qmake - found
===>   wireshark-3.0.6 depends on shared library: libgpg-error.so - found (/usr/local/lib/libgpg-error.so)
===>   wireshark-3.0.6 depends on shared library: libgcrypt.so - found (/usr/local/lib/libgcrypt.so)
===>   wireshark-3.0.6 depends on shared library: liblz4.so - found (/usr/local/lib/liblz4.so)
===>   wireshark-3.0.6 depends on shared library: libnghttp2.so - found (/usr/local/lib/libnghttp2.so)
===>   wireshark-3.0.6 depends on shared library: libsnappy.so - found (/usr/local/lib/libsnappy.so)
===>   wireshark-3.0.6 depends on shared library: libgnutls.so - found (/usr/local/lib/libgnutls.so)
===>   wireshark-3.0.6 depends on shared library: libgcrypt.so - found (/usr/local/lib/libgcrypt.so)
===>   wireshark-3.0.6 depends on shared library: libmaxminddb.so - found (/usr/local/lib/libmaxminddb.so)
===>   wireshark-3.0.6 depends on shared library: libsmi.so - found (/usr/local/lib/libsmi.so)
===>   wireshark-3.0.6 depends on shared library: libssh.so - found (/usr/local/lib/libssh.so)
===>   wireshark-3.0.6 depends on shared library: libintl.so - found (/usr/local/lib/libintl.so)
===>   wireshark-3.0.6 depends on shared library: libatk-1.0.so - found (/usr/local/lib/libatk-1.0.so)
===>   wireshark-3.0.6 depends on shared library: libgdk_pixbuf-2.0.so - found (/usr/local/lib/libgdk_pixbuf-2.0.so)
===>   wireshark-3.0.6 depends on shared library: libglib-2.0.so - found (/usr/local/lib/libglib-2.0.so)
===>   wireshark-3.0.6 depends on shared library: libintl.so - found (/usr/local/lib/libintl.so)
===>   wireshark-3.0.6 depends on shared library: libxml2.so - found (/usr/local/lib/libxml2.so)
===>   wireshark-3.0.6 depends on shared library: libpango-1.0.so - found (/usr/local/lib/libpango-1.0.so)
===>   wireshark-3.0.6 depends on shared library: libQt5Core.so - found (/usr/local/lib/qt5/libQt5Core.so)
===>   wireshark-3.0.6 depends on shared library: libQt5Gui.so - found (/usr/local/lib/qt5/libQt5Gui.so)
===>   wireshark-3.0.6 depends on shared library: libQt5Multimedia.so - found (/usr/local/lib/qt5/libQt5Multimedia.so)
===>   wireshark-3.0.6 depends on shared library: libQt5PrintSupport.so - found (/usr/local/lib/qt5/libQt5PrintSupport.so)
===>   wireshark-3.0.6 depends on shared library: libQt5Svg.so - found (/usr/local/lib/qt5/libQt5Svg.so)
===>   wireshark-3.0.6 depends on shared library: libQt5Widgets.so - found (/usr/local/lib/qt5/libQt5Widgets.so)
===>  Configuring for wireshark-3.0.6
===>  Performing out-of-source build
/bin/mkdir -p /usr/ports/net/wireshark/work/.build
ld-elf.so.1: Shared object "libzstd.so.1" not found, required by "libarchive.so.13"

zstd is linked to 23 of my ports via libarchive and I'd hate to have to rebuild all of them, especially since my system would be largely useless until wireshark and then everything relevant was re-built. I guess I could pre-build packages for all of them before starting to speed the process.

Any other approach?
Comment 5 rkoberman 2019-10-30 05:11:13 UTC
OK. Have rebuilt libarchive, qt5-buildtools, qt5-core nd wirechark now builds. Unfortunately, many other things do, but it fails to run.
ld-elf.so.1: /usr/local/lib/qt5/libQt5Gui.so.5: Undefined symbol "qt_resourceFeatureZstd@Qt_5"

So I will have to rebuild at least one more port. I really need to run a qt5 based  app, so I will have to back out of this for now.
Comment 6 rkoberman 2019-10-30 05:47:54 UTC
OK. delete zstd. Build libarchive with zstd option removed, rebuild qt5-buildtools, qt5-core, and qt5-gui and wireshare not only builds, but runs. (Can't say tight now if it actually works, as I need to get stuff working and I probably need to build a bunch of other stuff to get thm running.
Comment 7 zdravko 2019-10-30 12:44:33 UTC
qt5-declarative also requires rebuilding without zstd
Comment 8 Joe Marcus Clarke freebsd_committer freebsd_triage 2019-10-30 19:44:32 UTC
*** Bug 241589 has been marked as a duplicate of this bug. ***
Comment 9 Joe Marcus Clarke freebsd_committer freebsd_triage 2019-10-30 19:47:43 UTC
Those dependency issues should be filed as a PR for the KDE/QT people.  I don't see zstd as an explicit dependency on my system, and thus I don't have it.  It is a non-default option for libarchive, though.

Fixing this in wireshark will break reproducible builds, but I don't see another way, especially if zstd compression is a recommended or widely-used thing with QT.
Comment 10 commit-hook freebsd_committer freebsd_triage 2019-10-30 20:07:57 UTC
A commit references this bug:

Author: marcus
Date: Wed Oct 30 20:07:39 UTC 2019
New revision: 516103
URL: https://svnweb.freebsd.org/changeset/ports/516103

Log:
  Attempt to fix the build when zstd is present.

  Apparently, zstd is silently consumed by QT when installed.  This breaks reprdoducible
  builds of wireshark, but I see no other solution if QT can and will use zstd compression.

  PR:		241548

Changes:
  head/net/wireshark/files/patch-ui_qt_CMakeLists.txt
Comment 11 Ivan Rozhuk 2019-10-31 09:30:35 UTC
Works for me, thanks!
Comment 12 Joe Marcus Clarke freebsd_committer freebsd_triage 2019-10-31 13:36:58 UTC
This has been fixed at the expense of reproducible builds.