NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.96k stars 13.97k forks source link

QtCreator crashes if running in an environment with different Qt version #10847

Closed bjornfor closed 8 years ago

bjornfor commented 8 years ago

I was under the impression that the Qt library version used to build QtCreator was completely independent of what Qt toolkit version is being used for application development within the IDE. (I think I've seen tutorials where QtCreator has been configured with more than one Qt toolkit, ready for use in application development.)

But when I update the Qt toolkit from the default 5.4, which is the same version as QtCreator is built with, to 5.5, then QtCreator will not start:

chrootenv:bfo@mini:~/workdir$ qtcreator
/usr/bin/qtcreator: symbol lookup error: /nix/store/3v30d8v5sjx8wf1v5pxpqj72pcda8xqq-qtquickcontrols-5.4.2/lib/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so: undefined symbol: _ZN17QGridLayoutEngineC2E6QFlagsIN2Qt13AlignmentFlagEE

(This is inside a FHS user env.)

I re-tried after removing state files in $HOME (rm -rf ~/.config/QtProject* ~/.config/TrollTech.conf). Same result.

Is this a true bug?

bjornfor commented 8 years ago

CC @ttuegel

ttuegel commented 8 years ago

But when I update the Qt toolkit from the default 5.4, which is the same version as QtCreator is built with, to 5.5

I'm unclear what's happening here, but I think you're using Qt Creator (built with Qt 5.4) in an environment where Qt 5.5 is installed, is that right? Yes, that should be possible. However, Qt Creator is picking up its plugins from the environment because it is not purely wrapped. The Qt 5.5 packages come with a mechanism to wrap Qt programs purely so this doesn't happen; I would recommend building Qt Creator with Qt 5.5.

bjornfor commented 8 years ago

Sorry for the confusing description. But yes, that's what I meant.

I don't know if it'll be acceptable to switch qtcreator on release-15.09 to qt55, but it's good to know this will not be a problem in the future. (I do most work on release-15.09.)