Error
Quite new to this world, getting this error when a run it with --plugin qt
[qt/stdout]
[qt/stdout] Found Qt modules:
[qt/stdout] Extra Qt modules:
[qt/stdout] ERROR: Could not find Qt modules to deploy
ERROR: Failed to run plugin: qt (exit code: 1)
and when i run without --plugin qt i get Could not find desktop file in AppDir, cannot create links for AppRun, desktop file and icon in AppDir root
but my desktop file is inside the folder
Does your app even use Qt?
yes
Please provide a complete log.
linuxdeploy version 1-alpha (git commit ID 6cfa741),
-- Creating basic AppDir structure -- Creating directory /home/machine/projects/build-AppTestCom-Desktop_Qt_5_13_1_GCC_64bit-Debug/usr/bin/ Creating directory /home/machine/projects/build-AppTestCom-Desktop_Qt_5_13_1_GCC_64bit-Debug/usr/lib/ Creating directory /home/machine/projects/build-AppTestCom-Desktop_Qt_5_13_1_GCC_64bit-Debug/usr/share/applications/ Creating directory /home/machine/projects/build-AppTestCom-Desktop_Qt_5_13_1_GCC_64bit-Debug/usr/share/icons/hicolor/ Creating directory /home/machine/projects/build-AppTestCom-Desktop_Qt_5_13_1_GCC_64bit-Debug/usr/share/icons/hicolor/16x16/apps/ Creating directory /home/machine/projects/build-AppTestCom-Desktop_Qt_5_13_1_GCC_64bit-Debug/usr/share/icons/hicolor/32x32/apps/ Creating directory /home/machine/projects/build-AppTestCom-Desktop_Qt_5_13_1_GCC_64bit-Debug/usr/share/icons/hicolor/64x64/apps/ Creating directory /home/machine/projects/build-AppTestCom-Desktop_Qt_5_13_1_GCC_64bit-Debug/usr/share/icons/hicolor/128x128/apps/ Creating directory /home/machine/projects/build-AppTestCom-Desktop_Qt_5_13_1_GCC_64bit-Debug/usr/share/icons/hicolor/256x256/apps/ Creating directory /home/machine/projects/build-AppTestCom-Desktop_Qt_5_13_1_GCC_64bit-Debug/usr/share/icons/hicolor/scalable/apps/
-- Deploying dependencies for existing files in AppDir --
-- Copying files into AppDir --
-- Running input plugin: qt --
Running process: /home/machine/Downloads/linuxdeploy-plugin-qt-x86_64.AppImage --appdir /home/machine/projects/build-AppTestCom-Desktop_Qt_5_13_1_GCC_64bit-Debug/
[qt/stdout]
[qt/stdout] Found Qt modules:
[qt/stdout] Extra Qt modules:
[qt/stdout] ERROR: Could not find Qt modules to deploy
ERROR: Failed to run plugin: qt (exit code: 1)
i just notice "linuxdeploy version 1-alpha", am i using correct version?
You don't have a single binary file in your AppDir. linuxdeploy cannot deploy anything if there's no binaries in there. Did you forget to copy your stuff into the AppDir, e.g., by using make install DESTDIR=.../AppDir, the -e/-l switches, or even just manually copying binaries?
Please read https://docs.appimage.org/packaging-guide/from-source/native-binaries.html.
Sorry to open an old thread, but I have the same issue as @jlonneux. But I am certain that the binary is in the nominated AppDir.
I include the last bits of the log. There are loads of "Doesn't match plugin regex" and "Searching for plugins in directory [x]" messages ahead of these. If they are important then please let me know and I will edit this post.
export QMAKE=/home/mawnlower/Qt/6.3.0/gcc_64/bin/qmake
export DEBUG=1
/linuxdeploy-x86_64.AppImage --appdir /home/mawnlower/git/build-lynx-Desktop_Qt_6_3_0_GCC_64bit-Release/out/lynx/bin/LYNX.AppDir --plugin qt -v0
-- Creating basic AppDir structure --
Creating directory /home/mawnlower/git/build-lynx-Desktop_Qt_6_3_0_GCC_64bit-Release/out/lynx/bin/LYNX.AppDir/usr/bin/
Creating directory /home/mawnlower/git/build-lynx-Desktop_Qt_6_3_0_GCC_64bit-Release/out/lynx/bin/LYNX.AppDir/usr/lib/
Creating directory /home/mawnlower/git/build-lynx-Desktop_Qt_6_3_0_GCC_64bit-Release/out/lynx/bin/LYNX.AppDir/usr/share/applications/
Creating directory /home/mawnlower/git/build-lynx-Desktop_Qt_6_3_0_GCC_64bit-Release/out/lynx/bin/LYNX.AppDir/usr/share/icons/hicolor/
Creating directory /home/mawnlower/git/build-lynx-Desktop_Qt_6_3_0_GCC_64bit-Release/out/lynx/bin/LYNX.AppDir/usr/share/icons/hicolor/16x16/apps/
Creating directory /home/mawnlower/git/build-lynx-Desktop_Qt_6_3_0_GCC_64bit-Release/out/lynx/bin/LYNX.AppDir/usr/share/icons/hicolor/32x32/apps/
Creating directory /home/mawnlower/git/build-lynx-Desktop_Qt_6_3_0_GCC_64bit-Release/out/lynx/bin/LYNX.AppDir/usr/share/icons/hicolor/64x64/apps/
Creating directory /home/mawnlower/git/build-lynx-Desktop_Qt_6_3_0_GCC_64bit-Release/out/lynx/bin/LYNX.AppDir/usr/share/icons/hicolor/128x128/apps/
Creating directory /home/mawnlower/git/build-lynx-Desktop_Qt_6_3_0_GCC_64bit-Release/out/lynx/bin/LYNX.AppDir/usr/share/icons/hicolor/256x256/apps/
Creating directory /home/mawnlower/git/build-lynx-Desktop_Qt_6_3_0_GCC_64bit-Release/out/lynx/bin/LYNX.AppDir/usr/share/icons/hicolor/scalable/apps/
-- Deploying dependencies for existing files in AppDir --
-- Copying files into AppDir --
DEBUG: Using strip: /tmp/.mount_linuxdauVUcP/usr/bin/strip
-- Running input plugin: qt --
[qt/stdout] Using user specified qmake: /home/mawnlower/Qt/6.3.0/gcc_64/bin/qmake
[qt/stdout] Using qmake: /home/mawnlower/Qt/6.3.0/gcc_64/bin/qmake
[qt/stdout]
[qt/stdout] Using Qt version: 6.3.0 ( 6 )
[qt/stdout] DEBUG: Using dpkg-query to search for copyright files
[qt/stdout] DEBUG: Libraries to consider:
[qt/stdout] Found Qt modules:
[qt/stdout] Extra Qt modules:
[qt/stdout] ERROR: Could not find Qt modules to deploy
ERROR: Failed to run plugin: qt (exit code: 1)
Proof that the binary exists
mawnlower@mawnlower-home:~/bin$ ls -l /home/mawnlower/git/build-lynx-Desktop_Qt_6_3_0_GCC_64bit-Release/out/lynx/bin/LYNX.AppDir
total 63676
-rw-r--r-- 1 mawnlower mawnlower 141 May 10 16:26 app.desktop
-rw-r--r-- 1 mawnlower mawnlower 16573 May 11 16:59 app-icon.png
drwxrwxr-x 3 mawnlower mawnlower 4096 May 10 10:29 lib
-rwxrwxr-x 1 mawnlower mawnlower 65159248 May 10 10:23 Lynx [<<<<THIS]
drwxrwxr-x 3 mawnlower mawnlower 4096 May 10 10:28 plugins
drwxrwxr-x 5 mawnlower mawnlower 4096 May 11 18:46 usr
And also:
mawnlower@mawnlower-home:~/bin$ ldd /home/mawnlower/git/build-lynx-Desktop_Qt_6_3_0_GCC_64bit-Release/out/lynx/bin/LYNX.AppDir/Lynx
linux-vdso.so.1 (0x00007ffc141ab000)
liblynxlib.so => /home/mawnlower/git/build-lynx-Desktop_Qt_6_3_0_GCC_64bit-Release/out/lynxlib/bin/liblynxlib.so (0x00007f5ac6831000)
libQt6Qml.so.6 => /home/mawnlower/Qt/6.3.0/gcc_64/lib/libQt6Qml.so.6 (0x00007f5ac62f1000)
libQt6Core.so.6 => /home/mawnlower/Qt/6.3.0/gcc_64/lib/libQt6Core.so.6 (0x00007f5ac5c96000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f5ac5a92000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f5ac5a75000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5ac5883000)
libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f5ac5746000)
[trimmed]
Perhaps I misunderstand the cause for @jlonneux's issue and I have the same? In which case perhaps a little more detail could help me along. Or could there be other causes for the same error output?
Any help is much appreciated.
I had a look at the code, and there is something I am not fully understanding.
When we hit line 131 in src/main.cpp then don't we end up looking for files in AppDir/usr/lib and below?
Those directories don't even exist at the end of my build and it is my understanding that linuxdeploy creates these.
My application's binaries certainly aren't written there, nor would I expect them to be moved there.
Using an FHS-like structure within the AppDir (i.e., binaries in usr/bin, libs in usr/lib etc.) is a best practice and is used by linuxdeploy. See the AppDir docs and the linuxdeploy user guide.
A vast majority of build systems supports such a structure natively, most notably CMake, most classic Makefiles, autotools, meson, qmake, in their make install (or equivalent).
For convenience, linuxdeploy creates these on its first run. linuxdeploy features a manual packaging approach, where one uses linuxdeploy to initialize the AppDir, has it copy executables and libs into place or copies them manually, and finally uses it to deploy the dependencies.
Using an FHS-like tree eases deployment and also makes sense from a user perspective.
But why usr/lib?
Why must I put the binary there?
I would expect usr/bin, but if I put it there then nothing happens.
https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
Unless you have run linuxdeploy on your AppImage before, there are no Qt libraries which could be picked up by this plugin. As documented in the README. the plugin just looks for already-deployed Qt libraries. You need to run linuxdeploy again after putting your binaries into the structure.