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

wasm compiling error occured behind the emcc #40352

Closed
vvakame opened this issue Mar 8, 2017 · 1 comment
Closed

wasm compiling error occured behind the emcc #40352

vvakame opened this issue Mar 8, 2017 · 1 comment
Labels
C-bug Category: This is a bug. O-wasm Target: WASM (WebAssembly), http://webassembly.org/

Comments

@vvakame
Copy link

vvakame commented Mar 8, 2017

related: emscripten-core/emscripten#5007

I tried this code:

$ source ~/work/emsdk_portable/emsdk_env.sh
$ echo "pub fn main() {}" > main.rs
$ rustc --target wasm32-unknown-emscripten main.rs

I expected to see this happen: compiled successfully.

Instead, this happened: emcc reporting errors.

Meta

rustc --version --verbose:

$ rustc --version --verbose
rustc 1.17.0-nightly (b1e31766d 2017-03-03)
binary: rustc
commit-hash: b1e31766da75b188062c59f38cd6e8544b902afd
commit-date: 2017-03-03
host: x86_64-apple-darwin
release: 1.17.0-nightly
LLVM version: 3.9

Backtrace: None.

This issue can see by emscripten-core/emscripten#5004 .
and suppressed now by emscripten-core/emscripten@93a082b .

root cause,
*.rlib pass to llvm-nm, llvm-nm reporting errors.

$ /usr/local/Cellar/llvm/3.9.1/bin/llvm-nm /Users/vvakame/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libstd-9a66b6a343d52844.rlib

std-9a66b6a343d52844.0.o:
         U _Unwind_Backtrace
         U _Unwind_FindEnclosingFunction
         U _Unwind_GetIPInfo
-------- T _ZN101_$LT$$RF$$u27$a$u20$$u5b$std..net..addr..SocketAddr$u5d$$u20$as$u20$std..net..addr..ToSocketAddrs$GT$15to_socket_addrs17h5114a9a05148274dE
-------- T _ZN101_$LT$std..ffi..os_str..OsString$u20$as$u20$core..convert..From$LT$collections..string..String$GT$$GT$4from17h5b6e8ea4a4507a33E
-------- T _ZN101_$LT$std..io..cursor..Cursor$LT$$RF$$u27$a$u20$mut$u20$$u5b$u8$u5d$$GT$$u20$as$u20$std..io..Write$GT$5flush17h4852463c3395cc24E

....

-------- s vtable.k
-------- s vtable.l
-------- s vtable.m
         U waitpid
         U write
/usr/local/Cellar/llvm/3.9.1/bin/llvm-nm: /Users/vvakame/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libstd-9a66b6a343d52844.rlib(rust.metadata.bin) The end of the file was unexpectedly encountered

#38558 same issue?

@Mark-Simulacrum Mark-Simulacrum added the O-wasm Target: WASM (WebAssembly), http://webassembly.org/ label May 27, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-bug Category: This is a bug. label Jul 27, 2017
@alexcrichton
Copy link
Member

Looks like this was fixed by emscripten-core/emscripten@93a082b, so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. O-wasm Target: WASM (WebAssembly), http://webassembly.org/
Projects
None yet
Development

No branches or pull requests

3 participants