Closed
Description
andrew@andrew-HP-Spectre-x360-Convertible:~/Desktop/programming/rust/projects/hello world$ rustc --target=asmjs-unknown-emscripten hello.rs
error: linking with `emcc` failed: exit code: 1
|
= note: "emcc" "-L" "/home/andrew/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/asmjs-unknown-emscripten/lib" "hello.0.o" "-o" "hello.js" "-Wl,--gc-sections" "-nodefaultlibs" "-L" "/home/andrew/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/asmjs-unknown-emscripten/lib" "-Wl,-Bstatic" "-Wl,-Bdynamic" "/home/andrew/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/asmjs-unknown-emscripten/lib/libstd-610aec1c0c2edd5b.rlib" "/home/andrew/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/asmjs-unknown-emscripten/lib/libpanic_unwind-f2d5dd75c5a64c5f.rlib" "/home/andrew/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/asmjs-unknown-emscripten/lib/libunwind-cce8009dda26867d.rlib" "/home/andrew/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/asmjs-unknown-emscripten/lib/librand-d2f56491199d3b9f.rlib" "/home/andrew/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/asmjs-unknown-emscripten/lib/libcollections-4f02fd86535a3157.rlib" "/home/andrew/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/asmjs-unknown-emscripten/lib/librustc_unicode-8d6c34ad46f07f91.rlib" "/home/andrew/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/asmjs-unknown-emscripten/lib/liballoc-198f48436646c796.rlib" "/home/andrew/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/asmjs-unknown-emscripten/lib/liballoc_system-22e63f2ceba0e6f8.rlib" "/home/andrew/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/asmjs-unknown-emscripten/lib/liblibc-9b19cb4b417215a8.rlib" "/home/andrew/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/asmjs-unknown-emscripten/lib/libcore-ec0461203eec19c8.rlib" "/home/andrew/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/asmjs-unknown-emscripten/lib/libcompiler_builtins-ad8606f391af463e.rlib" "-l" "c" "-s" "ERROR_ON_UNDEFINED_SYMBOLS=1"
= note: WARNING root: LLVM version appears incorrect (seeing "(https://github.com/kripken/emscripten-fastcomp-clang/", expected "3.4")
INFO root: (Emscripten: Running sanity checks)
ERROR root: /home/andrew/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/asmjs-unknown-emscripten/lib: Input file has an unknown suffix, don't know what to do with it!
error: aborting due to previous error
So I get the same error I guess trying to target both asmjs and wasm. I guess I don't know if I did something stupid, or if it's a real issue with emscripten...
Here is emcc --v
andrew@andrew-HP-Spectre-x360-Convertible:~/Desktop/programming/rust/projects/hello world$ emcc --version
emcc (Emscripten GCC-like replacement) 1.22.1 ()
Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
andrew@andrew-HP-Spectre-x360-Convertible:~/Desktop/programming/rust/projects/hello world$ emcc -v
emcc (Emscripten GCC-like replacement + linker emulating GNU ld ) 1.22.1
clang version 3.9.0 (https://github.com/kripken/emscripten-fastcomp-clang/ 7372fbdc769db28fd534454268f4b008e629464f) (https://github.com/kripken/emscripten-fastcomp/ bf977937f361ed99dcb790805415bd0921ae8591) (emscripten 1.37.1 : 1.37.1)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/andrew/Desktop/programming/rust/emsdk_portable/clang/fastcomp/build_incoming_64/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6.0.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Candidate multilib: .;@m64
Selected multilib: .;@m64
WARNING root: LLVM version appears incorrect (seeing "(https://github.com/kripken/emscripten-fastcomp-clang/", expected "3.4")
INFO root: (Emscripten: Running sanity checks)