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

emscripten compat issues #7

Open
netpoetica opened this issue Nov 1, 2020 · 0 comments
Open

emscripten compat issues #7

netpoetica opened this issue Nov 1, 2020 · 0 comments

Comments

@netpoetica
Copy link

The current version of emscripten requires sourcing emsdk/emsdk_env.sh, which does the following:

Adding directories to PATH:
PATH += /Users/rosenbek/github/emsdk
PATH += /Users/rosenbek/github/emsdk/upstream/emscripten
PATH += /Users/rosenbek/github/emsdk/node/12.18.1_64bit/bin
PATH += /Users/rosenbek/github/emsdk/python/3.7.4-2_64bit/bin

Setting environment variables:
EMSDK = /Users/rosenbek/github/emsdk
EM_CONFIG = /Users/rosenbek/github/emsdk/.emscripten
EM_CACHE = /Users/rosenbek/github/emsdk/upstream/emscripten/cache
EMSDK_NODE = /Users/rosenbek/github/emsdk/node/12.18.1_64bit/bin/node
EMSDK_PYTHON = /Users/rosenbek/github/emsdk/python/3.7.4-2_64bit/bin/python3

As you can see, the emsdk bundles version 12.18.1 of node, and your path is modified to use this version. It seems that this version of node is high imcompatible with nbind due to some deprecations in the V8/C++ layer (compiled nbind with this version will produce these issues).

However, you can get around this by taking that version of node from your path and instead using let's say node 8 (which I was able to do).

But, this doesn't fix the problem because somewhere in a makefile that I can't find there is an error like:

> [email protected] build:asmjs /Users/rosenbek/github/nbind-example-universal
> autogypi -r build && node-gyp -C build/asmjs  configure build --asmjs=1 && copyasm build/asmjs dist

  CXX(target) Release/obj.target/nbind/../../node_modules/nbind/src/common.o
error: emscripten requires python 3.5 or above
make: *** [Release/obj.target/nbind/../../node_modules/nbind/src/common.o] Error 1

This might be a MacOSX thing, but MacOSX relies on python 2xx so it exists in /usr/bin, and most people usually have python3 for python 3, most likely installed from homebrew.

So just trying to npm i this example project does lead down a steep rabbit-hole - it would be ideal if there was a way to provide an env var like:

PYTHON_3_PATH="..."
NODE_PATH="..."
npm i

so that we can instruct exactly where to look for different things. But also, I think nbind (which seems to work quite well otherwise), could benefit from being compatible w/ bundled versions of dependencies in emsdk and utilzing emsdk vars

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant