Open lord opened 7 years ago
I'm using Arch Linux:
$ python --version
Python 3.6.2
$ python2 --version
Python 2.7.14
I think that emsdk
is supposed to work with Python 3, but the version that setup.js
is downloading from https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz has a bug preventing that.
There's an open issue related to this problem at https://github.com/juj/emsdk/issues/103
And indeed it works if I clone the master:
$ git clone https://github.com/juj/emsdk ~/.emsdk
$ cd ~/.emsdk
$ ./emsdk install sdk-1.37.22-64bit
Fetching all tags from Emscripten Github repository...
Done. 109 tagged releases available, latest is 1.37.22.
Fetching all tags from Binaryen Github repository...
Done. 36 tagged Binaryen releases available, latest is 1.37.22.
Fetching all precompiled Nightly versions..
...
:+1: nice find, thanks! I'll update the script next chance I get.
It doesn't look like this has been fixed in wargo / upstream quite yet, but a quick method to bypass the issue on Arch Linux and other distros defaulting to python3 is to override the python version using a local PATH environment variable change, detailed here:
https://wiki.archlinux.org/index.php/python#Python_2
mkdir ~/bin
ln -s /usr/bin/python2 ~/bin/python
ln -s /usr/bin/python2-config ~/bin/python-config
export PATH=~/bin:$PATH
With this workaround in place, wargo successfully builds for me on Arch Linux, and it's limited to the current shell so it doesn't hose anything else on the system.
Someone on reddit points out that we should work even if the system python points to 3, as long as there's a
python2
orpython2.7
installed.