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

emsdk install failing #6275

Closed
Krelborn opened this Issue Feb 24, 2018 · 48 comments

Comments

Projects
None yet
@Krelborn
Copy link

Krelborn commented Feb 24, 2018

I am trying to update my emsdk installation and getting the following error after running ./emsdk install latest.

Installing tool 'emscripten-1.37.34'..
Error downloading URL 'https://github.com/kripken/emscripten/archive/1.37.34.tar.gz': <urlopen error [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)>
Installation failed!

I'm seeing this whether I try to upgrade an existing installation or install from a clean copy of the SDK. Platform is macOS. I tried to install 1.37.33 as well and that failed with the same error. Is anyone else seeing this problem?

@frittblas

This comment has been minimized.

Copy link

frittblas commented Feb 24, 2018

Yes I have the same problem but with emscripten-1.37.35
Error downloading..
I'm on windows.

@jjyyxx

This comment has been minimized.

Copy link

jjyyxx commented Feb 25, 2018

Similar problem.
Platform: windows
Error downloading URL 'https://github.com/kripken/emscripten/archive/1.37.35.zip': <urlopen error [Errno 1] _ssl.c:504: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version>

However, i was able to download the archive manually from the browser. Is there a way to bypass the download stage(maybe put the archive to a specific directory manually) and install directly?

@LMLB

This comment has been minimized.

Copy link

LMLB commented Feb 25, 2018

@jjyyxx Put the zip in the zips folder and make sure it has the same file name as in the URL (i.e. 1.37.35.zip, not emscripten-1.37.35.zip). Then run the install command again and it will detect that the zip file is already downloaded.

@Krelborn

This comment has been minimized.

Copy link
Author

Krelborn commented Feb 25, 2018

That's a good workaround, thanks!

@jjyyxx

This comment has been minimized.

Copy link

jjyyxx commented Feb 25, 2018

Thanks. It works perfectly

@LMLB

This comment has been minimized.

Copy link

LMLB commented Feb 25, 2018

This seems to have been caused by https://github.com/blog/2507-weak-cryptographic-standards-removed. The version of Python included in the Windows build is too old.

Edit: It's because of the included version of OpenSSL is too old (i.e. less than 1.0.1).

@kripken

This comment has been minimized.

Copy link
Member

kripken commented Feb 25, 2018

Sounds like we need to update the Python in the windows emsdk, but is this windows-only? The initial report here was on Mac.

@Krelborn

This comment has been minimized.

Copy link
Author

Krelborn commented Feb 25, 2018

Yep I’m seeing this on macOS 10.12 and 10.13.

@kripken

This comment has been minimized.

Copy link
Member

kripken commented Feb 25, 2018

Is the core issue the same, do those MacOS versions ship with too-old versions of python?

@Krelborn

This comment has been minimized.

Copy link
Author

Krelborn commented Feb 25, 2018

Python version is 2.7.10 on both macOS versions I've tried, I guess that must be too old if that's the issue.

@mapsam

This comment has been minimized.

Copy link

mapsam commented Feb 25, 2018

Just updated to MacOS 10.13.3 and the install latest command worked!

Adding some things I saw, which may or may not be helpful. tlsv1 alert protocol version error searches reveal mostly python and openssl issues. I noticed before the MacOS upgrade I was running openssl 0.9.8 but now I'm running LibreSSL 2.2.7.

@frittblas

This comment has been minimized.

Copy link

frittblas commented Feb 25, 2018

kripken - yes it's an issue on windows too. I also got this error when trying to compile a project that worked fine in 1.35.00

urllib2.URLError: <urlopen error [Errno 1] _ssl.c:504: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version>

@LMLB

This comment has been minimized.

Copy link

LMLB commented Feb 25, 2018

Sorry, I missed that it was originally reported on macOS, as I had the same issue on Windows.

It's actually the version of OpenSSL that's too old (version 1.0.1 or higher is needed for TLS 1.2). Python 2.7.5 for Windows includes OpenSSL 0.9.8y, and macOS 10.13.3 includes OpenSSL 0.9.8zh.

@Krelborn

This comment has been minimized.

Copy link
Author

Krelborn commented Feb 26, 2018

Yep, I've retried on macOS 10.13 and it does seem to work so it's just 10.12 where I have the problem (Which is my main development machine). I'll use the workaround that was posted until I get round to upgrading. Thanks for the responses!

@juj juj added windows emsdk labels Feb 26, 2018

@juj

