Fixes for compiling bootloader on Solaris 10 systems
Hi,
This is my first contribution so apologies if something is not quite right!
The changes included in this commit make PyInstaller work on Solaris 10 machines (SPARC and Intel). The reason for these changes are that bootloaders built on recent versions of Solaris (11.4) are brittle due to the changes between the release version and subsequent patches provided by Oracle. In my travels a build generated on a fully updated 11.4 system would not work on an un-updated 11.4 system or Solaris 10. Thus I tried building on Solaris 10 (u11 specifically) with the changes included which is forward compatible.
A brief description of the changes is as follows:
- dylib.py - exclude libsocket.so as this is specific to the Solaris installation and causes symbol errors otherwise
- _shared_with_waf.py - add identifier for SPARC vs Intel as bootloaders built on one do not work on the other
- wscript - test for wcsdup (see below)
- pyi_pyconfig.c - add definition for wcsdup which is not available on Solaris 10u11
Additionally, in order to get my code working on Solaris I had to override pyi_rth_multiprocessing.py with a blank file via the hooks mechanism in order to stop it from trying to load forkserver logic. I haven't included this as I'm not sure of the ramifications but I'm including it here for anyone else that runs across the issue.
Also, on the off chance it's required, I can provide 32-bit & 64-bit bootloaders for Solaris SPARC/Intel. Let me know if this is required and I'll build them and commit them.
Also, on the off chance it's required, I can provide 32-bit & 64-bit bootloaders for Solaris SPARC/Intel. Let me know if this is required and I'll build them and commit them.
Even if we could accept binaries from strangers on the internet, they'd be invalidated as soon as someone next touches the C code.
Also, on the off chance it's required, I can provide 32-bit & 64-bit bootloaders for Solaris SPARC/Intel. Let me know if this is required and I'll build them and commit them.
Even if we could accept binaries from strangers on the internet, they'd be invalidated as soon as someone next touches the C code.
No problem, I thought it was worth asking as bootloaders are included for Windows/Linux. It is a massive pain for Solaris as you need to pick one box to build on then copy over the bootloaders from either a SPARC box or an Intel box, build the wheel then publish (which is what we're doing internally, to Sonatype Nexus which the rest of our systems then reference). If we can contribute in any way we'd be happy to.
Additionally, in order to get my code working on Solaris I had to override pyi_rth_multiprocessing.py with a blank file via the hooks mechanism in order to stop it from trying to load forkserver logic. I haven't included this as I'm not sure of the ramifications but I'm including it here for anyone else that runs across the issue.
What happens if the hook is ran? (Also, with what python version and on what Solaris version - 10 or 11?).
Does your code use multiprocessing? I imagine not catching worker subprocesses would lead to issues as well - unless you are using fork start method...
Additionally, in order to get my code working on Solaris I had to override pyi_rth_multiprocessing.py with a blank file via the hooks mechanism in order to stop it from trying to load forkserver logic. I haven't included this as I'm not sure of the ramifications but I'm including it here for anyone else that runs across the issue.
What happens if the hook is ran? (Also, with what python version and on what Solaris version - 10 or 11?).
Does your code use
multiprocessing? I imagine not catching worker subprocesses would lead to issues as well - unless you are usingforkstart method...
It fails to start with this error:
Traceback (most recent call last):
File "PyInstaller/hooks/rthooks/pyi_rth_multiprocessing.py", line 107, in
This is being built with Python 3.8.5 on Solaris 10u11. I didn't have to do this change when building on Solaris 11 but then I had the original issue where it wasn't backwards compatible due to some breaking changes Oracle have introduced between SRU versions.
File "PyInstaller/hooks/rthooks/pyi_rth_multiprocessing.py", line 95, in _pyi_rthook
Hmmm, what version of PyInstaller was that?
Contemporary versions of pyi_rth_multiprocessing.py have only 55 lines.
But the version found in 6.9.0 and earlier did indeed import multiprocessing.popen_forkserver, which seems to be unsupported on Solaris.
File "PyInstaller/hooks/rthooks/pyi_rth_multiprocessing.py", line 95, in _pyi_rthookHmmm, what version of PyInstaller was that?
Contemporary versions of
pyi_rth_multiprocessing.pyhave only 55 lines.But the version found in 6.9.0 and earlier did indeed import
multiprocessing.popen_forkserver, which seems to be unsupported on Solaris.
I'm using Pyinstaller 6.6.0. I can try upping the version but that's the one that pip pulled down when I asked for pyinstaller...
Thank you!