Cool-retro-term fails to run
After running $ nix-env -i cool-retro-term, cool-retro-term doesn't seem to work. When attempting to run, it outputs errors and hangs:
$ cool-retro-term --verbose
QQmlApplicationEngine failed to load component
qrc:/main.qml:23 module "QtQuick.Controls" is not installed
qrc:/main.qml:24 module "QtGraphicalEffects" is not installed
qrc:/main.qml:23 module "QtQuick.Controls" is not installed
qrc:/main.qml:24 module "QtGraphicalEffects" is not installed
This is on the current nixos-unstable channel:
$ nixos-version
16.03pre73316.93d8671 (Emu)
Confirmed, already on 15.09 and persist on current master. /cc @ttuegel for latest changes and maintainer @svenkeidel.
That error message indicates it has missing dependencies; it is at least missing qtquickcontrols and qtgraphicaleffects. Unfortunately, Qt defers detection of dependencies until runtime whenever it can, instead of complaining during the build that these dependencies are missing.
Yeah, I've been looking into this a bit and added qtquickcontrols and qtgraphicaleffects to buildInputs. The error message is now:
$ cool-retro-term
QQmlApplicationEngine failed to load component
qrc:/main.qml:116 Type TerminalContainer unavailable
qrc:/TerminalContainer.qml:37 Type PreprocessedTerminal unavailable
qrc:/PreprocessedTerminal.qml:24 module "QMLTermWidget" is not installed
Although it's in the build inputs, it doesn't look like qmltermwidget is being added to the environment:
$ cat $(which cool-retro-term) | grep -i QMLTermWidget
returns no results.
qmltermwidget isn't installing its QML files into the correct prefix. QML stuff should go into $out/lib/qt5/imports and QML2 stuff should go into $out/lib/qml, but qmltermwidget puts everything into $out/lib/qml. Since the files are in the wrong location, they aren't picked up by makeQtWrapper.
Can we just tell makeQtWrapper that there's some QML stuff elsewhere? It's probably not the cleanest solution, but it would allow the package to work.
It would be better to fix qmltermwidget. The Nix expression specifically patches the package to set the wrong QML path; I think if you simply remove that, it would work.
I tried removing the whole block:
@@ -12,11 +12,6 @@ stdenv.mkDerivation rec {
buildInputs = [ qtbase qtquick1 ];
- patchPhase = ''
- substituteInPlace qmltermwidget.pro \
- --replace '$$[QT_INSTALL_QML]' "/lib/qml/"
- '';
-
configurePhase = "qmake PREFIX=$out";
installPhase=''make INSTALL_ROOT="$out" install'';
cool-retro-term gives the same error (qrc:/PreprocessedTerminal.qml:24 module "QMLTermWidget" is not installed), however.
Yeah, that's because there are more serious problems with how qmltermwidget is packaged.
@svenkeidel You are the maintainer of qmltermwidget, can you help us out here? I've taken a look at the package and I can't get it to respect Qt's QML import paths during installation.
Yeah, I will look into it.
Just got the same error:
QQmlApplicationEngine failed to load component
qrc:/main.qml:135 Type TerminalContainer unavailable
qrc:/TerminalContainer.qml:37 Type PreprocessedTerminal unavailable
qrc:/PreprocessedTerminal.qml:24 module "QMLTermWidget" is not installed
Cannot load QML interface
I can confirm this issue on Ubuntu. Same problem here.
installed using snap install cool-retro-term --classic
(v 1.1.1, rev126, stable)
on Ubuntu 18.04.2 LTS
QQmlApplicationEngine failed to load component
qrc:/main.qml:143 Type SettingsWindow unavailable
qrc:/SettingsWindow.qml:39 Type SettingsGeneralTab unavailable
qrc:/SettingsGeneralTab.qml:214 Type FileDialog unavailable
file:///snap/cool-retro-term/126/usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Dialogs/DefaultFileDialog.qml:47 module "Qt.labs.folderlistmodel" is not installed
file:///snap/cool-retro-term/126/usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Dialogs/DefaultFileDialog.qml:48 module "Qt.labs.settings" is not installed
file:///snap/cool-retro-term/126/usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Dialogs/DefaultFileDialog.qml:47 module "Qt.labs.folderlistmodel" is not installed
file:///snap/cool-retro-term/126/usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Dialogs/DefaultFileDialog.qml:48 module "Qt.labs.settings" is not installed
Cannot load QML interface
@DoubyCz: forgive me if I'm being dumb, but how does using snap on Ubuntu relate to NixPkgs?
Cool-retro-term simply "fails to run" due to this unresolved dependencies on many linux distributions. I just confirmed another one. I don't understand, why this issue is closed now, that problem is not fixed - especially snaps shlould be able to handle QML dependencies somehow
https://blog.ubuntu.com/2016/11/17/how-to-create-snap-packages-on-qt-applications , https://forum.snapcraft.io/t/cool-retro-term-failed-to-load-component/9920
In any case, I confirm this failure on nixpkgs master:
QQmlApplicationEngine failed to load component
qrc:/main.qml:24 module "QtGraphicalEffects" is not installed
Cannot load QML interface
I don't see any changes in nixpkgs since this ticket was closed, but cool-retro-term works on my nixos box.
In any case, I confirm this failure on nixpkgs master:
QQmlApplicationEngine failed to load component qrc:/main.qml:24 module "QtGraphicalEffects" is not installed Cannot load QML interface
QML packages rely on propagatedUserEnvPkgs so they cannot be used without being installed to a profile.
Right, I apparently didn't know that at the time (or didn't recall it).
Try this.... https://github.com/Swordfish90/cool-retro-term/issues/592
In any case, I confirm this failure on nixpkgs master:
QQmlApplicationEngine failed to load component qrc:/main.qml:24 module "QtGraphicalEffects" is not installed Cannot load QML interfaceQML packages rely on
propagatedUserEnvPkgsso they cannot be used without being installed to a profile.
I have the same problem. how to fix? user@ubuntu-64b-00:~$ cool-retro-term QQmlApplicationEngine failed to load component qrc:/main.qml:137 Type TerminalContainer unavailable qrc:/TerminalContainer.qml:23 Type PreprocessedTerminal unavailable qrc:/PreprocessedTerminal.qml:24 module "QMLTermWidget" is not installed
Cannot load QML interface jre@ubuntu-64b-00:~$