Coder Social home page Coder Social logo

Comments (11)

probonopd avatar probonopd commented on September 24, 2024

Hello @Juuliuus thanks for checking this out. Can you please give some more information:

  • OS/distribution and version
  • Qt version
  • Where is your Qt from (distribution? PPA? Qt website?)
  • Where is your Qt plugins directory located? Looking at the above, probably /usr/lib/x86_64-linux-gnu/qt5/plugins? In this case the correct qt_prfxpath would be /usr/lib/x86_64-linux-gnu/qt5 which is mentioned in the second line above. We need to find out why it is not being used...
  • Do you have /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so? If not there, where is this file on your system?
  • What happens if you do not use -s? (Start with an empty AppDir)

from go-appimage.

probonopd avatar probonopd commented on September 24, 2024

Could it be that libqt5gui5 and/or libqt5gui5-gles are not installed on your system?

If so, please install them and then try again.

(Is this an issue for the edge cases in which Qt CLI tools are being packaged and where those packages may not be present in the system at all?)

from go-appimage.

Juuliuus avatar Juuliuus commented on September 24, 2024

Hi,

My install is a straight Kubuntu 20.04 install.

OS/distribution and version

Linux juus-M6800 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Qt version

5.12.8

Where is your Qt from (distribution? PPA? Qt website?)

Kubuntu 20.04 iso

Where is your Qt plugins directory located? Looking at the above,
probably /usr/lib/x86_64-linux-gnu/qt5/plugins?

Correct, that is where it is located.

Do you have /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so?

Yes.

~ are these installed?

libqt5gui5
synaptic shows it as installed.
locate cmd shows: /usr/share/lintian/overrides/libqt5gui5

ibqt5gui5-gles

This is not installed but when I tried through synaptic pkg man. it wanted to remove many, many important looking packages. I will defer on this for now.

searching around on internet there was mention of having qt5-gmake installed. I do not have that installed by default.

What happens if you do not use -s? (Start with an empty AppDir)

I did try several permutations of the command, all failed. I will try it again but for now must "Punt". I will not be at desk for next couple of days...will report back when I can get it done.

from go-appimage.

Juuliuus avatar Juuliuus commented on September 24, 2024

Pardon me please. I have no idea what I am doing on this site to make everything "quote indented".

from go-appimage.

probonopd avatar probonopd commented on September 24, 2024

Hi, thanks for the responses, I fixed the "quote indented" by adding a blank line after each quote.

from go-appimage.

probonopd avatar probonopd commented on September 24, 2024

Do you have /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so?

Yes.

Then we must have some nasty bug around here:

// 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, "plugins")
log.Println("results", results)
for _, result := range results {
if helpers.Exists(result + "/platforms") {
qt_prfxpath = filepath.Dir(result)
log.Println("Guessed qt_prfxpath to be", qt_prfxpath)
quirksModePatchQtPrfxPath = true
}
}
}

Can you spot it?

from go-appimage.

Juuliuus avatar Juuliuus commented on September 24, 2024

Could it be that the "plugins" also needs a preceeding / ?None of the quessed paths have an ending /, and the could not find 'plugins/platforms/...' does not have a preceeding slash...

That will depend on what is happening in FilesWithSuffixInDirectoryRecursive(qt_prfxpath, "plugins"). But I don't really see that as being the problem because other calls to that function use similar grammar and then there would be a lot of stuff failing.

One thing I don't understand and it may be of interest:
if helpers.Exists(result + "/platforms")

The "guessed at' messages are only printed if that conditional is true. But I checked here for several "guessed at"'s and only ../qt5 has a plugins folder that contains a platforms folder. So that's odd.

It did seem to me that other calls to FilesWithSuffixInDirectoryRecursive in that code are usually searching for files, not folders, but again since .../qt5 was successfully "guessed at" that probably isn't it either.

The FilesWithSuffixInDirectoryRecursive(qt_prfxpath, "plugins") function, it turns out, is looking for anything containing 'plugins' in its name because all of those other successes do not have a straight "plugin" file or "plugin" folder, more things like, for example:
/usr/lib/x86_64-linux-gnu/kconf_update_bin/krunnerplugins

But the condition "if helpers.Exists(result + "/platforms")" shouldn't be successful at all in most of these cases! Because most, like I said are files and therefore won't have "/platforms" folders appended on them. For instance, there is no:
/usr/lib/x86_64-linux-gnu/kconf_update_bin/krunnerplugins/platforms

So that conditional is failing somehow? There should really only be one success (.../qt5) and yet it guesses at 7 different paths.

Further, when the conditional is true I don't see it breaking out of the conditional loop? From what I see it will go through the entire range of results and returning the last "..plugins.. it found?

That's all I see. HTH.

from go-appimage.

probonopd avatar probonopd commented on September 24, 2024

Indeed something strange is going on. Thanks for your analysis.
I hope I will find some time to look at this soon.

from go-appimage.

probonopd avatar probonopd commented on September 24, 2024

Can you post the output of

log.Println("results", results)

on your system?

from go-appimage.

probonopd avatar probonopd commented on September 24, 2024

I think this is fixed now @Juuliuus - please check using the latest build (start with a "fresh" AppDir)

I tested it on Kubuntu like this:

rm -rf appdir || true # Clean up
mkdir -p appdir/usr/bin
mkdir -p appdir/usr/share/applications
mkdir -p appdir/usr/share/icons
cp /usr/bin/kcalc appdir/usr/bin/
cp /usr/share/applications/org.kde.kcalc.desktop appdir/usr/share/applications/
mkdir -p appdir/usr/share/icons/hicolor/scalable/applications
cp /usr/share/icons/Humanity/apps/48/kcalc.svg appdir/usr/share/icons/hicolor/scalable/applications/
Downloads/appimagetool-492-x86_64.AppImage -s deploy appdir/usr/share/applications/org.kde.kcalc.desktop 

Log now says:

2020/07/30 16:58:21 Detected Qt 5
2020/07/30 16:58:21 Offset of qt_prfxpath: 3561388
2020/07/30 16:58:21 Length of value of qt_prfxpath: 4
2020/07/30 16:58:21 qt_prfxpath: /usr
2020/07/30 16:58:21 Got qt_prfxpath but it does not contain 'plugins'
2020/07/30 16:58:23 libqxcb.so found: [/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so]
2020/07/30 16:58:23 Guessed qt_prfxpath to be /usr/lib/x86_64-linux-gnu/qt5

from go-appimage.

Juuliuus avatar Juuliuus commented on September 24, 2024

Super! Unfortunately, my main computer chose this time to die. So stress. I will go to an older computer and give it a go in the next days.

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.