Comments (21)
it's hard to test regressions with MWE / MRE, can you please provide one?
from nuitka.
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.
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.
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.
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.
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.
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.
Your wish is my command Kay, a 2.01 build report for the minimal example is attached:
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.
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.
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.
<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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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)
- Error after compiling with multiprocessing
- coremltools package gives fatal error on MacOS HOT 3
- SCONS-linker crashes at linking stage with error UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe5 in position 184714: invalid continuation byte HOT 3
- console pop up when my exe executes another exe (already disabled windows console mode) HOT 1
- nuitka cannot find black.cache when packaging black
- match-case statement causes segfault
- Can not compile the code with paddleOCR HOT 1
- onefile bootstrap binary build failed as it couldn't find C++ compiler HOT 4
- QtSql does not work with Nuitka on macOS HOT 5
- ImportError: cannot import name ChromeService from selenium.webdriver.chrome.service HOT 1
- What exactly is included in the binary file created after Nuitka compilation? HOT 1
- Nuitka ignores implicit dependencies of OpenCV for opencv-based programs. HOT 6
- Error using newest version of KivyMD==2.0.1.dev0 HOT 1
- "Scalability issue" - macOS Catalina 10.15.7 HOT 4
- pip module can't exe after build HOT 2
- Slow executable startup time on MacOS
- Import User-Provided Modules at Runtime
- About LicenseReport Generation HOT 6
- FileNotFoundError: Shared library with base name 'llama' not found
- KivyMD + angle_sdl2 incompatibility
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuitka.