Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pyinstaller package required LD_PRELOAD to start on Linux #8707

Open
ikus060 opened this issue Apr 23, 2024 · 1 comment
Open

Pyinstaller package required LD_PRELOAD to start on Linux #8707

ikus060 opened this issue Apr 23, 2024 · 1 comment

Comments

@ikus060
Copy link
Contributor

ikus060 commented Apr 23, 2024

Software Versions

  • Python: 3.10
  • OS: Linux
  • Kivy: 2.3.0
  • Kivy installation method: pip install

Describe the bug

After packaging the application using Pyinstaller, the application required the following environment variable to get started: export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6. Otherwise, the application fail to start with this error.

Window: Provider: sdl2
MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: iris
MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: iris
MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  135
  Current serial number in output stream:  136

I'm building the binary on Debian Buster and I'm trying to run it on Ubuntu Jammy.

Expected behavior
When packaging kivy application with pyinstaller, I'm expecting the application to run without any explicit environment variable.

To Reproduce
The source code and the binaries are all available:
Source: https://gitlab.com/ikus-soft/minarca

Deb Binary: https://nexus.ikus-soft.com/service/rest/v1/search/assets/download?name=minarca-client&repository=apt-dev-bullseye&sort=version&direction=desc&version=*.?b?

Code and Logs and screenshots
N/A

Additional context
This problem seams to have been reported in the past and it kinda help me to find a workarround, but I would like to get more details about the actual issue and possibly a way to get is fixed properly, either in Kivy source code or my packaging code.

Take note, the source code is running without error or problem on Ubuntu Jammy. It's seams likely a problem with binaries dependencies or something similar.

Thanks for helping !

@ikus060
Copy link
Contributor Author

ikus060 commented Apr 24, 2024

It seams possible to fix the issue by simply not distributing the libstdc++.so.6. Is it something common to do ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant