Git Product home page Git Product logo

Comments (21)

KRRT7 avatar KRRT7 commented on September 26, 2024

it's hard to test regressions with MWE / MRE, can you please provide one?

from nuitka.

David-Worboys avatar David-Worboys commented on September 26, 2024

The attached build_report files might be the most useful in determining the regression cause - I am still studying them.

update:
I will try and get an MRE working but given this is Pyside6 it might not be so minimal

from nuitka.

kayhayen avatar kayhayen commented on September 26, 2024

There were regressions long fixed with later 1.9 hotfix releases, and 2.0 is the current release, so this is probably just not following what the template was asking for.

from nuitka.

David-Worboys avatar David-Worboys commented on September 26, 2024

Ok, Included a minimal example in my original post - I can get this problem on all versions of Nuitka from 1.9 to latest 2.01. I would expect this minimal example to work on any clean Linux install but it certainly does not on Mx

from nuitka.

David-Worboys avatar David-Worboys commented on September 26, 2024

And the results from a 2.01 with my minimal example on a clean Mx install is the same as with 1.9. Nuitka 1.86 works

./ana_clock_2_01
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: vkkhrdisplay, wayland, eglfs, minimal, offscreen, xcb, minimalegl, wayland-egl, vnc, linuxfb

from nuitka.

David-Worboys avatar David-Worboys commented on September 26, 2024

Kay I think this is a live issue as it occurs in Nuitak 2;01 and should be re-opened. A MRE is now included

from nuitka.

kayhayen avatar kayhayen commented on September 26, 2024

qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.

So this will be a DLL issue purely, your code is probably irrelevant, since you got a kind of hello Qt world issue going on. I am assuming that e.g. tests/standalone/PySide6Using.py is not going to work for you either. A report from 2.0.x would be great, since it's going to include details which PySide6 installation method you are attempting to distribute, and an improved picture on DLLs.

As of 1.9 the Linux standalone got a lot better by not including system DLLs as much. Your inability to run it though, seems to imply that those DLls may either have to be installed for Qt programs to work, or were failed to include.

from nuitka.

David-Worboys avatar David-Worboys commented on September 26, 2024

Your wish is my command Kay, a 2.01 build report for the minimal example is attached:

build_report.xml.txt

I was kind of wondering if this was related to anti-bloat as I noted in my original post that the Nuikta 1.9 build is missing 149 files compared with Nuitaka 1.86. 2.01 is kind of similar. Given the fact my compiles were clean and good until Nuitka 1.9 it does seem like some essential files for Qt are missing in action .

from nuitka.

kayhayen avatar kayhayen commented on September 26, 2024

The portability of builds on Linux is limited, which is described in the user manual. Same machine ought to work. I understand you are having issues with same machine.

from nuitka.

kayhayen avatar kayhayen commented on September 26, 2024

Your report doesn't contain any references to any DLL names "cursor", so if the expectation of Qt as expressed need to be met, then we need to find out where it should come from.

from nuitka.

kayhayen avatar kayhayen commented on September 26, 2024
  <distributions>
    <distribution name="PySide6" version="6.6.1" installer="pip" />
    <distribution name="PySide6-Addons" version="6.6.1" installer="pip" />
    <distribution name="PySide6-Essentials" version="6.6.1" installer="pip" />
    <distribution name="shiboken6" version="6.6.1" installer="pip" />
  </distributions>

So indeed, pip installed, and not Debian installed, that ought to be pretty portable by itself.

from nuitka.

David-Worboys avatar David-Worboys commented on September 26, 2024

I can confirm, comparing 1.86 and 1.9 that the cursor files are missing in 1.9 and - therefore - likely missing in 2.01

From my missing file list:
/home/david/PycharmProjects/dvdarch/pycode/1_9_Missing/libXcursor.so.1
/home/david/PycharmProjects/dvdarch/pycode/1_9_Missing/libwayland-cursor.so.0
/home/david/PycharmProjects/dvdarch/pycode/1_9_Missing/libxcb-cursor.so.0

Maybe they should be sourced from /usr/lib

from nuitka.

kayhayen avatar kayhayen commented on September 26, 2024

So, Qt programs can only run if a few OS dependencies are installed. X11 or wayland seem to be among them. Nuitka no longer includes OS dependencies like these ones, the reason is simply that they conflict easily with other OS parts from the native system. I seem to remember the list of things required for PySide6 to be able to run is listed on their site somewhere, but I didn't immediately find it.

This was previously discussed in other issues, and other solutions were attempted, like making this optional.

-  Linux: Standalone builds with PyPI packages no longer include system
   DLLs unless a new Yaml configuration for DLLs called
   ``package-system-dlls`` is configured, which will be necessary for
   GTK bindings probably. With this the included DLLs will more often be
   only ones suitable for use on other OSes. This should make Linux
   standalone somewhat easier, but still need to compile on old OS.

You would have to add for PySide6 and/or shiboken6 these settings, if you you desire to do it. Currently GTK is not done like that yet, so there is no example yet, and the docs are also not updated.

For PyPI packages however, this is not the default. If you used Ubuntu PySide6, it will gladly create a dist folder that will work with that specific OS version of Ubuntu, if that is what you want. These are not too portable. Your OS libraries however are no more portable than that. With GTK there is an exception needed, because they do not contain anything GTK at all unless you provide it youself, so it has to be bad. Luckily for Qt bindings, we have a better situation.

One previous issue linked the list of requirements, but I am not looking it up now.

from nuitka.

kayhayen avatar kayhayen commented on September 26, 2024

At this point, it's mainly a documentation issue to add these things. I will probably do it once I deal with the other issues that occured with using system libraries, that are probably lingering or closed already, not sure now.

from nuitka.

David-Worboys avatar David-Worboys commented on September 26, 2024

Thank you the update Key. and providing the details of your investigation.

I will try and get 2.01 working after my next release and let you know if I do.

As an aside, I aim to have my Linux builds work out of the box on the Distrowatch top 3 and Unbuntu . Hopefully they work on more than that!

from nuitka.

David-Worboys avatar David-Worboys commented on September 26, 2024

Just in case it helps anyone,

Adding these 3 files manually gets my python (3.11.7) Qt (6.6.3) app compiled with Nutika 2.05 working on a minimal Mx Linux install:

libwayland-cursor.so.0
libxcb-cursor.so.0
libXcursor.so.1

I put them in a folder called add_lib and added them via this line in my compile script

--include-data-files=/home/david/PycharmProjects/dvdarch/pycode/add_lib/.=./ \

from nuitka.

kayhayen avatar kayhayen commented on September 26, 2024

The OS would have to bring these files, it's not for applications to include them though @David-Worboys so it's a bit of an extreme case, esp. as these DLLs can easily conflict with the system DLLs they need. You are on your own there indeed.

from nuitka.

David-Worboys avatar David-Worboys commented on September 26, 2024

I guess I am not on my own as Nuitka prior to 1.9 copied these files into the build. In fact the versions I am using came from a Nuitka 1.86 (IIRC) build just in case you did patchelf magic! Given they are unpacked into the app tmp folder when the app starts and deleted when the app closes there is little to no risk these files will bother anything else.

from nuitka.

kayhayen avatar kayhayen commented on September 26, 2024

Yes, you can use the version with the old behaviour for as long as you want, or you can make yaml configuration that will make the new one do it. I am considering it a grave bug to include these DLLs into a distribution that is intended to run on different OSes, esp. ones with these DLLs available.

from nuitka.

David-Worboys avatar David-Worboys commented on September 26, 2024

I agree with you Kay, it got me over the hump but it is not the long term solution as libraries that use the cursor so files might change their API and cause a crash. I will look at the yaml configuration and see if I can make it work with that.

I notice on web searches more than a few Qt users have met these problem e.g https://forum.qt.io/topic/145196/could-not-load-the-qt-platform-plugin-xcb-in-even-though-it-was-found/6

from nuitka.

kayhayen avatar kayhayen commented on September 26, 2024

Well, yes, Qt has requirements for systems supported, and Nuitka's task cannot be to fulfil them, although it may have appeared to work in the past.

from nuitka.

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.