Unable to compile hello_world.rs to wasm
n8gray opened this issue · 6 comments
Following the tutorial here I've installed Rust and Emscripten. But when I try to compile a simple rust file to WebAssembly I get an error from llvm-ar. I'm a total noob to Rust, enthused by the idea of a web language that doesn't suck, so apologies if I've missed something obvious. I'm on macOS Sierra 10.12.5:
[i852946@LAXM00618711A]% uname -a
Darwin LAXM00618711A 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64
[i852946@LAXM00618711A]% rustc --version
rustc 1.18.0 (03fc9d622 2017-06-06)
[i852946@LAXM00618711A]% emcc --version
emcc (Emscripten gcc/clang-like replacement) 1.37.15 (commit 519de4c4160f37af5e0c24a5cc2f57d142ad0c65)
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.
[i852946@LAXM00618711A]% cat main.rs
fn main() {
println!("Hello, world!");
}
[i852946@LAXM00618711A]% rustc --target=wasm32-unknown-emscripten main.rs -o main.html
error: linking with `emcc` failed: exit code: 1
|
= note: "emcc" "-s" "DISABLE_EXCEPTION_CATCHING=0" "-L" "/Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib" "main.0.o" "-o" "main.html" "-s" "EXPORTED_FUNCTIONS=[\"_main\",\"_rust_eh_personality\"]" "-O0" "--memory-init-file" "0" "-g0" "-s" "DEFAULT_LIBRARY_FUNCS_TO_INCLUDE=[]" "-L" "/Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib" "/Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libstd-f4594d3e53dcb114.rlib" "/Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/librand-1efbcfd8938372b6.rlib" "/Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libcollections-532a3dbf317eff86.rlib" "/Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libstd_unicode-cfbd6648f7db2ee5.rlib" "/Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libpanic_unwind-a0157c0ca919c364.rlib" "/Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libunwind-488b4ab4bd53a138.rlib" "/Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/liballoc-ca07b617414dd0fa.rlib" "/Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/liballoc_system-68e33a366943aef4.rlib" "/Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/liblibc-88c194c15fdb6521.rlib" "/Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libcore-687e6a964d22cbb4.rlib" "/Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libcompiler_builtins-987729be881d4d32.rlib" "-l" "c" "-s" "BINARYEN=1" "-s" "ERROR_ON_UNDEFINED_SYMBOLS=1"
= note: extract archive contents(/Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libunwind-488b4ab4bd53a138.rlib) failed with error: llvm-ar failed to extract file(s) ['/private/var/folders/ss/x9rj8hxn6rx0xb0jq3qk1nyd77n725/T/emscripten_temp_ypnCpN_archive_contents/rust.metadata.bin', '/private/var/folders/ss/x9rj8hxn6rx0xb0jq3qk1nyd77n725/T/emscripten_temp_ypnCpN_archive_contents/unwind-488b4ab4bd53a138.0.bytecode.deflate'] from archive file /Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libunwind-488b4ab4bd53a138.rlib! Error:dyld: lazy symbol binding failed: Symbol not found: _futimens
Referenced from: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _futimens
Referenced from: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar
Expected in: /usr/lib/libSystem.B.dylib
0 llvm-ar 0x000000010570d138 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 llvm-ar 0x000000010570c366 llvm::sys::RunSignalHandlers() + 86
2 llvm-ar 0x000000010570d77e SignalHandler(int) + 366
3 libsystem_platform.dylib 0x00007fffc01d7b3a _sigtramp + 26
4 libsystem_platform.dylib 0x00000001092c5b4d _sigtramp + 1225711661
5 libsystem_platform.dylib 0x00000001092d0464 _sigtramp + 1225754948
6 libsystem_platform.dylib 0x00000001092ab793 _sigtramp + 1225604211
7 libsystem_platform.dylib 0x00000001092ab89e _sigtramp + 1225604478
8 libdyld.dylib 0x00007fffbffc4282 dyld_stub_binder + 282
9 llvm-ar 0x0000000105955358 (anonymous namespace)::DarwinX86AsmBackend::getCompactUnwindRegNum(unsigned int) const::CU64BitRegs + 12850
10 llvm-ar 0x000000010558f33c performOperation(ArchiveOperation, llvm::object::Archive*, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::vector<llvm::NewArchiveMember, std::__1::allocator<llvm::NewArchiveMember> >*) + 4156
11 llvm-ar 0x000000010558dce6 performOperation(ArchiveOperation, std::__1::vector<llvm::NewArchiveMember, std::__1::allocator<llvm::NewArchiveMember> >*) + 1126
12 llvm-ar 0x000000010558b599 main + 361
13 libdyld.dylib 0x00007fffbffc8235 start + 1
Stack dump:
0. Program arguments: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar xo /Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libunwind-488b4ab4bd53a138.rlib
extract archive contents(/Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libpanic_unwind-a0157c0ca919c364.rlib) failed with error: llvm-ar failed to extract file(s) ['/private/var/folders/ss/x9rj8hxn6rx0xb0jq3qk1nyd77n725/T/emscripten_temp_VOH6_8_archive_contents/rust.metadata.bin', '/private/var/folders/ss/x9rj8hxn6rx0xb0jq3qk1nyd77n725/T/emscripten_temp_VOH6_8_archive_contents/panic_unwind-a0157c0ca919c364.0.bytecode.deflate'] from archive file /Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libpanic_unwind-a0157c0ca919c364.rlib! Error:dyld: lazy symbol binding failed: Symbol not found: _futimens
Referenced from: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _futimens
Referenced from: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar
Expected in: /usr/lib/libSystem.B.dylib
0 llvm-ar 0x0000000105c2e138 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 llvm-ar 0x0000000105c2d366 llvm::sys::RunSignalHandlers() + 86
2 llvm-ar 0x0000000105c2e77e SignalHandler(int) + 366
3 libsystem_platform.dylib 0x00007fffc01d7b3a _sigtramp + 26
4 libsystem_platform.dylib 0x000000010c25db4d _sigtramp + 1275617325
5 libsystem_platform.dylib 0x000000010c268464 _sigtramp + 1275660612
6 libsystem_platform.dylib 0x000000010c243793 _sigtramp + 1275509875
7 libsystem_platform.dylib 0x000000010c24389e _sigtramp + 1275510142
8 libdyld.dylib 0x00007fffbffc4282 dyld_stub_binder + 282
9 llvm-ar 0x0000000105e76358 (anonymous namespace)::DarwinX86AsmBackend::getCompactUnwindRegNum(unsigned int) const::CU64BitRegs + 12850
10 llvm-ar 0x0000000105ab033c performOperation(ArchiveOperation, llvm::object::Archive*, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::vector<llvm::NewArchiveMember, std::__1::allocator<llvm::NewArchiveMember> >*) + 4156
11 llvm-ar 0x0000000105aaece6 performOperation(ArchiveOperation, std::__1::vector<llvm::NewArchiveMember, std::__1::allocator<llvm::NewArchiveMember> >*) + 1126
12 llvm-ar 0x0000000105aac599 main + 361
13 libdyld.dylib 0x00007fffbffc8235 start + 1
14 libdyld.dylib 0x0000000000000003 start + 1073970639
Stack dump:
0. Program arguments: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar xo /Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libpanic_unwind-a0157c0ca919c364.rlib
extract archive contents(/Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libcollections-532a3dbf317eff86.rlib) failed with error: llvm-ar failed to extract file(s) ['/private/var/folders/ss/x9rj8hxn6rx0xb0jq3qk1nyd77n725/T/emscripten_temp_y7Qv4f_archive_contents/rust.metadata.bin', '/private/var/folders/ss/x9rj8hxn6rx0xb0jq3qk1nyd77n725/T/emscripten_temp_y7Qv4f_archive_contents/collections-532a3dbf317eff86.0.bytecode.deflate'] from archive file /Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libcollections-532a3dbf317eff86.rlib! Error:dyld: lazy symbol binding failed: Symbol not found: _futimens
Referenced from: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _futimens
Referenced from: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar
Expected in: /usr/lib/libSystem.B.dylib
0 llvm-ar 0x000000010d65c138 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 llvm-ar 0x000000010d65b366 llvm::sys::RunSignalHandlers() + 86
2 llvm-ar 0x000000010d65c77e SignalHandler(int) + 366
3 libsystem_platform.dylib 0x00007fffc01d7b3a _sigtramp + 26
4 libsystem_platform.dylib 0x00000001116e0b4d _sigtramp + 1364234285
5 libsystem_platform.dylib 0x00000001116eb464 _sigtramp + 1364277572
6 libsystem_platform.dylib 0x00000001116c6793 _sigtramp + 1364126835
7 libsystem_platform.dylib 0x00000001116c689e _sigtramp + 1364127102
8 libdyld.dylib 0x00007fffbffc4282 dyld_stub_binder + 282
9 llvm-ar 0x000000010d8a4358 (anonymous namespace)::DarwinX86AsmBackend::getCompactUnwindRegNum(unsigned int) const::CU64BitRegs + 12850
10 llvm-ar 0x000000010d4de33c performOperation(ArchiveOperation, llvm::object::Archive*, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::vector<llvm::NewArchiveMember, std::__1::allocator<llvm::NewArchiveMember> >*) + 4156
11 llvm-ar 0x000000010d4dcce6 performOperation(ArchiveOperation, std::__1::vector<llvm::NewArchiveMember, std::__1::allocator<llvm::NewArchiveMember> >*) + 1126
12 llvm-ar 0x000000010d4da599 main + 361
13 libdyld.dylib 0x00007fffbffc8235 start + 1
14 libdyld.dylib 0x0000000000000003 start + 1073970639
Stack dump:
0. Program arguments: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar xo /Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libcollections-532a3dbf317eff86.rlib
extract archive contents(/Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/librand-1efbcfd8938372b6.rlib) failed with error: llvm-ar failed to extract file(s) ['/private/var/folders/ss/x9rj8hxn6rx0xb0jq3qk1nyd77n725/T/emscripten_temp_vP2t_J_archive_contents/rust.metadata.bin', '/private/var/folders/ss/x9rj8hxn6rx0xb0jq3qk1nyd77n725/T/emscripten_temp_vP2t_J_archive_contents/rand-1efbcfd8938372b6.0.bytecode.deflate'] from archive file /Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/librand-1efbcfd8938372b6.rlib! Error:dyld: lazy symbol binding failed: Symbol not found: _futimens
Referenced from: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _futimens
Referenced from: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar
Expected in: /usr/lib/libSystem.B.dylib
0 llvm-ar 0x000000010146e138 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 llvm-ar 0x000000010146d366 llvm::sys::RunSignalHandlers() + 86
2 llvm-ar 0x000000010146e77e SignalHandler(int) + 366
3 libsystem_platform.dylib 0x00007fffc01d7b3a _sigtramp + 26
4 libsystem_platform.dylib 0x000000010dae3b4d _sigtramp + 1301332013
5 libsystem_platform.dylib 0x000000010daee464 _sigtramp + 1301375300
6 libsystem_platform.dylib 0x000000010dac9793 _sigtramp + 1301224563
7 libsystem_platform.dylib 0x000000010dac989e _sigtramp + 1301224830
8 libdyld.dylib 0x00007fffbffc4282 dyld_stub_binder + 282
9 llvm-ar 0x00000001016b6358 (anonymous namespace)::DarwinX86AsmBackend::getCompactUnwindRegNum(unsigned int) const::CU64BitRegs + 12850
10 llvm-ar 0x00000001012f033c performOperation(ArchiveOperation, llvm::object::Archive*, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::vector<llvm::NewArchiveMember, std::__1::allocator<llvm::NewArchiveMember> >*) + 4156
11 llvm-ar 0x00000001012eece6 performOperation(ArchiveOperation, std::__1::vector<llvm::NewArchiveMember, std::__1::allocator<llvm::NewArchiveMember> >*) + 1126
12 llvm-ar 0x00000001012ec599 main + 361
13 libdyld.dylib 0x00007fffbffc8235 start + 1
Stack dump:
0. Program arguments: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar xo /Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/librand-1efbcfd8938372b6.rlib
extract archive contents(/Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libstd_unicode-cfbd6648f7db2ee5.rlib) failed with error: llvm-ar failed to extract file(s) ['/private/var/folders/ss/x9rj8hxn6rx0xb0jq3qk1nyd77n725/T/emscripten_temp_Nn6f4y_archive_contents/rust.metadata.bin', '/private/var/folders/ss/x9rj8hxn6rx0xb0jq3qk1nyd77n725/T/emscripten_temp_Nn6f4y_archive_contents/std_unicode-cfbd6648f7db2ee5.0.bytecode.deflate'] from archive file /Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libstd_unicode-cfbd6648f7db2ee5.rlib! Error:dyld: lazy symbol binding failed: Symbol not found: _futimens
Referenced from: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _futimens
Referenced from: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar
Expected in: /usr/lib/libSystem.B.dylib
0 llvm-ar 0x000000010c1ac138 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 llvm-ar 0x000000010c1ab366 llvm::sys::RunSignalHandlers() + 86
2 llvm-ar 0x000000010c1ac77e SignalHandler(int) + 366
3 libsystem_platform.dylib 0x00007fffc01d7b3a _sigtramp + 26
4 libsystem_platform.dylib 0x0000000112eb2b4d _sigtramp + 1389211693
5 libsystem_platform.dylib 0x0000000112ebd464 _sigtramp + 1389254980
6 libsystem_platform.dylib 0x0000000112e98793 _sigtramp + 1389104243
7 libsystem_platform.dylib 0x0000000112e9889e _sigtramp + 1389104510
8 libdyld.dylib 0x00007fffbffc4282 dyld_stub_binder + 282
9 llvm-ar 0x000000010c3f4358 (anonymous namespace)::DarwinX86AsmBackend::getCompactUnwindRegNum(unsigned int) const::CU64BitRegs + 12850
10 llvm-ar 0x000000010c02e33c performOperation(ArchiveOperation, llvm::object::Archive*, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::vector<llvm::NewArchiveMember, std::__1::allocator<llvm::NewArchiveMember> >*) + 4156
11 llvm-ar 0x000000010c02cce6 performOperation(ArchiveOperation, std::__1::vector<llvm::NewArchiveMember, std::__1::allocator<llvm::NewArchiveMember> >*) + 1126
12 llvm-ar 0x000000010c02a599 main + 361
13 libdyld.dylib 0x00007fffbffc8235 start + 1
14 libdyld.dylib 0x0000000000000003 start + 1073970639
Stack dump:
0. Program arguments: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar xo /Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libstd_unicode-cfbd6648f7db2ee5.rlib
extract archive contents(/Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/liballoc-ca07b617414dd0fa.rlib) failed with error: llvm-ar failed to extract file(s) ['/private/var/folders/ss/x9rj8hxn6rx0xb0jq3qk1nyd77n725/T/emscripten_temp_cCct0w_archive_contents/rust.metadata.bin', '/private/var/folders/ss/x9rj8hxn6rx0xb0jq3qk1nyd77n725/T/emscripten_temp_cCct0w_archive_contents/alloc-ca07b617414dd0fa.0.bytecode.deflate'] from archive file /Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/liballoc-ca07b617414dd0fa.rlib! Error:dyld: lazy symbol binding failed: Symbol not found: _futimens
Referenced from: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _futimens
Referenced from: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar
Expected in: /usr/lib/libSystem.B.dylib
0 llvm-ar 0x0000000107956138 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 llvm-ar 0x0000000107955366 llvm::sys::RunSignalHandlers() + 86
2 llvm-ar 0x000000010795677e SignalHandler(int) + 366
3 libsystem_platform.dylib 0x00007fffc01d7b3a _sigtramp + 26
4 libsystem_platform.dylib 0x0000000110136b4d _sigtramp + 1341517869
5 libsystem_platform.dylib 0x0000000110141464 _sigtramp + 1341561156
6 libsystem_platform.dylib 0x000000011011c793 _sigtramp + 1341410419
7 libsystem_platform.dylib 0x000000011011c89e _sigtramp + 1341410686
8 libdyld.dylib 0x00007fffbffc4282 dyld_stub_binder + 282
9 llvm-ar 0x0000000107b9e358 (anonymous namespace)::DarwinX86AsmBackend::getCompactUnwindRegNum(unsigned int) const::CU64BitRegs + 12850
10 llvm-ar 0x00000001077d833c performOperation(ArchiveOperation, llvm::object::Archive*, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::vector<llvm::NewArchiveMember, std::__1::allocator<llvm::NewArchiveMember> >*) + 4156
11 llvm-ar 0x00000001077d6ce6 performOperation(ArchiveOperation, std::__1::vector<llvm::NewArchiveMember, std::__1::allocator<llvm::NewArchiveMember> >*) + 1126
12 llvm-ar 0x00000001077d4599 main + 361
13 libdyld.dylib 0x00007fffbffc8235 start + 1
Stack dump:
0. Program arguments: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar xo /Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/liballoc-ca07b617414dd0fa.rlib
extract archive contents(/Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/liballoc_system-68e33a366943aef4.rlib) failed with error: llvm-ar failed to extract file(s) ['/private/var/folders/ss/x9rj8hxn6rx0xb0jq3qk1nyd77n725/T/emscripten_temp_fUCxR6_archive_contents/rust.metadata.bin', '/private/var/folders/ss/x9rj8hxn6rx0xb0jq3qk1nyd77n725/T/emscripten_temp_fUCxR6_archive_contents/alloc_system-68e33a366943aef4.0.bytecode.deflate'] from archive file /Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/liballoc_system-68e33a366943aef4.rlib! Error:dyld: lazy symbol binding failed: Symbol not found: _futimens
Referenced from: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _futimens
Referenced from: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar
Expected in: /usr/lib/libSystem.B.dylib
0 llvm-ar 0x0000000103229138 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 llvm-ar 0x0000000103228366 llvm::sys::RunSignalHandlers() + 86
2 llvm-ar 0x000000010322977e SignalHandler(int) + 366
3 libsystem_platform.dylib 0x00007fffc01d7b3a _sigtramp + 26
4 libsystem_platform.dylib 0x0000000107c2bb4d _sigtramp + 1202012205
5 libsystem_platform.dylib 0x0000000107c36464 _sigtramp + 1202055492
6 libsystem_platform.dylib 0x0000000107c11793 _sigtramp + 1201904755
7 libsystem_platform.dylib 0x0000000107c1189e _sigtramp + 1201905022
8 libdyld.dylib 0x00007fffbffc4282 dyld_stub_binder + 282
9 llvm-ar 0x0000000103471358 (anonymous namespace)::DarwinX86AsmBackend::getCompactUnwindRegNum(unsigned int) const::CU64BitRegs + 12850
10 llvm-ar 0x00000001030ab33c performOperation(ArchiveOperation, llvm::object::Archive*, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::vector<llvm::NewArchiveMember, std::__1::allocator<llvm::NewArchiveMember> >*) + 4156
11 llvm-ar 0x00000001030a9ce6 performOperation(ArchiveOperation, std::__1::vector<llvm::NewArchiveMember, std::__1::allocator<llvm::NewArchiveMember> >*) + 1126
12 llvm-ar 0x00000001030a7599 main + 361
13 libdyld.dylib 0x00007fffbffc8235 start + 1
14 libdyld.dylib 0x0000000000000003 start + 1073970639
Stack dump:
0. Program arguments: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar xo /Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/liballoc_system-68e33a366943aef4.rlib
extract archive contents(/Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libstd-f4594d3e53dcb114.rlib) failed with error: llvm-ar failed to extract file(s) ['/private/var/folders/ss/x9rj8hxn6rx0xb0jq3qk1nyd77n725/T/emscripten_temp_CJwaUu_archive_contents/rust.metadata.bin', '/private/var/folders/ss/x9rj8hxn6rx0xb0jq3qk1nyd77n725/T/emscripten_temp_CJwaUu_archive_contents/std-f4594d3e53dcb114.0.bytecode.deflate'] from archive file /Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libstd-f4594d3e53dcb114.rlib! Error:dyld: lazy symbol binding failed: Symbol not found: _futimens
Referenced from: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _futimens
Referenced from: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar
Expected in: /usr/lib/libSystem.B.dylib
0 llvm-ar 0x000000010508c138 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 llvm-ar 0x000000010508b366 llvm::sys::RunSignalHandlers() + 86
2 llvm-ar 0x000000010508c77e SignalHandler(int) + 366
3 libsystem_platform.dylib 0x00007fffc01d7b3a _sigtramp + 26
4 libsystem_platform.dylib 0x000000010c1c4b4d _sigtramp + 1274990637
5 libsystem_platform.dylib 0x000000010c1cf464 _sigtramp + 1275033924
6 libsystem_platform.dylib 0x000000010c1aa793 _sigtramp + 1274883187
7 libsystem_platform.dylib 0x000000010c1aa89e _sigtramp + 1274883454
8 libdyld.dylib 0x00007fffbffc4282 dyld_stub_binder + 282
9 llvm-ar 0x00000001052d4358 (anonymous namespace)::DarwinX86AsmBackend::getCompactUnwindRegNum(unsigned int) const::CU64BitRegs + 12850
10 llvm-ar 0x0000000104f0e33c performOperation(ArchiveOperation, llvm::object::Archive*, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::vector<llvm::NewArchiveMember, std::__1::allocator<llvm::NewArchiveMember> >*) + 4156
11 llvm-ar 0x0000000104f0cce6 performOperation(ArchiveOperation, std::__1::vector<llvm::NewArchiveMember, std::__1::allocator<llvm::NewArchiveMember> >*) + 1126
12 llvm-ar 0x0000000104f0a599 main + 361
13 libdyld.dylib 0x00007fffbffc8235 start + 1
Stack dump:
0. Program arguments: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar xo /Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libstd-f4594d3e53dcb114.rlib
extract archive contents(/Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/liblibc-88c194c15fdb6521.rlib) failed with error: llvm-ar failed to extract file(s) ['/private/var/folders/ss/x9rj8hxn6rx0xb0jq3qk1nyd77n725/T/emscripten_temp_mEKXWd_archive_contents/rust.metadata.bin', '/private/var/folders/ss/x9rj8hxn6rx0xb0jq3qk1nyd77n725/T/emscripten_temp_mEKXWd_archive_contents/libc-88c194c15fdb6521.0.bytecode.deflate'] from archive file /Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/liblibc-88c194c15fdb6521.rlib! Error:dyld: lazy symbol binding failed: Symbol not found: _futimens
Referenced from: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _futimens
Referenced from: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar
Expected in: /usr/lib/libSystem.B.dylib
0 llvm-ar 0x00000001054d6138 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 llvm-ar 0x00000001054d5366 llvm::sys::RunSignalHandlers() + 86
2 llvm-ar 0x00000001054d677e SignalHandler(int) + 366
3 libsystem_platform.dylib 0x00007fffc01d7b3a _sigtramp + 26
4 libsystem_platform.dylib 0x000000011160bb4d _sigtramp + 1363361837
5 libsystem_platform.dylib 0x0000000111616464 _sigtramp + 1363405124
6 libsystem_platform.dylib 0x00000001115f1793 _sigtramp + 1363254387
7 libsystem_platform.dylib 0x00000001115f189e _sigtramp + 1363254654
8 libdyld.dylib 0x00007fffbffc4282 dyld_stub_binder + 282
9 llvm-ar 0x000000010571e358 (anonymous namespace)::DarwinX86AsmBackend::getCompactUnwindRegNum(unsigned int) const::CU64BitRegs + 12850
10 llvm-ar 0x000000010535833c performOperation(ArchiveOperation, llvm::object::Archive*, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::vector<llvm::NewArchiveMember, std::__1::allocator<llvm::NewArchiveMember> >*) + 4156
11 llvm-ar 0x0000000105356ce6 performOperation(ArchiveOperation, std::__1::vector<llvm::NewArchiveMember, std::__1::allocator<llvm::NewArchiveMember> >*) + 1126
12 llvm-ar 0x0000000105354599 main + 361
13 libdyld.dylib 0x00007fffbffc8235 start + 1
Stack dump:
0. Program arguments: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar xo /Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/liblibc-88c194c15fdb6521.rlib
extract archive contents(/Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libcompiler_builtins-987729be881d4d32.rlib) failed with error: llvm-ar failed to extract file(s) ['/private/var/folders/ss/x9rj8hxn6rx0xb0jq3qk1nyd77n725/T/emscripten_temp_smgjDK_archive_contents/rust.metadata.bin', '/private/var/folders/ss/x9rj8hxn6rx0xb0jq3qk1nyd77n725/T/emscripten_temp_smgjDK_archive_contents/compiler_builtins-987729be881d4d32.0.bytecode.deflate'] from archive file /Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libcompiler_builtins-987729be881d4d32.rlib! Error:dyld: lazy symbol binding failed: Symbol not found: _futimens
Referenced from: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _futimens
Referenced from: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar
Expected in: /usr/lib/libSystem.B.dylib
0 llvm-ar 0x000000010c594138 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 llvm-ar 0x000000010c593366 llvm::sys::RunSignalHandlers() + 86
2 llvm-ar 0x000000010c59477e SignalHandler(int) + 366
3 libsystem_platform.dylib 0x00007fffc01d7b3a _sigtramp + 26
4 libsystem_platform.dylib 0x000000010ed69b4d _sigtramp + 1320755245
5 libsystem_platform.dylib 0x000000010ed74464 _sigtramp + 1320798532
6 libsystem_platform.dylib 0x000000010ed4f793 _sigtramp + 1320647795
7 libsystem_platform.dylib 0x000000010ed4f89e _sigtramp + 1320648062
8 libdyld.dylib 0x00007fffbffc4282 dyld_stub_binder + 282
9 llvm-ar 0x000000010c7dc358 (anonymous namespace)::DarwinX86AsmBackend::getCompactUnwindRegNum(unsigned int) const::CU64BitRegs + 12850
10 llvm-ar 0x000000010c41633c performOperation(ArchiveOperation, llvm::object::Archive*, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::vector<llvm::NewArchiveMember, std::__1::allocator<llvm::NewArchiveMember> >*) + 4156
11 llvm-ar 0x000000010c414ce6 performOperation(ArchiveOperation, std::__1::vector<llvm::NewArchiveMember, std::__1::allocator<llvm::NewArchiveMember> >*) + 1126
12 llvm-ar 0x000000010c412599 main + 361
13 libdyld.dylib 0x00007fffbffc8235 start + 1
Stack dump:
0. Program arguments: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar xo /Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libcompiler_builtins-987729be881d4d32.rlib
extract archive contents(/Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libcore-687e6a964d22cbb4.rlib) failed with error: llvm-ar failed to extract file(s) ['/private/var/folders/ss/x9rj8hxn6rx0xb0jq3qk1nyd77n725/T/emscripten_temp_I6YX8R_archive_contents/rust.metadata.bin', '/private/var/folders/ss/x9rj8hxn6rx0xb0jq3qk1nyd77n725/T/emscripten_temp_I6YX8R_archive_contents/core-687e6a964d22cbb4.0.bytecode.deflate'] from archive file /Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libcore-687e6a964d22cbb4.rlib! Error:dyld: lazy symbol binding failed: Symbol not found: _futimens
Referenced from: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _futimens
Referenced from: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar
Expected in: /usr/lib/libSystem.B.dylib
0 llvm-ar 0x000000010699a138 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 llvm-ar 0x0000000106999366 llvm::sys::RunSignalHandlers() + 86
2 llvm-ar 0x000000010699a77e SignalHandler(int) + 366
3 libsystem_platform.dylib 0x00007fffc01d7b3a _sigtramp + 26
4 libsystem_platform.dylib 0x0000000114233b4d _sigtramp + 1409663021
5 libsystem_platform.dylib 0x000000011423e464 _sigtramp + 1409706308
6 libsystem_platform.dylib 0x0000000114219793 _sigtramp + 1409555571
7 libsystem_platform.dylib 0x000000011421989e _sigtramp + 1409555838
8 libdyld.dylib 0x00007fffbffc4282 dyld_stub_binder + 282
9 llvm-ar 0x0000000106be2358 (anonymous namespace)::DarwinX86AsmBackend::getCompactUnwindRegNum(unsigned int) const::CU64BitRegs + 12850
10 llvm-ar 0x000000010681c33c performOperation(ArchiveOperation, llvm::object::Archive*, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::vector<llvm::NewArchiveMember, std::__1::allocator<llvm::NewArchiveMember> >*) + 4156
11 llvm-ar 0x000000010681ace6 performOperation(ArchiveOperation, std::__1::vector<llvm::NewArchiveMember, std::__1::allocator<llvm::NewArchiveMember> >*) + 1126
12 llvm-ar 0x0000000106818599 main + 361
13 libdyld.dylib 0x00007fffbffc8235 start + 1
Stack dump:
0. Program arguments: /SAPDevelop/src/Swift2WebAssembly/emsdk/clang/fastcomp/build_incoming_64/bin/llvm-ar xo /Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libcore-687e6a964d22cbb4.rlib
Traceback (most recent call last):
File "/SAPDevelop/src/Swift2WebAssembly/emsdk/emscripten/incoming/emcc", line 13, in <module>
emcc.run()
File "/SAPDevelop/src/Swift2WebAssembly/emsdk/emscripten/incoming/emcc.py", line 1419, in run
final = shared.Building.link(linker_inputs, DEFAULT_FINAL, force_archive_contents=force_archive_contents, temp_files=misc_temp_files, just_calculate=just_calculate)
File "/SAPDevelop/src/Swift2WebAssembly/emsdk/emscripten/incoming/tools/shared.py", line 1774, in link
Building.read_link_inputs(filter(lambda x: not x.startswith('-'), files))
File "/SAPDevelop/src/Swift2WebAssembly/emsdk/emscripten/incoming/tools/shared.py", line 1700, in read_link_inputs
raise Exception('llvm-ar failed on archive ' + archive_names[n] + '!')
Exception: llvm-ar failed on archive /Users/i852946/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/libstd-f4594d3e53dcb114.rlib!
error: aborting due to previous error
I'm having the same issue.
rustup 1.6.0, emcc 1.37.21, osx 10.12.6
Command:
cargo build --target=wasm32-unknown-emscripten
Code:
fn main() {
println!("Hello world!");
}
Run into the same issue on mac 10.12.6, rustc version 1.22.1.
This may be an issue of emcc, as I see the same error from running one of official tutorials.
Same issue here.
It looks like this was fixed on Emscripten side emscripten-core/emscripten#5418
A pretty huge amount has changed since this was first opened, so I'm going to close this as "pretty likely stale". If it reproduces still though feel free to reopen!