-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Some bugs about file system on emscripten target. #119250
Comments
rust/library/std/src/sys/unix/fs.rs Line 868 in edcbcc7
rust/library/std/src/sys/unix/fs.rs Line 1680 in edcbcc7
|
@Nilstrieb Sorry, I didn't see the notification.
I'm using emscripten installed with Homebrew, and it's usually fresh enough. |
It looks like the Emscripten version parser in libc doesn't understand the I always thought this As a possible workaround for now, you can patch $ emcc -dumpversion
3.1.52-git
$ cat $EMSDK/upstream/emscripten/emscripten-version.txt
3.1.52-git
$ sed -i 's/-git//' $EMSDK/upstream/emscripten/emscripten-version.txt
$ emcc -dumpversion
3.1.52 (on macOS, you'll probably need to change it to use |
@kleisauke Yes, it works. Thanks a lot. Would you open an issue to libc? |
Some Emscripten versions come with `-git` attached, so trim any non-numeric chars from the end of the string. See: rust-lang/rust#119250.
Some Emscripten versions come with `-git` attached, so trim any non-numeric chars from the end of the string. See: rust-lang/rust#119250.
I just opened PR rust-lang/libc#3498 for this. |
Thanks a lot. |
Well, I just heard that Emscripten from Homebrew is unofficial. And there's still more problems when I run my program. Maybe I'll install Emscripten with emsdk later, and test my program again. |
Improve the version parser of Emscripten Some Emscripten versions come with `-git` attached, so trim any non-numeric chars from the end of the string. See: rust-lang/rust#119250.
Some Emscripten versions come with `-git` attached, so split the version string also on the `-` char. See: rust-lang/rust#119250.
Improve the version parser of Emscripten Some Emscripten versions come with `-git` attached, so split the version string also on the `-` char. See: rust-lang/rust#119250.
Thanks a lot for you all! And I have another problem with strict mode in emscripten, which is not so critical. |
I tried this code:
I expected to see this happen: got correct
file_type()
andlen()
.Instead, this happened:
file_type()
returns permission code, whilelen()
returns created time..Meta
rustc --version --verbose
:Backtrace
No panic here, so there's no RUST_BACKTRACE.
Running with
RUST_BACKTRACE=1 cargo +nightly run -Zbuild-std --target wasm32-unknown-emscripten --release -vv --bin metadata
.The text was updated successfully, but these errors were encountered: