Skip to content

qt5 impurities break some apps, reporting symbol lookup errors #17448

Closed

Description

@despairblue

Issue description

$ robomongo
robomongo: symbol lookup error: /nix/store/dycw7iwqlx6dm7jci6qyq8qdxhvijcvm-qtbase-5.5.1/lib/libQt5XcbQpa.so.5: undefined symbol: _ZN22QWindowSystemInterface19registerTouchDeviceEP12QTouchDevice

Steps to reproduce

  1. install robomongo from unstable
  2. try to start it

Technical details

  • System: 16.09pre85931.125ffff (Flounder)
  • Nix version: nix-env (Nix) 1.11.2
  • Nixpkgs version: ❓
    • what is nix-instantiate --eval 'robomongo' -A lib.nixpkgsVersion supposed to do?
    • what it does is error: getting status of ‘/home/despairblue/robomongo’: No such file or directory

Activity

  1. added
    0.kind: bug
    6.topic: qt/kde
    on Sep 11, 2016
  2. vcunat commented on Sep 11, 2016

    @vcunat
    Member

    I'm getting the same with vlc:

    vlc: symbol lookup error: /nix/store/vb3f9q77py8p71i3g3ch9s4vfg8xk8qs-qtbase-5.5.1/lib/libQt5XcbQpa.so.5: undefined symbol: _ZN22QWindowSystemInterface19registerTouchDeviceEP12QTouchDevice
    

    That's clearly due to an impurity as

    $ nix-store -qR $(which vlc) | grep qtbase
    /nix/store/lcr4y1dqapr657wiza9gm3g06hcvdwn1-qtbase-5.6.1-1
    /nix/store/s8ndp1d58d4la33pr6v1h1rz2slgldcf-qtbase-5.6.1-1-dev
    

    @ttuegel: I'm getting this on and off for quite a long time. I thought it should've been resolved around #16255 and similar tickets, but apparently not, as it still happens for me on current 16.09 with a couple commits on top.

  3. changed the title [-]robomongo does not start[/-] [+]qt5 impurities break some apps with symbol lookup errors[/+] on Sep 11, 2016
  4. changed the title [-]qt5 impurities break some apps with symbol lookup errors[/-] [+]qt5 impurities break some apps, reporting symbol lookup errors[/+] on Sep 11, 2016
  5. added this to the 16.09 milestone on Sep 11, 2016
  6. vcunat commented on Sep 11, 2016

    @vcunat
    Member

    I don't mean to push you, but if you have some ideas... I suspect you know significantly more than me about this, and I'd really like to resolve issues like this.

  7. ttuegel commented on Sep 11, 2016

    @ttuegel
    Member

    I don't mean to push you, but if you have some ideas... I suspect you know significantly more than me about this, and I'd really like to resolve issues like this.

    At a minimum, it needs to be wrapped with wrapQtProgram. That should reset the environment variables that cause the problem.

  8. vcunat commented on Sep 11, 2016

    @vcunat
    Member

    Unfortunately, using it to wrap the vlc executable didn't seem to have affected the crash.

  9. vcunat commented on Sep 11, 2016

    @vcunat
    Member

    I should mention that I'm still getting the same error also when running konsole-16.08.0 (EDIT: also many other core KDE apps, e.g. kate and gwenview but not okular).

  10. ttuegel commented on Sep 11, 2016

    @ttuegel
    Member

    @vcunat What do you have installed in your profiles?

  11. vcunat commented on Sep 11, 2016

    @vcunat
    Member

    @ttuegel: various KDE apps in ~/.nix-profile, certainly, including some outdated ones (and lots of other packages as well). My systemPackages is relatively small and I no longer enable KDE in NixOS config.

  12. ttuegel commented on Sep 11, 2016

    @ttuegel
    Member

    various KDE apps in ~/.nix-profile, certainly, including some outdated ones

    Unfortunately, you need to remove the outdated ones to stop the impurity. Desktop applications are necessarily impure, otherwise they could not have themes, icons, input methods, etc. The solution to the Qt 5 impurity in this case was to stop polluting the profile with things that shouldn't be shared.

  13. vcunat commented on Sep 11, 2016

    @vcunat
    Member

    "Solution": get rid of (older/incompatible) ~/.nix-profile/lib/libQt5*. That may not be very easy, as KDE apps unfortunately (still) propagate it into the profile.

    Hmm, it would be nice if we had an "installation mode" that doesn't create such interferences/plugs/etc. I've come to rely on such behavior with nix.

    Do you think it's really needed for KDE stuff to have (so many) propagatedUserEnvPackages? Perhaps just adding most of them to the wrapper would be enough? It seems like (most of) #15498 all over again.

  14. ttuegel commented on Sep 11, 2016

    @ttuegel
    Member

    get rid of (older/incompatible) ~/.nix-profile/lib/libQt5*. That may not be very easy, as KDE apps unfortunately (still) propagate it into the profile.

    As far as I know, there are no KDE 5 applications that still do this; however, every Qt 5 application is sensitive to garbage left-over from the older, ill-behaved packages.

    Hmm, it would be nice if we had an "installation mode" that doesn't create such interferences/plugs/etc. I've come to rely on such behavior with nix.

    Unfortunately, the Nix philosophy is fundamentally incompatible with desktop software.

    Do you think it's really needed for KDE stuff to have (so many) propagatedUserEnvPackages? Perhaps just adding most of them to the wrapper would be enough? It seems like (most of) #15498 all over again.

    The only things that still get propagated are service definitions, e.g. for D-Bus, and there's no way around that.

    Again, as far as I know there are no applications currently in Nixpkgs which propagate junk into the user environment. If you can provide counterexamples to this claim, I will happily remove them.

  15. vcunat commented on Sep 11, 2016

    @vcunat
    Member
    $ git co master
    $ nix-build -Q -A kde5.konsole
    /nix/store/71j4s0047w2mihknqfz945ixnri73pl7-konsole-16.08.0
    $ cat ./result/nix-support/propagated-user-env-packages
     /nix/store/pzjw9nlr5v2718iva2jw2mci4klc3d8i-konsole-16.08.0 /nix/store/2vbidlnwwr6vkv7lg34swa6wx2jjniyd-kdelibs4support-5.24.0 /nix/store/d8zny1cqfhgmqmxysk5vgsx4xb2nrq2a-kcoreaddons-5.24.0 /nix/store/sfhp1j0nmdp002cj7yf0ahwdsh25p0v0-shared-mime-info-1.7 /nix/store/8bjcx5qi01qq4l1x7fmkfvwp09k0pq6h-kded-5.24.0 /nix/store/gs3d66y8q4gindzxx08n98nlm9zwvcgk-kinit-5.24.0 /nix/store/brll0a0972hrdndm63h339fjn2wisxy5-kio-5.24.0 /nix/store/ghwrdzwii2v2whg8879pnwkwsai2prb1-breeze-icons-5.24.0 /nix/store/n57dxiv3sxgkawicki49g4s2b6nqvrk0-kglobalaccel-5.24.0 /nix/store/4w7hmk0qdn58w92vqmhsj5dl8pp2g871-kjobwidgets-5.24.0 /nix/store/cnwqsp77ifgb763faqvn0ha5qq9q4hij-knotifications-5.24.0 /nix/store/9456ivhskzi9a8cpyb60mlx6n0d4fqjj-phonon-qt5-4.9.0 /nix/store/769dxl9429yi1a1ir65hjpx153z51axa-kwallet-5.24.0 /nix/store/mk5by4l8ln6l6jp2ij0yd3dzb2w8dfd5-network-manager-1.2.2
    
  16. ttuegel commented on Sep 11, 2016

    @ttuegel
    Member

    Every one of those packages provides a service definition, .desktop file, theme, MIME type, or some other type of shared data. None of them provides a Qt plugin which could cause the segfault you're seeing.

  17. abbradar commented on Oct 8, 2016

    @abbradar
    Member

    If I understand correctly, there's not much we can do about this now -- the bug is fixed but all the leftovers from old times need to be updated. I suppose we can close this?

  18. nixos-discourse commented on Mar 30, 2020

    @nixos-discourse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bug6.topic: qt/kde

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions