Nixpkgs: digikam is broken on release-20.09

Created on 26 Sep 2020  路  13Comments  路  Source: NixOS/nixpkgs

Describe the bug
digikam doesn't build anymore, due to the kmime dependency being broken:

$ git checkout release-20.09  # e.g. on a90e5950688b5f02a0cef98cbac1d21e8e3bc83e
$ nix-build -A digikam
[...]
fixing cmake files...
-- Performing Test HAVE_DATE_TIME - Success
CMake Error at CMakeLists.txt:27 (find_package):
  Could not find a configuration file for package "Qt5" that is compatible
  with requested version "5.13.0".

  The following configuration files were considered but not accepted:

    /nix/store/php1q59c4vlsfzj7qqqm8kxcpd0ay9pd-qtbase-5.12.7-dev/lib/cmake/Qt5/Qt5Config.cmake, version: 5.12.7



-- Configuring incomplete, errors occurred!
See also "/build/kmime-20.08.1/build/CMakeFiles/CMakeOutput.log".
builder for '/nix/store/h6dibshz1swfdslbibrbh0k694p12h07-kmime-20.08.1.drv' failed with exit code 1
error: build of '/nix/store/h6dibshz1swfdslbibrbh0k694p12h07-kmime-20.08.1.drv' on 'ssh://[email protected]' failed: builder for '/nix/store/h6dibshz1swfdslbibrbh0k694p12h07-kmime-20.08.1.drv' failed with exit code 1
builder for '/nix/store/h6dibshz1swfdslbibrbh0k694p12h07-kmime-20.08.1.drv' failed with exit code 1
cannot build derivation '/nix/store/c1cxigsiilq54zxdrdwhkxcrvxnj0y2z-akonadi-contacts-20.08.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/nfrr2andwvnw2zldj9jf7dm44y1pkp3a-digikam-6.4.0.drv': 1 dependencies couldn't be built
error: build of '/nix/store/nfrr2andwvnw2zldj9jf7dm44y1pkp3a-digikam-6.4.0.drv' failed

I git bisected the breakage to ce4eb0b79b3b8e830d40345fb6457fac6ca9a9ec.

Expected behavior
nix-build -A digikam should work.

Additional context
digikam works on nixos-20.03 and master. It even works on the release-20.09 branch-off commit from master: 53ce0bfc904a8e0dbe0d81cc1624815d4d8a038f. So this looks like a regression directly on the release-20.09 branch.

Ref https://github.com/NixOS/nixpkgs/issues/97479

Notify maintainers

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
bug regression qkde

All 13 comments

Might be fixed after: #98657.

I pulled release-19.09 (now on cb0c38404c4644422064d022b308dcd84c868334) and the broken dependency is fixed, but now digikam itself breaks:

$ nix-build -A digikam
[...]
[ 92%] Building CXX object core/dplugins/dimg/heif/CMakeFiles/DImg_HEIF_Plugin.dir/libde265/fallback-motion.cc.o
/nix/store/p792j5f44l3f0xi7ai5jllwnxqwnka88-binutils-2.31.1/bin/ld: /nix/store/w5q3ilbzl72z0vq0yf7fdhsymgc961hv-qtwebengine-5.12.7/lib/libQt5WebEngine.so.5: undefined reference to `QtWebEngineCore::WebContentsAdapter::findText(QString const&, bool, bool)@Qt_5'
/nix/store/p792j5f44l3f0xi7ai5jllwnxqwnka88-binutils-2.31.1/bin/ld: /nix/store/w5q3ilbzl72z0vq0yf7fdhsymgc961hv-qtwebengine-5.12.7/lib/libQt5WebEngine.so.5: undefined reference to `QtWebEngineCore::WebContentsAdapter::isFindTextInProgress() const@Qt_5'
/nix/store/p792j5f44l3f0xi7ai5jllwnxqwnka88-binutils-2.31.1/bin/ld: /nix/store/w5q3ilbzl72z0vq0yf7fdhsymgc961hv-qtwebengine-5.12.7/lib/libQt5WebEngine.so.5: undefined reference to `QtWebEngineCore::ProfileAdapter::clearCustomUrlSchemeHandlers()@Qt_5'
/nix/store/p792j5f44l3f0xi7ai5jllwnxqwnka88-binutils-2.31.1/bin/ld: /nix/store/w5q3ilbzl72z0vq0yf7fdhsymgc961hv-qtwebengine-5.12.7/lib/libQt5WebEngine.so.5: undefined reference to `QtWebEngineCore::WebContentsAdapter::recentlyAudible()@Qt_5'
/nix/store/p792j5f44l3f0xi7ai5jllwnxqwnka88-binutils-2.31.1/bin/ld: /nix/store/w5q3ilbzl72z0vq0yf7fdhsymgc961hv-qtwebengine-5.12.7/lib/libQt5WebEngine.so.5: undefined reference to `QtWebEngineCore::WebContentsAdapter::stopFinding()@Qt_5'
/nix/store/p792j5f44l3f0xi7ai5jllwnxqwnka88-binutils-2.31.1/bin/ld: /nix/store/w5q3ilbzl72z0vq0yf7fdhsymgc961hv-qtwebengine-5.12.7/lib/libQt5WebEngine.so.5: undefined reference to `QtWebEngineCore::ProfileAdapter::addCustomUrlSchemeHandler(QByteArray const&, QWebEngineUrlSchemeHandler*)@Qt_5'
/nix/store/p792j5f44l3f0xi7ai5jllwnxqwnka88-binutils-2.31.1/bin/ld: /nix/store/w5q3ilbzl72z0vq0yf7fdhsymgc961hv-qtwebengine-5.12.7/lib/libQt5WebEngine.so.5: undefined reference to `QtWebEngineCore::ProfileAdapter::removeCustomUrlSchemeHandler(QWebEngineUrlSchemeHandler*)@Qt_5'
/nix/store/p792j5f44l3f0xi7ai5jllwnxqwnka88-binutils-2.31.1/bin/ld: /nix/store/w5q3ilbzl72z0vq0yf7fdhsymgc961hv-qtwebengine-5.12.7/lib/libQt5WebEngine.so.5: undefined reference to `QtWebEngineCore::ProfileAdapter::customUrlSchemeHandlers() const@Qt_5'
/nix/store/p792j5f44l3f0xi7ai5jllwnxqwnka88-binutils-2.31.1/bin/ld: /nix/store/w5q3ilbzl72z0vq0yf7fdhsymgc961hv-qtwebengine-5.12.7/lib/libQt5WebEngine.so.5: undefined reference to `QtWebEngineCore::ProfileAdapter::takeCustomUrlSchemeHandler(QByteArray const&)@Qt_5'
collect2: error: ld returned 1 exit status
make[2]: *** [core/showfoto/CMakeFiles/showfoto.dir/build.make:516: core/showfoto/showfoto] Error 1
make[1]: *** [CMakeFiles/Makefile2:18330: core/showfoto/CMakeFiles/showfoto.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[...]
builder for '/nix/store/4ggy5641gigbphbd9jmqg3scqwx46via-digikam-6.4.0.drv' failed with exit code 2
error: build of '/nix/store/4ggy5641gigbphbd9jmqg3scqwx46via-digikam-6.4.0.drv' on 'ssh://nix-remote-build@buildserver' failed: builder for '/nix/store/4ggy5641gigbphbd9jmqg3scqwx46via-digikam-6.4.0.drv' failed with exit code 2
builder for '/nix/store/4ggy5641gigbphbd9jmqg3scqwx46via-digikam-6.4.0.drv' failed with exit code 1
error: build of '/nix/store/4ggy5641gigbphbd9jmqg3scqwx46via-digikam-6.4.0.drv' failed

I tried to backport #98721 to 20.09. However, the build fails with:

/nix/store/333six1faw9bhccsx9qw5718k6b1wiq2-stdenv-linux/setup: line 834: /nix/store/9x8vjfxjz2wv7xb90vwv5i697z6gr7d2-xz-5.2.5-bin/bin/xz: Argument list too long

This appears to be because some environment variables created by the cmake/KDE setup hooks are too big. For instance, on master, CMAKE_PREFIX_PATH is 95229 bytes, but on 20.03, it's 132149 bytes. This is probably because the latter depends on two version of Qt (e.g. qtbase-5.14.2 and qtbase-5.12.7). That might be related to #98657. @ttuegel Any ideas?

Digikam now builds (thanks to #99473), but it doesn't work (NixOS 20.09.20201009.0b8799e):

$ digikam
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb, wayland-org.kde.kwin.qpa.

Aborted (core dumped)

@ttuegel Any idea what can cause that?

Running with LD_DEBUG=files shows:

     16107:     file=libxcb-util.so.1 [0];  needed by /nix/store/an86ki36qka3nza2ibrhrfbk3l1a0fip-xcb-util-image-0.4.0/lib/libxcb-image.so.0 [0]
     16107:     file=libxcb-util.so.1 [0];  generating link map
     16107:       dynamic: 0x00007fc37dd12dd0  base: 0x00007fc37dd0c000   size: 0x0000000000007108
     16107:         entry: 0x00007fc37dd0f200  phdr: 0x00007fc37dd0c040  phnum:                  8
     16107:
     16107:     /nix/store/wmv4499lyqzywqxi59wrsr3zdn8qryk1-qtbase-5.12.7-bin/lib/qt-5.12.7/plugins/platforms/../../../../../w70ys9lv4j2h6f3di1jhqyxav8059ywv-qtbase-5.12.7/lib/libQt5XcbQpa.so.5: error: symbol lookup error: undefined symbol: _ZN22QWindowSystemInterface16handleCloseEventINS_15DefaultDeliveryEEEvP7QWindowPb, version Qt_5_PRIVATE_API (fatal)
     16107:
     16107:     file=/nix/store/wmv4499lyqzywqxi59wrsr3zdn8qryk1-qtbase-5.12.7-bin/lib/qt-5.12.7/plugins/platforms/libqxcb.so [0];  destroying link map

kmail in NixOS 20.09 has a similar problem. The main executable .kmail-wrapped is linked against qt-5.15 and but the installed plugins are for Qt 5.12. NixOS upgrades always have Qt related surprises. This is the weirdest one yet.

$ ldd  /nix/store/*-kmail-20.08.1/bin/.kmail-wrapped | grep Qt5Core
        libQt5Core.so.5 => /nix/store/5rqsaf7in0xx44ky97alz7q62y2bdb35-qtbase-5.15.0/lib/libQt5Core.so.5 (0x00007fc42d974000)
$ ls /nix/store/*-kmail-20.08.1/lib
libkmailprivate.so.5  libkmailprivate.so.5.15.1  qt-5.12.7

20.09.1500.edb26126d98 (Nightingale)

The file all-packages.nix shows a wild mix of qt dependencies.

  kdeApplications =
    let
      forQt512 =
        import ../applications/kde {
          libsForQt5 = libsForQt512;
          inherit lib fetchurl;
        };
      forQt515 =
        import ../applications/kde {
          libsForQt5 = libsForQt515;
          inherit lib fetchurl;
        };
      default = {
        inherit (forQt512)
          ark
          bomber bovo
          dolphin dolphin-plugins dragon
          ffmpegthumbs filelight
          granatier gwenview
          k3b
          kalzium kapptemplate kapman kate katomic
          kblackbox kblocks kbounce
          kcachegrind kcalc kcharselect kcolorchooser
          kdenetwork-filesharing kdenlive kdf kdialog kdiamond
          keditbookmarks
          kfind kfloppy
          kget
          khelpcenter
          kig kigo killbots
          klettres klines
          kmag kmines kmix kmplot
          knavalbattle knetwalk knights
          kollision kolourpaint kompare konsole
          kpat
          krdc kreversi krfb
          kshisen ksquares ksystemlog
          kteatime ktimer ktouch kturtle
          kwalletmanager
          marble
          okular
          picmi
          spectacle
          yakuake;
      };
      overrides = {
        inherit (forQt515)
          akonadi akregator elisa kaddressbook kgpg kitinerary kleopatra kmail
          kontact korganizer kpkpass kwave minuet;
      };
...
  digikam = libsForQt514.callPackage ../applications/graphics/digikam {
    opencv3 = opencv3WithoutCuda;
  };

Could anyone check if https://github.com/NixOS/nixpkgs/pull/101369 fixes this?

digikam works for me with #101369.

Then I'm closing.

Oh sorry, I'll make the backport PR close this.

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ayyess picture ayyess  路  3Comments

copumpkin picture copumpkin  路  3Comments

spacekitteh picture spacekitteh  路  3Comments

domenkozar picture domenkozar  路  3Comments

grahamc picture grahamc  路  3Comments