This comment has been minimized.

Copy link
Collaborator

juj commented Feb 26, 2018

I'm able to reproduce this on Windows.

Thanks for troubleshooting versions in the above, very useful. Emsdk bundles the Portable Python package on Windows, and on other OSes depends on python being installed by default on the system.

Unfortunately latest version of Portable Python seems to be 2.7.6.1, which by @Krelborn 's comment above seems to be too old, as 2.7.10 was detected to be too old. It looks like we need to source an up to date portable python installation.

@juj

This comment has been minimized.

Copy link
Collaborator

juj commented Feb 26, 2018

https://winpython.github.io/ looks promising, I'll see if we could migrate to using that.

Although https://stackoverflow.com/questions/29472289/is-there-portable-python-2-7-windows-distribution-without-any-libraries-included suggests "I have to unpack 1.5GB first and uninstall unused packages." so not sure if this might cause a download size impact.

@LMLB

This comment has been minimized.

Copy link

LMLB commented Feb 26, 2018

FYI: According to the release notes on python.org, Python 2.7.7 on Windows includes OpenSSL 1.0.1g.

Note that the version of Python shouldn't matter on macOS, as it is only on Windows that Python has its own copy of OpenSSL baked in. On other operating systems Python relies on the OpenSSL version that is installed in the system.

@juj

This comment has been minimized.

Copy link
Collaborator

juj commented Feb 26, 2018

A fix is now in emscripten-core/emsdk@4c8ea1b

It would be great if someone can help trying this out:

git clone https://github.com/juj/emsdk.git
cd emsdk
emsdk install latest
emsdk activate latest

should obtain Python 2.7.13.1 64-bit and Emscripten 1.37.35 precompiled.

@juj juj added the OSX label Feb 26, 2018

@juj

This comment has been minimized.

Copy link
Collaborator

juj commented Feb 26, 2018

On macOS side, I'm thinking that we have no other easy option rather to call macOS 10.12 unsupported, and ask users to update to macOS 10.13? Or I wonder if manually downloading and replacing macOS bundled python with a newer python via homebrew or similar would work?

@mischnic

This comment has been minimized.

Copy link

mischnic commented Feb 26, 2018

