I get some wierd architecture error when trying to build a simple hello world app on OS X 10.11.2 !
Just upgraded to 1.6, I dabbled in Rust a few months ago and didn't have issues like this.
Here's an example session:
cargo new myrust --bin
cd myrust
cargo build --verbose
Compiling myrust v0.1.0 (file:///Users/frank/myrust)
Running rustc src/main.rs --crate-name myrust --crate-type bin -g --out-dir /Users/frank/myrust/target/debug --emit=dep-info,link -L dependency=/Users/frank/myrust/target/debug -L dependency=/Users/frank/myrust/target/debug/deps
error: linking with cc
failed: exit code: 1
note: "cc" "-m64" "-L" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib" "/Users/frank/myrust/target/debug/myrust.0.o" "-o" "/Users/frank/myrust/target/debug/myrust" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/frank/myrust/target/debug" "-L" "/Users/frank/myrust/target/debug/deps" "-L" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libstd-ca9f0d77.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libcollections-ca9f0d77.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/librustc_unicode-ca9f0d77.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/librand-ca9f0d77.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liballoc-ca9f0d77.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-ca9f0d77.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liblibc-ca9f0d77.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libcore-ca9f0d77.rlib" "-l" "System" "-l" "pthread" "-l" "c" "-l" "m" "-l" "compiler-rt"
note: ld: targeted OS version does not support use of thread local variables in __ZN10sys_common11thread_info14current_thread20h67a0745d7f70577eJAsE for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: aborting due to previous error
Could not compile myrust
.
Caused by:
Process didn't exit successfully: rustc src/main.rs --crate-name myrust --crate-type bin -g --out-dir /Users/frank/myrust/target/debug --emit=dep-info,link -L dependency=/Users/frank/myrust/target/debug -L dependency=/Users/frank/myrust/target/debug/deps
(exit code: 101)
Any ideas what I should do?
Thanks!