Which to choose: Crash or Build failure?

Hi all,
This is on Debian buster (stable).

If I set Slicer_USE_PYTHONQT_WITH_OPENSSL=ON, Slicer builds, but it crashes due to the popular OpenSSL version mismatch issue.

If I set Slicer_USE_PYTHONQT_WITH_OPENSSL=OFF, Slicer build fails with the following:

[ 19%] Performing install step for 'python-setuptools'
CMake Error at /PHShome/gcs6/build/slicer-4/Slicer-build/python-setuptools-prefix/src/python-setuptools-stamp/python-setuptools-install-Debug.cmake:16 (message):
  Command failed: 1

   '/PHShome/gcs6/build/slicer-4/Slicer-build/python-install/bin/PythonSlicer' '-m' 'pip' 'install' '--require-hashes' '-r' '/PHShome/gcs6/build/slicer-4/Slicer-build/python-setuptools-requirements.txt'

More information here:

$ cat /PHShome/gcs6/build/slicer-4/Slicer-build/python-setuptools-prefix/src/python-setuptools-stamp/python-setuptools-install-*.log
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/setuptools/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/setuptools/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/setuptools/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/setuptools/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/setuptools/
  Could not find a version that satisfies the requirement setuptools==46.0.0 (from -r /PHShome/gcs6/build/slicer-4/Slicer-build/python-setuptools-requirements.txt (line 1)) (from versions: )
No matching distribution found for setuptools==46.0.0 (from -r /PHShome/gcs6/build/slicer-4/Slicer-build/python-setuptools-requirements.txt (line 1))
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting setuptools==46.0.0 (from -r /PHShome/gcs6/build/slicer-4/Slicer-build/python-setuptools-requirements.txt (line 1))
  Could not fetch URL https://pypi.org/simple/setuptools/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/setuptools/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping

Any thoughts on solving either problem?

This looks quite similar to what another user described in Failed in building 3D Slicer on win10 with vs2015x64. Is there anything on that thread you might be able try? In that case I think the OpenSSL version from an Anaconda install was a problem.

Thank you James, it is an interesting thread. I’m not sure, however, what to make from it. It seems that I would have to uninstall OpenSSL, which hundreds of programs depend on.

If I could just tell Slicer to use my OpenSSL instead of its own, I guess the problem would go away.

The other choice could be to build the necessary Qt dependencies against the Slicer-provided OpenSSL. Is there an easy way to do this?

I haven’t yet looked into using a system OpenSSL instead of the one Slicer uses by default (https://github.com/Slicer/Slicer-OpenSSL).

I do think Slicer is long over due to using the latest OpenSSL 1.1.1 version since older releases are not supported anymore. This would probably at least avoid incompatibilities. Qt 5.12.4 I know was the first release on that line to support OpenSSL 1.1.1

Indeed. Debian stable is on 1.1.1.

@gcsharp You can try and follow these instructions