Installing binaryen (#6276) works with Python 2 and 3 from Homebrew:

$ python2 --version
Python 2.7.14
$ python3 --version
Python 3.6.4
$ python2 /usr/local/bin/emcc -s WASM=1 main.c #works
$ python3 /usr/local/bin/emcc -s WASM=1 main.c #works

More permanent solution (bash):

alias emcc="python2 /usr/local/bin/emcc" # or python3

giuliolunati added a commit to metaeducation/ren-c that referenced this issue Feb 28, 2018

.travis.yml: fix Emscripten build
Now Emscripten build requires OSX 10.13 (Xcode9.3beta)

See emscripten-core/emscripten#6275

giuliolunati added a commit to metaeducation/ren-c that referenced this issue Feb 28, 2018

.travis.yml: fix Emscripten build
Now Emscripten build requires OSX 10.13 (Xcode9.3beta)

See emscripten-core/emscripten#6275
@ypoissant

This comment has been minimized.

Copy link

ypoissant commented Feb 28, 2018

I am trying to add SIMD support to our application and I get the following error:
error: Linking globals named 'emscripten_float64x2_add': symbol multiply defined!
This error is reviewed in bug #5867 so I tried to follow the instructions, that is installing the latest but the installation fails with the error:
Error downloading URL 'https://github.com/kripken/emscripten/archive/1.37.35.zip': <urlopen error [Errno 1] _ssl.c:504: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version>
I also tried to install the 1.37.23 (as per instruction in #5867) but got the same error.
I know this is due to an old Python version in the sdk distribution but I'm not experienced enough with the sdk to do a manual install. I'm stuck with 1.37.22.
Is there a fix in the pipeline for this?

@kripken

This comment has been minimized.

Copy link
Member

kripken commented Mar 1, 2018

Has anyone had a chance to try @juj's steps a few comments back? #6275 (comment) I think we're waiting on that to move forward here.

@e99majo

This comment has been minimized.

Copy link

e99majo commented Mar 11, 2018

Turns out I had gotten two version of python2 installed will trying to resolve this and emsdk was picking up the wrong one. Managed to uninstall the "wrong" one, (2.7.14) which i got from python.org and now running 2.7.10. The one from python.org has Openssl 0.9.8zh. The mac os bundled version of python has LibreSSL 2.2.7

@LMLB

This comment has been minimized.

Copy link

LMLB commented Mar 11, 2018

The one that has OpenSSL 0.9.8zh does not come with OpenSSL included, it uses the system-supplied OpenSSL library (which Apple deprecated in Mac OS X 10.7).

Python 3.6 is the first release to include its own private copy of OpenSSL (1.0.2) in the macOS build from python.org. All versions of older Python releases (2.7 included) use the deprecated system-supplied OpenSSL library.

kripken added a commit that referenced this issue Mar 14, 2018

Update docs about current installation issues (#6298) [ci skip]
* update docs regarding #6275 (github changes with SSL that force a newer python version) and #6288 (just mention the emsdk script itself from github, not the binary releases which we don't have a working solution for atm)

* mention zip download from github, and update docs to reflect that binary packages are now available for linux, no need to build from source

* mention Windows Subsystem for Linux
@AndresCuervo

This comment has been minimized.

Copy link

AndresCuervo commented Mar 16, 2018

@juj I wouldn't recommend saying 10.12 is unsupported as I can confirm that running brew install python2 per @mischnic's comment above resolved this issue on MacOS 10.12.6. Maybe the resolution is that this should be added to the Platform Specific Notes section?

@kripken

This comment has been minimized.

Copy link
Member

kripken commented Mar 16, 2018

@AndresCuervo the current docs suggest 10.13 but that you can install newer python manually. Does it look clear enough to you there? Perhaps we should mention brew directly?

@AndresCuervo

This comment has been minimized.

Copy link

AndresCuervo commented Mar 16, 2018

@kripken

This comment has been minimized.

Copy link
Member

kripken commented Mar 16, 2018

Sounds good. Is the python3 version in brew new enough like the python2 one to avoid the ssl bug, so we can recommend either? (or should we just recommend 2?)

@kimown

This comment has been minimized.

Copy link

kimown commented Mar 23, 2018

update commands:

cd emsdk/zips
wget https://github.com/kripken/emscripten/archive/1.37.36.tar.gz
emsdk install latest

Installing SDK 'sdk-1.37.36-64bit'..
Installing tool 'clang-e1.37.36-64bit'..
The contents of file 'llvm/tag/osx_64bit/emscripten-llvm-e1.37.36.tar.gz' already exist in destination '/Users/google/com/mdk/emsdk/clang/e1.37.36_64bit', skipping.
Done installing tool 'clang-e1.37.36-64bit'.
Installing tool 'node-8.9.1-64bit'..
The contents of file 'node-v8.9.1-darwin-x64.tar.gz' already exist in destination '/Users/google/com/mdk/emsdk/node/8.9.1_64bit', skipping.
Done installing tool 'node-8.9.1-64bit'.
Installing tool 'emscripten-1.37.36'..
Error downloading URL 'https://github.com/kripken/emscripten/archive/1.37.36.tar.gz': <urlopen error [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)>
Installation failed!

still mistake.

@kripken

This comment has been minimized.

Copy link
Member

kripken commented Mar 26, 2018

@kimown which os and version of python are you using? we recently updated the docs to mention that newer python is required as discussed in this issue.

@zsavicreative

This comment has been minimized.

Copy link

zsavicreative commented Mar 28, 2018

I can confirm that on windows 10 pro the python included in the emsdk-portable download was failing for me, after removing the python contents, I just replaced it with my own python 2.7 root and left the folder name as is, managed to download/install without issues.

@juj

This comment has been minimized.

Copy link
Collaborator

juj commented Apr 4, 2018

Emsdk updated to using Python 2.7.13.1 on Windows since this bug was originally reported, so it should be fixing the issue on Windows, although the problem is that if user has old Python on emsdk on Windows, they cannot use emsdk update + emsdk install latest to update to the newest version, since the updater relies on being able to download with Python, so in such scenario, manually bootstrapping to the latest version should be done by redownloading the portable installer (which has the updated Python 2.7.13.1 in it).

It's good to know that on macOS manually updating Python e.g. via brew will help. Unlike Windows, on macOS we don't bundle Python in emsdk because macOS comes with Python shipped, and we've been assuming that it would be a functional one.

I'll close this bug as fixed - unfortunately a manual update of Python or redownload of emsdk may be needed for users, but once one has the latest version, the issue should not be present.

@juj juj closed this Apr 4, 2018

@kripken

This comment has been minimized.

Copy link
Member

kripken commented Apr 4, 2018

manually bootstrapping to the latest version should be done by redownloading the portable installer (which has the updated Python 2.7.13.1 in it).

Note that we currently do not link to an installer for windows, instead we recommend people get the emsdk and let it do the rest, like on other platforms. (Because I don't know how to build or test the installer...)

@marswong

This comment has been minimized.

Copy link

marswong commented Apr 10, 2018

installing 1.37.36 on macOS 10.13.4 with python 2.7.14 still failed.

@damu

This comment has been minimized.

Copy link

damu commented Apr 24, 2018

Seems like emsdk is still using Python 2.7.5.3 and that it still has this issue. I just tried it today and installed Python 3.6.5 before because emsdk wouldn't even start otherwise. See emscripten-core/emsdk#140
@juj

@juj

This comment has been minimized.

Copy link
Collaborator

juj commented Apr 27, 2018

Note that we currently do not link to an installer for windows

The NSIS installer .exes on Windows were deprecated at some point, since it was not much gain to support an extra deployment workflow, and the Windows emsdk portable zip based package does much of the same thing with less hassle. The only thing that's different in the Windows emsdk portable zip package compared to macOS and Linux is that in the Windows package, we bundle portable Python 2.7.13.1 into the zip package.

@juj

This comment has been minimized.

Copy link
Collaborator

juj commented Apr 27, 2018

Oh hmm, I now see that the Downloads page at http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html# no longer mentions a link to the downloadable zip packages. That is, to these zip files:

and indeed, in the above, emsdk-portable.zip still has old Python. I think we need to make the S3 bots roll out a new emsdk-portable zip and tar.gz packages. @kripken : that is done in the Buildbot dashboard by manually launching the emsdk-win-updater, emsdk-osx-updater and emsdk-linux-updater build tasks. Those tasks run deploy_emsdk.py to zip up and upload a emsdk-portables for download.

I was not able to find the link to the Buildbot dashboard in my email inbox, could you link to that here?

@kripken

This comment has been minimized.

Copy link
Member

kripken commented Apr 27, 2018

@juj do you mean this link? http://ec2-54-213-252-128.us-west-2.compute.amazonaws.com:8112/#/

I opened a PR on the emsdk repo to update the links there (to point to the website downloads docs), emscripten-core/emsdk#141

@mattdesl

This comment has been minimized.

Copy link

mattdesl commented May 20, 2018

Just to add: I updated from Python 2.7.10 to 2.7.14 on macOS Sierra, and suddenly it fixed this issue. I updated with Macports:

# install latest
sudo port install python27

# alias to 'python' command
sudo port select --set python python27

Quit and re-open terminal, then run python --version to ensure it's been updated.

@k2snowman69

This comment has been minimized.

Copy link

k2snowman69 commented Sep 8, 2018

Just curious: It's been a while since the documentation was changed requiring windows users to install python separately from emsdk (#6298). Is this now the official norm or still just a work around until bundling python into emsdk gets resolved? We haven't changed our CI yet to install python and don't want to put in the time if in a few weeks/months it's not going to matter.

@kripken

This comment has been minimized.

Copy link
Member

kripken commented Sep 11, 2018

There are no current plans to improve the windows SDK install and bundle things like python - I'd love for us to, but unless someone volunteers, for now the best we can do is an experience similar to the other platforms.

@Lursun

This comment has been minimized.

Copy link

Lursun commented Nov 2, 2018

In MacOS
$ /Applications/Python\ 2.7/Install\ Certificates.command
This is work

ref:https://stackoverflow.com/questions/27835619/urllib-and-ssl-certificate-verify-failed-error

@GeonChen

This comment has been minimized.

Copy link

GeonChen commented Nov 29, 2018

Firstly,I typed "emsdk install latest" in git cmd,but it said "bash:git:command not found"
and then I got the issue code look like #6723 when i typed "./emsdk install latest" on Windows10.
Finally,I set the system path point to emsdk dir and typed "emsdk install latest" again.
It worked!!Silly me. By the way,my python version is 2.7.15.

@WhiteHexagon

This comment has been minimized.

Copy link

WhiteHexagon commented Feb 23, 2019

macos 10.12.4 following your getting_started for 1.38.28. ./emsdk install latest gave me the same tlsv1 error. Following your instructions "Otherwise you can manually install and use Python 2.7.12 or newer" I did a brew install python3 however to get this working I actually needed brew install python2 which now shows 2.7.15.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.