nixpkgs icon indicating copy to clipboard operation
nixpkgs copied to clipboard

Cool-retro-term fails to run

Open kragniz opened this issue 10 years ago • 20 comments

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)

kragniz avatar Dec 29 '15 22:12 kragniz

Confirmed, already on 15.09 and persist on current master. /cc @ttuegel for latest changes and maintainer @svenkeidel.

vcunat avatar Dec 30 '15 06:12 vcunat

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.

ttuegel avatar Dec 30 '15 15:12 ttuegel

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

kragniz avatar Dec 30 '15 15:12 kragniz

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.

kragniz avatar Dec 30 '15 15:12 kragniz

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.

ttuegel avatar Dec 30 '15 16:12 ttuegel

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.

kragniz avatar Dec 30 '15 16:12 kragniz

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.

ttuegel avatar Dec 30 '15 16:12 ttuegel

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.

kragniz avatar Dec 30 '15 17:12 kragniz

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.

ttuegel avatar Dec 30 '15 17:12 ttuegel

Yeah, I will look into it.

svenkeidel avatar Dec 31 '15 12:12 svenkeidel

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

ivanovsaleksejs avatar May 27 '18 15:05 ivanovsaleksejs

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 avatar Feb 21 '19 07:02 DoubyCz

@DoubyCz: forgive me if I'm being dumb, but how does using snap on Ubuntu relate to NixPkgs?

vcunat avatar Feb 21 '19 07:02 vcunat

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

DoubyCz avatar Feb 21 '19 07:02 DoubyCz

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

vcunat avatar Feb 21 '19 07:02 vcunat

I don't see any changes in nixpkgs since this ticket was closed, but cool-retro-term works on my nixos box.

jcumming avatar Jun 11 '19 17:06 jcumming

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.

jtojnar avatar Jun 12 '19 11:06 jtojnar

Right, I apparently didn't know that at the time (or didn't recall it).

vcunat avatar Jun 12 '19 14:06 vcunat

Try this.... https://github.com/Swordfish90/cool-retro-term/issues/592

Jackfritt avatar Oct 29 '20 08:10 Jackfritt

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.

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:~$

n8cn avatar May 01 '21 13:05 n8cn