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 & emsdk_set_env not found #4

Open
FreezePhoenix opened this issue May 2, 2019 · 10 comments
Open

emsdk & emsdk_set_env not found #4

FreezePhoenix opened this issue May 2, 2019 · 10 comments
Assignees

Comments

@FreezePhoenix
Copy link

The code is hosted at https://repl.it/@FreezePhoenix/ParchedUnnaturalRam

The issue is it doesn't seem to be able to find the emsdk command:

[email protected]:~$ npx emsdk-run emcc hello.cc -o hello.html
/home/runner/node_modules/emsdk-npm/bin/emsdk-run: 26: /home/runner/node_modules/emsdk-npm/emsdk/emsdk_env.sh: ./emsdk: not found
/home/runner/node_modules/emsdk-npm/bin/emsdk-run: 27: .: Can't open ./emsdk_set_env.sh

Seems to work fine on a raspberry pi, but this still takes eons, so there may be bugs later:

npx emsdk install latest

However, on the above, I did copy an older version of the emsdk repo into it.
Not sure if that makes a difference.

@FreezePhoenix
Copy link
Author

FreezePhoenix commented May 2, 2019

/home/runner/node_modules/emsdk-npm/bin/emsdk-run: 27: .: Can't open ./emsdk_set_env.sh

Perhaps this should be... ./../emsdk/emsdk_set_env.sh

No, this doesn't exist either. That's the issue.

@FreezePhoenix
Copy link
Author

Problem found!

@FreezePhoenix
Copy link
Author

FreezePhoenix commented May 2, 2019

that line should be:
. ./..emsdk/emsdk_env.sh

cc @Brion

@FreezePhoenix FreezePhoenix changed the title Does not work on REPL.it emsdk & emsdk_set_env not found May 2, 2019
@bvibber bvibber self-assigned this May 2, 2019
@bvibber
Copy link
Owner

bvibber commented May 2, 2019

Hmmmmm, so this seems like a problem with emsdk itself, where the emsdk_env.sh script is trying to set the directory of the script and having trouble. Not quite sure why it's failing yet.

@bvibber
Copy link
Owner

bvibber commented May 2, 2019

Think I've found it, it's a bug in emsdk's emsdk_env.sh script on non-bash shells. Reported upstream as emscripten-core/emsdk#234

I think I can work around it. :)

@bvibber
Copy link
Owner

bvibber commented May 2, 2019

Ok, so with 0.2.2 it should find ./emsdk BUT it still comes up with "not found" error because it calls through to /usr/bin/env which does not exist in the REPL.it environment. (Python 2 is present as /usr/bin/python, but it can't be found because "env" is used to find it!)

I'm pretty sure the remaining python scripts in emscripten assume that /usr/bin/env python works; though I might be able to force them to run through python manually I'm not sure I'd recommend it.

@FreezePhoenix
Copy link
Author

Well, the question that we are left with:

Do we report this as an REPL.it bug?

@bvibber
Copy link
Owner

bvibber commented May 2, 2019

Yeah, I'd recommend reporting it to REPL.it; unless they have a specific reason for not installing env it would be very helpful, especially for Python scripts where the convention is generally to use #!/usr/bin/env python.

@FreezePhoenix
Copy link
Author

@FreezePhoenix
Copy link
Author

@Brion Supposedly, it is a limit to their linux VM's. Dunno if that means it will be fixed, but... /shrug

@lastmjs lastmjs mentioned this issue Dec 24, 2019
7 tasks
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

2 participants