{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/15498","repository_url":"https://api.github.com/repos/NixOS/nixpkgs","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/15498/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/15498/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/15498/events","html_url":"https://github.com/NixOS/nixpkgs/issues/15498","id":155033967,"number":15498,"title":"Qt libraries shouldn't end up in system-path","user":{"login":"aszlig","id":192147,"avatar_url":"https://avatars.githubusercontent.com/u/192147?v=3","gravatar_id":"","url":"https://api.github.com/users/aszlig","html_url":"https://github.com/aszlig","followers_url":"https://api.github.com/users/aszlig/followers","following_url":"https://api.github.com/users/aszlig/following{/other_user}","gists_url":"https://api.github.com/users/aszlig/gists{/gist_id}","starred_url":"https://api.github.com/users/aszlig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aszlig/subscriptions","organizations_url":"https://api.github.com/users/aszlig/orgs","repos_url":"https://api.github.com/users/aszlig/repos","events_url":"https://api.github.com/users/aszlig/events{/privacy}","received_events_url":"https://api.github.com/users/aszlig/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/0.kind:%20bug","name":"0.kind: bug","color":"84b6eb"},{"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/6.topic:%20kde","name":"6.topic: kde","color":"fef2c0"},{"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/6.topic:%20nixos","name":"6.topic: nixos","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-16T13:53:48Z","updated_at":"2016-05-18T10:14:32Z","closed_at":null,"body":"In commit 9ea3e371df617725eab1a8beacc05bd5eefdca6f, the setup-hook for `qtbase` adds itself to `propagated-user-env-packages`. Normally this isn't a big problem and just cluttering up the system path, but if there are mixed versions of the Qt libraries, things can get pretty nasty when stuff is loaded at runtime.\r\n\r\nAnd that's what happens if you add a random Qt 5.5 program into `environment.systemPackages` with KDE 5 enabled:\r\n\r\n```sh-session\r\n$ nix-store -qR /run/current-system/sw | grep qtbase\r\n/nix/store/kfj94grdfkyn1ryd8kj7vdx470sbp1kb-qtbase-5.6.0\r\n/nix/store/ndhbfkanyg46y8phw9jv93cwg1fm7ryr-qtbase-5.6.0-dev\r\n/nix/store/bx34kkw8yjkh70515hy0wximjvx2dh00-qtbase-5.5.1\r\n/nix/store/yrxzmr1ck2c17znq0knddgllznzq8d10-qtbase-5.5.1-dev\r\n```\r\n\r\nIn theory, this shouldn't be a problem, but it turns out that KDE won't start with this, because it's trying to load the libraries at runtime from the system path.\r\n\r\nThis is what happens during KDE startup (reindented to save horizontal space):\r\n\r\n```\r\n/nix/store/9mpqvbgg7slw3hal78ryrp80xhq8kd8k-plasma-workspace-5.6.4/bin/ksplashqml:\r\n  symbol lookup error: /nix/store/bx34kkw8yjkh70515hy0wximjvx2dh00-qtbase-5.5.1/lib/libQt5XcbQpa.so.5:\r\n    undefined symbol: _ZN22QWindowSystemInterface19registerTouchDeviceEP12QTouchDevice\r\n```\r\n\r\nThe `plasma-workspace` package only lists `qtbase-5.6` in its dependencies and the `ksplashqml` binary is only linked against `qtbase-5.6` as well:\r\n\r\n```sh-session\r\n$ nix-store -qR /nix/store/9mpqvbgg7slw3hal78ryrp80xhq8kd8k-plasma-workspace-5.6.4 | grep qtbase\r\n/nix/store/kfj94grdfkyn1ryd8kj7vdx470sbp1kb-qtbase-5.6.0\r\n/nix/store/ndhbfkanyg46y8phw9jv93cwg1fm7ryr-qtbase-5.6.0-dev\r\n```\r\n\r\nSo adding *any* Qt 5.5 program to `environment.systemPackages` with current KDE 5 will break KDE as of 903582798636ac406dbe7b82c502d59fba7b4293.\r\n\r\nI guess we could at least mitigate this by only propagating the plugin stuff into `systemPackages` (but even that could end up having mixed Qt versions), but I'm neither using KDE nor do I know details about it.\r\n\r\nCc: @ttuegel"},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/219984355","html_url":"https://github.com/NixOS/nixpkgs/issues/15498#issuecomment-219984355","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/15498","id":219984355,"user":{"login":"abbradar","id":1174810,"avatar_url":"https://avatars.githubusercontent.com/u/1174810?v=3","gravatar_id":"","url":"https://api.github.com/users/abbradar","html_url":"https://github.com/abbradar","followers_url":"https://api.github.com/users/abbradar/followers","following_url":"https://api.github.com/users/abbradar/following{/other_user}","gists_url":"https://api.github.com/users/abbradar/gists{/gist_id}","starred_url":"https://api.github.com/users/abbradar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abbradar/subscriptions","organizations_url":"https://api.github.com/users/abbradar/orgs","repos_url":"https://api.github.com/users/abbradar/repos","events_url":"https://api.github.com/users/abbradar/events{/privacy}","received_events_url":"https://api.github.com/users/abbradar/received_events","type":"User","site_admin":false},"created_at":"2016-05-18T10:14:32Z","updated_at":"2016-05-18T10:14:32Z","body":"See also https://github.com/NixOS/nixpkgs/issues/14937"}}