nabla-c0d3 / nassl

Experimental OpenSSL wrapper for Python 3.8+ and SSLyze.
GNU Affero General Public License v3.0
39 stars 35 forks source link

nassl 4.0 will not install or build on M1 Mac #74

Closed gattjoe closed 3 years ago

gattjoe commented 3 years ago

Hi Alban,

Running Big Sur 11.2.1 with Python 3.9.2 and I'm not able to install or build nassl. I think the issue is that there is no wheel for M1 Macs based on the below?

  _Skipping link: none of the wheel's tags match: cp39-cp39-macosx_10_9_x86_64
  Skipping link: none of the wheel's tags match: cp39-cp39-manylinux2010_i686
  Skipping link: none of the wheel's tags match: cp39-cp39-manylinux2010_x86_64
  Skipping link: none of the wheel's tags match: cp39-cp39-win_amd64_

The full verbose output is attached if you need it. pip_verbose.txt

So I tried to build it from source, both the legacy and modern ssl fail to compile. Both give a "usage error" similar to the following:

Usage: Configure [no- ...] [enable- ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-egd] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--config=FILE] os/compiler[:flags]

In both cases, its followed up with asking me to pick a compiler (followed by a long list). I can provide more detail as necessary but troubleshooting issues like this on my end alone is over my head. Happy to help debug.

nabla-c0d3 commented 3 years ago

Hello, Are you able to install nassl in "Rosetta2 mode" (https://apple.stackexchange.com/questions/409746/run-everything-in-rosetta-2-on-silicon-mac) or did it not work either? Thanks,

gattjoe commented 3 years ago

Hi, I am unable to install in Rosetta2 model either (Neither the wheel nor the build from source).

nabla-c0d3 commented 3 years ago

Thanks - can you try the macosx-universal2 wheel from this https://github.com/nabla-c0d3/nassl/suites/2255804153/artifacts/46938284 ? Does it install/work?

gattjoe commented 3 years ago

Worked like a charm in 3.9.2 without using Rosetta2


Processing ./nassl-4.0.0-cp39-cp39-macosx_10_9_universal2.whl
Installing collected packages: nassl
  Attempting uninstall: nassl
    Found existing installation: nassl 1.0.3
    Uninstalling nassl-1.0.3:
      Successfully uninstalled nassl-1.0.3
Successfully installed nassl-4.0.0
nabla-c0d3 commented 3 years ago

Cool! I just pushed it to pypi. Can you try pip install nassl ? If it worked, did you have to use a special version of Python or is it just seamless? Thanks!

gattjoe commented 3 years ago

Hi it works like a charm now. No special version of Python, I'm using 3.9.2 from brew so it was seamless.

nabla-c0d3 commented 3 years ago

Cool! Thanks for the help