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

Calling "emsdk activate --global latest" hangs when setting environment variables. #138

Closed
timhutton opened this issue Mar 28, 2018 · 8 comments · Fixed by #301
Closed

Comments

@timhutton
Copy link

timhutton commented Mar 28, 2018

Platform: Windows 10, Python 2.7.13

Without the --global option the command runs very quickly and succeeds. With --global it hangs here:

...
Setting environment variables:
EMSDK = c:/emscripten

WORKAROUND: emsdk activate latest

(From this commit it looks like this acts globally anyway.)

@sbryfcz
Copy link

sbryfcz commented Apr 2, 2018

I have the same issue. Platform Windows 10. Python 3.6.3.

@juj
Copy link
Collaborator

juj commented Apr 4, 2018

With --global the Windows UAC elevation prompt should appear to ask for permission to permanently add the PATHs and environment variables to registry. If that does not happen and you're getting a hang before that line, I wonder if running Windows Command Prompt in Administrator mode might help avoid the issue?

@sbryfcz
Copy link

sbryfcz commented Apr 9, 2018

The UAC prompt never appeared for me. And I tried in Adminstrator mode but nothing happened except it hanging.

@Slluxx
Copy link

Slluxx commented Aug 22, 2018

+1

@d07RiV
Copy link

d07RiV commented Aug 24, 2018

Same issue. It worked fine on my other machine, but here no matter what I do, it hangs before setting LLVM_ROOT, and none of the variables it claims to have set appear in global environment. Tried both cmd and powershell in administrator mode.

@aplumly
Copy link

aplumly commented Oct 26, 2018

anyone find a fix for this?... apart from setting all the env variables by hand?

@roman-petrov
Copy link
Contributor

roman-petrov commented Jul 16, 2019

Today I spent a hour trying to investigate this issue on my machine. As I see the hang caused by win32api.SendMessage(win32con.HWND_BROADCAST, win32con.WM_SETTINGCHANGE, 0, 'Environment')
call in emsdk Python script.

Found some on StackOverflow https://stackoverflow.com/questions/1951658/sendmessagehwnd-broadcast-hangs

Still not sure if there is a simple workaround, but maybe removing this system call should work. Or we can use SendMessageTimeout in this call as they suggested on StackOverflow.

I am new with emsdk so I am not sure what is the right solution, need help...

@roman-petrov
Copy link
Contributor

Right solution might be to use PostMessage vs SendMessage in https://github.com/emscripten-core/emsdk/blob/master/emsdk#L263

Can anybody give an advice?...

vargaz pushed a commit to vargaz/emsdk that referenced this issue Nov 22, 2023
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

Successfully merging a pull request may close this issue.

7 participants