Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARM64 ssl module in Python is not available (from PIP) #796

Closed
peardox opened this issue Oct 3, 2019 · 8 comments
Closed

ARM64 ssl module in Python is not available (from PIP) #796

peardox opened this issue Oct 3, 2019 · 8 comments

Comments

@peardox
Copy link

peardox commented Oct 3, 2019

This happens on my Nano )prob affects other platforms as well) when in gets to Numpy. Seen this before so had a clue as to the answer.

The previous step in to build CPython which will happily build with or without SSL/TLS but if you build without SSL/TLS the Numpy fails...

On Ubuntu you get the deps with...
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev

Dunno if they're all required (StackOverflow answer)

Prob a good idea to stick a check in for SSL dev libs while building CPython

@saudet
Copy link
Member

saudet commented Oct 4, 2019

I'm pretty sure it gets enabled properly, for example, see this build log:

checking for aarch64-linux-gnu-pkg-config... /usr/bin/aarch64-linux-gnu-pkg-config
checking whether compiling and linking against OpenSSL works... yes
checking for X509_VERIFY_PARAM_set1_host in libssl... yes
checking for --with-ssl-default-suites... python

https://api.travis-ci.org/v3/job/592363041/log.txt

What error messages are you getting?

@peardox
Copy link
Author

peardox commented Oct 4, 2019

I'll reverse the solution when I get a chance to repeat the error + send you the output

Kindly bear with me - I wanna do a clean build later / tomorrow

@peardox
Copy link
Author

peardox commented Oct 5, 2019

OK - one extremely long build log attached if you wanna examine it

I removed libssl-dev before starting this run

The highlight is @ line 31391... Part of the CPython build

Could not build the ssl module!
Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_PARAM_set1_host().
LibreSSL 2.6.4 and earlier do not provide the necessary APIs, libressl/portable#381

A lot above this @ 13665 it actually build a static libssl as bart of FFMpeg :)

Things then continue to the 45000 area where Python gets upset that it ain't got SSL

From here on in adding libssl-dev back in and restarting :cpython runs thru this lot again until #797 where tesseract gets upset at -ljbig

build.01.zip

@saudet
Copy link
Member

saudet commented Oct 5, 2019 via email

@saudet
Copy link
Member

saudet commented Oct 6, 2019

If I understand correctly, this is only a documentation issue, right?
We would need to update the wiki page about that actually:
https://github.com/bytedeco/javacpp-presets/wiki/Build-Environments
Based on the scripts here doing cross compilation:
https://github.com/bytedeco/javacpp-presets/blob/master/ci/install-arm.sh
https://github.com/bytedeco/javacpp-presets/blob/master/ci/install-ppc.sh

@peardox
Copy link
Author

peardox commented Oct 6, 2019

The point I'm making about missing libssl-dev is that the cause of the error isn't obvious - far from it.

The error is reported when building Numpy but the cause of the error is the CPython build missing libssl-dev

I've got Python + PIP installed and they've got SSL support, this is what threw me at first as it's not using the system Python / PIP but one it installs itself which will not have SSL support without libssl-dev. When building CPython a check should be made for libssl-dev and die if missing.

I never do / have never done cross compilation - that's why I suggested getting someone to let the project have a PPC cloud box (someone says yes eventually). Same goes for Power8/9 and upcoming ARM servers.

I'll get around to looking into Travis-CI sometime soon

@saudet
Copy link
Member

saudet commented Oct 24, 2019

BTW, it looks like Travis CI just got support for ARM:
https://blog.travis-ci.com/2019-10-07-multi-cpu-architecture-support
Now awaiting support for POWER next :)

@saudet
Copy link
Member

saudet commented Nov 23, 2019

OpenSSL now gets built as part of the build for CPython as well, so it should take care of this issue.
Let me know if the build still fails on your end for some reason though. Thanks for reporting this issue!

@saudet saudet closed this as completed Nov 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants