Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wireshark 2.4.4 build broken #34003

Closed
aKriJcz opened this issue Jan 18, 2018 · 9 comments
Closed

Wireshark 2.4.4 build broken #34003

aKriJcz opened this issue Jan 18, 2018 · 9 comments

Comments

@aKriJcz
Copy link

aKriJcz commented Jan 18, 2018

Issue description

Package wireshark-gtk is broken after update to version 2.4.4.

Brief output with warnings:

...
CMake Warning at CMakeLists.txt:444 (find_package):
  By not providing "FindQt5Core.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5Core", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt5Core" with any
  of the following names:

    Qt5CoreConfig.cmake
    qt5core-config.cmake

  Add the installation prefix of "Qt5Core" to CMAKE_PREFIX_PATH or set
  "Qt5Core_DIR" to a directory containing one of the above files.  If
  "Qt5Core" provides a separate development package or SDK, be sure it has
  been installed.

...

CMake Error at CMakeLists.txt:947 (find_package):
  By not providing "FindQt5Core.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5Core", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt5Core" with any
  of the following names:

    Qt5CoreConfig.cmake
    qt5core-config.cmake

  Add the installation prefix of "Qt5Core" to CMAKE_PREFIX_PATH or set
  "Qt5Core_DIR" to a directory containing one of the above files.  If
  "Qt5Core" provides a separate development package or SDK, be sure it has
  been installed.


-- Configuring incomplete, errors occurred!
...

Steps to reproduce

Updated system (nixos-rebuild switch --upgrade) with wireshark-gtk in installed packages.

Technical details

  • system: "x86_64-linux"
  • host os: Linux 4.9.76, NixOS, 17.09.2731.92d088e891e (Hummingbird)
  • multi-user?: yes
  • sandbox: no
  • version: nix-env (Nix) 1.11.16
  • channels(root): "nixos-17.09.2799.d9a2891c32e"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs

Temporary fix

I had to revert to previous version 2.4.2 with configuration override:

wireshark-gtk = super.wireshark-gtk.overrideAttrs (oldAttrs: let
  version = "2.4.2";
in rec {
  name = "wireshark-gtk-${version}";
  src = super.fetchurl {
    url = "http://www.wireshark.org/download/src/all-versions/wireshark-${version}.tar.xz";
    sha256 = "0zglapd3sz08p2z9x8a5va3jnz17b3n5a1bskf7f2dgx6m3v5b6i";
  };
});
@vidbina
Copy link
Contributor

vidbina commented Jan 18, 2018

I was just reading through CMakeLists.txt and the general outline

if( CMAKE_C_COMPILER_ID MATCHES "MSVC") # checking if we're using the C compiler for Win
  # ... who cares
else()
  # ...
  find_package(Qt5Core) # line 444
  # ...
endif()

# ...

if(BUILD_wireshark_gtk) # line 770
# ...

seems to suggest that Qt5Core is required even with BUILD_wireshark_gtk set 😕. Does anyone know why? An old (from 2013) post seems to suggest that the Wireshark team considered moving away from GTK towards Qt for cross-platform development convenience's sake, but I'm not sure if that means that the latest wireshark releases have a Qt dependency regardless of the chosen front-end.

I also tried building wireshark-cli and get the exact same error until I resort to always loading the qt5 inputs.

diff --git a/pkgs/applications/networking/sniffers/wireshark/default.nix b/pkgs/applications/networking/sniffers/wireshark/default.nix
index 5c7aaa7f054..9845c13c6d9 100644
--- a/pkgs/applications/networking/sniffers/wireshark/default.nix
+++ b/pkgs/applications/networking/sniffers/wireshark/default.nix
@@ -32,7 +32,7 @@ in stdenv.mkDerivation {
   buildInputs = [
     gettext pcre perl pkgconfig libpcap lua5 libssh openssl libgcrypt
     libgpgerror gnutls geoip c-ares python glib zlib
-  ] ++ optionals withQt  (with qt5; [ qtbase qtmultimedia qtsvg qttools ])
+  ] ++ (with qt5; [ qtbase qtmultimedia qtsvg qttools ])
     ++ optionals withGtk [ gtk3 librsvg gsettings_desktop_schemas ]
     ++ optionals stdenv.isLinux  [ libcap libnl ]
     ++ optionals stdenv.isDarwin [ SystemConfiguration ApplicationServices gmp ];

DISCLAIMER: I'm just messing around though. Perhaps there is a way to build the GTK variant without the Qt deps present.

@aKriJcz, I just use the Qt variant of Wireshark and that works fine. Is there a reason why you are not using it? There is a chance that the conclusion will be drawn to remove the GTK variant for Wireshark and just support Qt going forward.

@jtojnar
Copy link
Member

jtojnar commented Jan 18, 2018

See #33477

@dtzWill
Copy link
Member

dtzWill commented Jan 18, 2018

I swear I tested that all the things at least build, I did! 😆

Yep, looks like it worked because #33477 was already merged.

Oh, I see. #33477 just needs to be picked onto 17.09 :).

@jtojnar
Copy link
Member

jtojnar commented Jan 18, 2018

It looks like a fix was attempted by @adisbladis on 17.09 (089d869 and ab76932) but #33477 is superior and should be used instead.

@adisbladis
Copy link
Member

adisbladis commented Jan 19, 2018

This was only affecting 17.09 and I hacked up a fix that will go out once https://hydra.nixos.org/build/67774884#tabs-constituents finishes.

@dtzWill @jtojnar Thanks for pointing out the proper fix.
I reverted my hacky fix and backported #33477 instead.

@adisbladis
Copy link
Member

Closing since 17.09 has progressed to 5141f28405e

@aKriJcz
Copy link
Author

aKriJcz commented Jan 29, 2018

@vidbina Well, I think it is just a matter of personal preference. But lately Qt apps started to behave strangely as can be seen in #24256. I guess it is mixing of release channels (although it shouldn't be a problem here on NixOS). But if Qt is needed for building a cli app, that is just not right. Sorry for necroing this issue, I just found my mail notice about this thread. Gmail is really good at hiding mails from GitHub.

@jtojnar
Copy link
Member

jtojnar commented Jan 29, 2018

@aKriJcz QT is not needed, the issue was that both QT and GTK frontends would be built unless the QT one was explicitly disabled.

@aKriJcz
Copy link
Author

aKriJcz commented Feb 1, 2018

@jtojnar Yes, I know it is not needed. That is why I say that it is not right to have it as a mandatory build dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants