GithubHelp home page GithubHelp logo

Comments (12)

VioletGiraffe avatar VioletGiraffe commented on August 26, 2024 1

You're right, sincere apologies. I was so puzzled by the message that I was certain it's from the AppImage runtime.
And many thanks for your help!

from go-appimage.

probonopd avatar probonopd commented on August 26, 2024

Guessed qt_prfxpath to be /usr/lib/aarch64-linux-gnu/qt5

This is the issue. It is wrong (assumig you want Qt6). We need to fx it. Volunteers?

This whole guessing is not reliable. What would be a more robust way to know which Qt to use, and from where?

from go-appimage.

VioletGiraffe avatar VioletGiraffe commented on August 26, 2024

That is a good question, I navigated the Qt folders a bit and it all looks like a bunch of mess. But it does work. How do the Qt .so libraries know where to look for plugins? They're not in the same parent folders as is the case on Windows.

>  qmake -v
Using Qt version 6.4.2 in /usr/lib/aarch64-linux-gnu
> ldd bin/myapp
libQt6Gui.so.6 => /lib/aarch64-linux-gnu/libQt6Gui.so.6 (0x0000007fa97a0000)
libQt6Core.so.6 => /lib/aarch64-linux-gnu/libQt6Core.so.6 (0x0000007fa92b0000)

So the question is, as far as I understand, how to locate the plugins. They're not in /usr/lib/aarch64-linux-gnu/ but instead in /usr/lib/aarch64-linux-gnu/qt6/.

from go-appimage.

probonopd avatar probonopd commented on August 26, 2024

How do the Qt .so libraries know where to look for plugins?

The string qt_prfxpath is hardcoded in one of the Qt .so libraries. It's pretty much under-documented, though.

And sometimes, it's even outright wrong.

from go-appimage.

VioletGiraffe avatar VioletGiraffe commented on August 26, 2024

Okay, judging from the appimagetools log the string says just /usr, that's wrong as there are no plugins there. But somehow Qt works fine.

from go-appimage.

probonopd avatar probonopd commented on August 26, 2024

Black magic!

from go-appimage.

probonopd avatar probonopd commented on August 26, 2024

So the question is, as far as I understand, how to locate the plugins. They're not in /usr/lib/aarch64-linux-gnu/ but instead in /usr/lib/aarch64-linux-gnu/qt6/.

... but currently go-appimage (wrongly)

Guessed qt_prfxpath to be /usr/lib/aarch64-linux-gnu/qt5

from go-appimage.

probonopd avatar probonopd commented on August 26, 2024

All I can tell you at the moment is that the bug is somewhere in

// Special case:
// Some distributions, including Ubuntu and Alpine,
// have qt_prfxpath set to '/usr' but the files are actually in e.g., '/usr/lib/qt5'
// In this case, we should NOT patch it
if helpers.IsDirectory(qt_prfxpath+"/plugins") == false {
log.Println("Got qt_prfxpath but it does not contain 'plugins'")
results := helpers.FilesWithSuffixInDirectoryRecursive(qt_prfxpath, "libqxcb.so")
log.Println("libqxcb.so found:", results)
if len(results) > 0 {
result := results[0]
qt_prfxpath = filepath.Dir(filepath.Dir(filepath.Dir(result)))
log.Println("Guessed qt_prfxpath to be", qt_prfxpath)
quirksModePatchQtPrfxPath = true
} else {
log.Println("ERROR: Could not determine the path to Qt automatically")
log.Println("Please set $QTDIR to the path to Qt (the directory that contains plugins/, qml/, etc.)")
log.Println("and try again")
os.Exit(1)
}
}

from go-appimage.

probonopd avatar probonopd commented on August 26, 2024

In the meantime, try export QTDIR=/usr/lib/aarch64-linux-gnu/qt6/ before running linuxdeployqt. Do this on a new AppDir (one which linuxdeployqt was never run on before).

from go-appimage.

VioletGiraffe avatar VioletGiraffe commented on August 26, 2024

As for the code: you take the 1st result which happened to be qt5 (or it will always be qt5 based on alphabetical sorting), instead you should check whether it's Qt5 or 6 - you already know that Qt 6 is required.
I'm not a fan of writing even more complex fragile heuristics, but in this case seems inevitable as the current solution simply doesn't support Qt 6 .

Upd: or you can remove the guessing altogether and require QTDIR to be defined if qt_prfxpath does not contain "plugins".

from go-appimage.

VioletGiraffe avatar VioletGiraffe commented on August 26, 2024

In the meantime, try export QTDIR=/usr/lib/aarch64-linux-gnu/qt6/ before running linuxdeployqt.

That worked! The correct paths are in the log now, and the AppImage size is reduced. However, it still doesn't run:

Failed to load the image at
Press any key to exit.

Any ideas? What can I do to troubleshoot this?

from go-appimage.

probonopd avatar probonopd commented on August 26, 2024

Is that message coming from your program?

from go-appimage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.