Open endepointe opened 2 years ago
Sadly we don't have great support for cygwin and/or MINGW and don't have a lot of test coverage, so if you want to use emsdk in either cynwin or mingw you might need to help out with some testing/patches.
The code that is generating that string \\?\
path is here: https://github.com/emscripten-core/emsdk/blob/8cea3780cd6a12d900c051f2e0c15177ba12523e/emsdk.py#L531-L550. Perhaps cygwin needs the same special handling there that MINGW has?
Same issue on MSYS2 (which is based on Cygwin).
Would one of you be able to test out a patch to the fix_potentially_long_windows_pathname
function?
@berkon it looks like that function already tries to handle MINGW there.. does you confirm if MINGW is correctly being detected? If you modify the first line of that function that it becomes if MINGW or not WINDOWS:
does that fix the issue? I.e. if you just disable the prefixing?
Thanks for your quick reply @sbc100! For testing I just added a return statement at the top (see screenshot), and it works!
The handling for MINGW does not help. As MSYS2/Cygwin seems to have a different requirement regarding the returned path, we probably need a specific handling for this case as well.
Can you confirm.. does the problem occur when you use the python executable from MSYS2? If you run emsdk with a windows version of python.exe does the problem not occur?
Is it common for folks to have the MSYS2 version of python.exe first in their PATH?
Is the MSYS global in the script correctly being set when you run emsdk.py?
If you change the if MINGW:
line in that function if MINGW or MSYS2:
does it fix the problem?
I've installed Python by myself from within MSYS2 with pacman -S python3
. Thus it is used from /bin/python
. The version is 3.9.9. I must admit that I'm not very familiar with MSYS2. I don't know how I can access Python from the Windows installation.
I can't redo that step, because it says "All SDK components already installed". And I wouldn't want to rip it apart, because I had a very hard time to get this far ;-)
OK well it you feel like experimenting some more of filing a patch it would be most welcome.
(If you want to force a reinstall you could do emsdk install tot
to get the latest tip of tree release).
<translate JPN -> USA with deepl.com>
I added "return pathname" as @berkon did, But this method did not work in cygwin.
error message:
$ ./emsdk install latest
Resolving SDK alias 'latest' to '3.1.53'
Resolving SDK version '3.1.53' to 'sdk-releases-e5523d57a0e0dcf80f3b101bbc23613fcc3101aa-64bit'
Installing SDK 'sdk-releases-e5523d57a0e0dcf80f3b101bbc23613fcc3101aa-64bit'..
Skipped installing node-16.20.0-64bit, already installed.
Skipped installing python-3.9.2-nuget-64bit, already installed.
Skipped installing java-8.152-64bit, already installed.
Installing tool 'releases-e5523d57a0e0dcf80f3b101bbc23613fcc3101aa-64bit'..
Downloading: /home/yutta/emsdk/downloads/e5523d57a0e0dcf80f3b101bbc23613fcc3101aa-wasm-binaries.zip from https://storage.googleapis.com/webassembly/emscripten-releases-builds/win/e5523d57a0e0dcf80f3b101bbc23613fcc3101aa/wasm-binaries.zip, 457616227 Bytes
Unpacking '/home/yutta/emsdk/downloads/e5523d57a0e0dcf80f3b101bbc23613fcc3101aa-wasm-binaries.zip' to '/home/yutta/emsdk/upstream'
Traceback (most recent call last):
File "/home/yutta/emsdk/./emsdk.py", line 3076, in
$ ./emsdk install latest Resolving SDK alias 'latest' to '3.1.7' Resolving SDK version '3.1.7' to 'sdk-releases-upstream-d0e637fe48197587d981f79e8114757731d0c2a9-64bit' Installing SDK 'sdk-releases-upstream-d0e637fe48197587d981f79e8114757731d0c2a9-64bit'.. Installing tool 'node-14.18.2-64bit'.. Downloading: /cygdrive/c/dev/emsdk/zips/node-v14.18.2-win-x64.zip from https://storage.googleapis.com/webassembly/emscripten-releases-builds/deps/node-v14.18.2-win-x64.zip, 30570907 Bytes Unpacking '/cygdrive/c/dev/emsdk/zips/node-v14.18.2-win-x64.zip' to '/cygdrive/c/dev/emsdk/node/14.18.2_64bit' Unzipping file '/cygdrive/c/dev/emsdk/zips/node-v14.18.2-win-x64.zip' failed due to reason: [Errno 22] Invalid argument: '\\?\\cygdrive\c\dev\emsdk\node\unzip_temp' error: installation failed!
my info*
Could I remove the need to download and install a nodejs version that I already have? I am looking to see how others are handling this and maybe this is a system setup issue. Any help or pointers are appreciated.
** update ***
After switching to the windows command prompt and adding the paths to emsdk, I was able to install the latest tools. This is an issue with installing within cygwin and not emsdk. Maybe there is a way to fix it down the road if others experience similar issues.