pyinstaller / pyinstaller/pyinstaller
libc libraries get included in the bundle
A pull request for this has already been merged.
- #6998 by @EfremBraun — merged
- Dominant language
- Python
- Stars
- 13.1k
- Forks
- 2k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 11
Description
Description of the issue
libstdc++ and other libc libraries get included in the bundle I make using pyinstaller, despite https://pyinstaller.org/en/stable/usage.html#making-gnu-linux-apps-forward-compatible stating that it will not. When I build my package on Fedora 35 and then try to run it on Fedora 36, this results in the error:
libGL error: MESA-LOADER: failed to open swrast: /home/efremdan1/Documents/MyPackage/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /usr/lib64/dri/swrast_dri.so) (search paths /usr/lib64/dri, suffix _dri)
libGL error: failed to load driver: swrast
If I simply remove the libstdc++ file from the bundle, the bundle runs without any error since it uses what's found on the user's computer.
This is actually quite an old issue. In the helpful files https://github.com/mherrmann/fbs/blob/master/fbs/freeze/linux.py, https://github.com/mherrmann/fbs/blob/master/fbs/freeze/ubuntu.py, and https://github.com/mherrmann/fbs/blob/master/fbs/freeze/fedora.py, it was recommended to remedy this issue by simply removing these unnecessary files. However, I feel like this is something that should be done by pyinstaller itself, especially given the information in the pyinstaller docs.
Context information (for bug reports)
- Output of
pyinstaller --version: 5.2 - Version of Python: 3.9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with PyInstaller's forward-compatibility documentation and compare its guidance with fbs/freeze/linux.py, fbs/freeze/ubuntu.py, and fbs/freeze/fedora.py. Review linked pull request #6998 for the work already attempted, then verify that a Fedora-built bundle does not ship incompatible libc libraries and runs on the target Fedora version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100