YosysHQ / oss-cad-suite-build

Multi-platform nightly builds of open source digital design and verification tools
ISC License
774 stars 70 forks source link

Windows Python3 SSL Library Fix #25

Closed benstobbs closed 2 years ago

benstobbs commented 2 years ago

Fix for issue #23 - Python3 for Windows does not package SSL library properly

The ssl python library (which is a wrapper for the _ssl library) uses the libcrypto-1_1-x64.dll and libssl-1_1-x64.dll DLLs. These DLLs are located in lib/, where Python can't find them:

  File "D:\a\github-actions-scratch\github-actions-scratch\oss-cad-suite\lib\python3.8\ssl.py", line 98, in <module>
    import _ssl             # if we can't import it, let the error propagate
ImportError: DLL load failed while importing _ssl: The specified procedure could not be found.

This fix copies them into lib/python3.8/lib-dynload/ where they are in python path and can be found.

I would guess that this has not previously caused issues due to the DLLs being found elsewhere in the user's system. However this cannot be relied upon, and notably breaks in Windows Github Actions runners.

mmicko commented 2 years ago

Hmm, this change code should not work, since when building system-resources.sh build system does not see python3 related DLLs. So copy should be in python3 build script (if it is building windows-x64 only) or in package script for windows. Anyway this points out that for some reason python is not using search path for DLL on that machine, so problem could be on other place.

benstobbs commented 2 years ago

Thanks, @mmicko. I'll close this for now and have a look at your suggestions as and when I have time.