mkdir /tmp/rustler_test
cd /tmp/rustler_test
git clone https://github.com/hansihe/Rustler.git
git clone https://github.com/hansihe/Rustler_Example.git
cd Rustler_Example/native
rustup override add nightly-2016-05-07-x86_64-apple-darwin
Updating registry `https://github.com/rust-lang/crates.io-index`
Compiling libc v0.2.11
Compiling easy-plugin v0.3.4
Compiling lazy_static v0.1.16
Compiling aster v0.16.0
Compiling ruster_unsafe v0.4.0
Compiling rustler v0.8.3 (file:///private/tmp/rustler_test/Rustler)
/private/tmp/rustler_test/Rustler/src/codegen_runtime.rs:8:5: 8:24 warning: use of deprecated item: renamed to `catch_unwind`, #[warn(deprecated)] on by default
/private/tmp/rustler_test/Rustler/src/codegen_runtime.rs:8 use std::panic::recover;
^~~~~~~~~~~~~~~~~~~
/private/tmp/rustler_test/Rustler/src/codegen_runtime.rs:23:51: 23:58 warning: use of deprecated item: renamed to `catch_unwind`, #[warn(deprecated)] on by default
/private/tmp/rustler_test/Rustler/src/codegen_runtime.rs:23 let result: ::std::thread::Result<NIF_TERM> = recover(|| {
^~~~~~~
Compiling rustler_codegen v0.8.3 (file:///private/tmp/rustler_test/Rustler/rustler_codegen)
/private/tmp/rustler_test/Rustler/rustler_codegen/src/resource.rs:66:13: 66:20 warning: unused variable: `builder`, #[warn(unused_variables)] on by default
/private/tmp/rustler_test/Rustler/rustler_codegen/src/resource.rs:66 let builder = ::aster::AstBuilder::new().span(span);
^~~~~~~
/private/tmp/rustler_test/Rustler/rustler_codegen/src/resource.rs:66:13: 66:20 note: in this expansion of easy_plugin! (defined in /private/tmp/rustler_test/Rustler/rustler_codegen/src/lib.rs)
Compiling native v0.1.0 (file:///private/tmp/rustler_test/Rustler_Example/native)
src/lib.rs:31:26: 31:35 warning: unused variable: `load_info`, #[warn(unused_variables)] on by default
src/lib.rs:31 fn on_load(env: &NifEnv, load_info: NifTerm) -> bool {
^~~~~~~~~
src/lib.rs:68:46: 68:50 warning: unused variable: `args`, #[warn(unused_variables)] on by default
src/lib.rs:68 fn make_resource_struct<'a>(env: &'a NifEnv, args: &Vec<NifTerm>) -> Result<NifTerm<'a>, NifError> {
^~~~
src/lib.rs:80:37: 80:41 warning: unused variable: `args`, #[warn(unused_variables)] on by default
src/lib.rs:80 fn string_test<'a>(env: &'a NifEnv, args: &Vec<NifTerm>) -> Result<NifTerm<'a>, NifError> {
^~~~
error: linking with `cc` failed: exit code: 1
note: "cc" "-m64" "-L" "/Users/hezhiqiang/.multirust/toolchains/nightly-2016-05-07-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/private/tmp/rustler_test/Rustler_Example/native/target/debug/rust_nif.0.o" "-o" "/private/tmp/rustler_test/Rustler_Example/native/target/debug/librust_nif.dylib" "/private/tmp/rustler_test/Rustler_Example/native/target/debug/rust_nif.metadata.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/private/tmp/rustler_test/Rustler_Example/native/target/debug" "-L" "/private/tmp/rustler_test/Rustler_Example/native/target/debug/deps" "-L" "/Users/hezhiqiang/.multirust/toolchains/nightly-2016-05-07-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "-Wl,-force_load,/var/folders/m3/vn1yyrfx7l36cq6p8msc6wt80000gn/T/rustc.qQqNIUT1sO3i/librustler-73f06792a5236e6b.rlib" "-Wl,-force_load,/var/folders/m3/vn1yyrfx7l36cq6p8msc6wt80000gn/T/rustc.qQqNIUT1sO3i/libruster_unsafe-256b634055e24e72.rlib" "-Wl,-force_load,/var/folders/m3/vn1yyrfx7l36cq6p8msc6wt80000gn/T/rustc.qQqNIUT1sO3i/liblibc-6b483f9a7097e9a4.rlib" "-Wl,-force_load,/var/folders/m3/vn1yyrfx7l36cq6p8msc6wt80000gn/T/rustc.qQqNIUT1sO3i/liblazy_static-3a04918be71c80ee.rlib" "-Wl,-force_load,/var/folders/m3/vn1yyrfx7l36cq6p8msc6wt80000gn/T/rustc.qQqNIUT1sO3i/libstd-cb705824.rlib" "-Wl,-force_load,/var/folders/m3/vn1yyrfx7l36cq6p8msc6wt80000gn/T/rustc.qQqNIUT1sO3i/libcollections-cb705824.rlib" "-Wl,-force_load,/var/folders/m3/vn1yyrfx7l36cq6p8msc6wt80000gn/T/rustc.qQqNIUT1sO3i/librustc_unicode-cb705824.rlib" "-Wl,-force_load,/var/folders/m3/vn1yyrfx7l36cq6p8msc6wt80000gn/T/rustc.qQqNIUT1sO3i/librand-cb705824.rlib" "-Wl,-force_load,/var/folders/m3/vn1yyrfx7l36cq6p8msc6wt80000gn/T/rustc.qQqNIUT1sO3i/liballoc-cb705824.rlib" "-Wl,-force_load,/var/folders/m3/vn1yyrfx7l36cq6p8msc6wt80000gn/T/rustc.qQqNIUT1sO3i/liballoc_system-cb705824.rlib" "-Wl,-force_load,/var/folders/m3/vn1yyrfx7l36cq6p8msc6wt80000gn/T/rustc.qQqNIUT1sO3i/liblibc-cb705824.rlib" "-Wl,-force_load,/var/folders/m3/vn1yyrfx7l36cq6p8msc6wt80000gn/T/rustc.qQqNIUT1sO3i/libcore-cb705824.rlib" "-l" "System" "-l" "pthread" "-l" "c" "-l" "m" "-dynamiclib" "-Wl,-dylib" "-l" "compiler-rt"
note: Undefined symbols for architecture x86_64:
"_enif_make_double", referenced from:
rustler::wrapper::nif_interface::enif_make_double::h2955724b75cecc61 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
_$LT$f64$u20$as$u20$types..NifEncoder$GT$::encode::h1b4452714d6d4b10 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
_$LT$f32$u20$as$u20$types..NifEncoder$GT$::encode::h1c2ffc4881c2903f in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_get_ulong", referenced from:
ruster_unsafe::enif_get_uint64::h6a6efcdf317b18c4 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
ruster_unsafe::enif_get_uint64::h6a6efcdf317b18c4 in libruster_unsafe-256b634055e24e72.rlib(ruster_unsafe-256b634055e24e72.0.o)
"_enif_make_ulong", referenced from:
ruster_unsafe::enif_make_uint64::ha34647124f8445ad in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
ruster_unsafe::enif_make_uint64::ha34647124f8445ad in libruster_unsafe-256b634055e24e72.rlib(ruster_unsafe-256b634055e24e72.0.o)
"_enif_make_long", referenced from:
ruster_unsafe::enif_make_int64::h19b8d04a69049b6a in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
ruster_unsafe::enif_make_int64::h19b8d04a69049b6a in libruster_unsafe-256b634055e24e72.rlib(ruster_unsafe-256b634055e24e72.0.o)
"_enif_get_uint", referenced from:
rustler::wrapper::nif_interface::enif_get_uint::hec8265bbe0c51e0e in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
_$LT$u32$u20$as$u20$types..NifDecoder$LT$$u27$a$GT$$GT$::decode::hc0ae96bb1a8a125d in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
_$LT$u8$u20$as$u20$types..NifDecoder$LT$$u27$a$GT$$GT$::decode::h121ec11005986bac in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
_$LT$u16$u20$as$u20$types..NifDecoder$LT$$u27$a$GT$$GT$::decode::hafda0f180ac6d8ca in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_get_int", referenced from:
rustler::wrapper::nif_interface::enif_get_int::h55571de701762d16 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
_$LT$i32$u20$as$u20$types..NifDecoder$LT$$u27$a$GT$$GT$::decode::hfabef9a46f52c06d in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
_$LT$i8$u20$as$u20$types..NifDecoder$LT$$u27$a$GT$$GT$::decode::h233811501aa78314 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
_$LT$i16$u20$as$u20$types..NifDecoder$LT$$u27$a$GT$$GT$::decode::hb8e170e909e86d7d in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_make_int", referenced from:
rustler::wrapper::nif_interface::enif_make_int::h7f7fa530497562c9 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
_$LT$i32$u20$as$u20$types..NifEncoder$GT$::encode::ha1c059136fd52252 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
_$LT$i8$u20$as$u20$types..NifEncoder$GT$::encode::hdf7d5ef7a23e6450 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
_$LT$i16$u20$as$u20$types..NifEncoder$GT$::encode::h4a4b9280ca8325e2 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_keep_resource", referenced from:
rustler::wrapper::nif_interface::enif_keep_resource::h48259ec58ff12602 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_release_resource", referenced from:
rustler::wrapper::nif_interface::enif_release_resource::h1bed4c24409b5214 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_make_resource", referenced from:
rustler::wrapper::nif_interface::enif_make_resource::hbdef75d2a6655bea in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_alloc_resource", referenced from:
rustler::wrapper::nif_interface::enif_alloc_resource::hcafb450777244b62 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_make_copy", referenced from:
rustler::wrapper::nif_interface::enif_make_copy::h69214799fa3b9645 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_is_atom", referenced from:
rustler::wrapper::nif_interface::enif_is_atom::h4c1e27a13c126b7e in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_get_list_cell", referenced from:
rustler::wrapper::nif_interface::enif_get_list_cell::h1aab0cf182fd72cd in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_make_uint", referenced from:
rustler::wrapper::nif_interface::enif_make_uint::h2f5d391bf13c10e8 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
_$LT$u32$u20$as$u20$types..NifEncoder$GT$::encode::h14d1119c142b082c in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
_$LT$u8$u20$as$u20$types..NifEncoder$GT$::encode::h39df33241c8c172a in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
_$LT$u16$u20$as$u20$types..NifEncoder$GT$::encode::hfd6c432f2c86f33a in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_make_map_update", referenced from:
rustler::wrapper::nif_interface::enif_make_map_update::hb2ec93364aa738a7 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_get_map_value", referenced from:
rustler::wrapper::nif_interface::enif_get_map_value::hf297cb65056a574d in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_make_map_put", referenced from:
rustler::wrapper::nif_interface::enif_make_map_put::h9539e1550d86790f in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_open_resource_type", referenced from:
rustler::wrapper::nif_interface::enif_open_resource_type::h196ab420ef77a458 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_make_new_map", referenced from:
rustler::wrapper::nif_interface::enif_make_new_map::h04eb30055d0433ea in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_make_badarg", referenced from:
rustler::wrapper::nif_interface::enif_make_badarg::hfd47f421776299e7 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_get_tuple", referenced from:
rustler::wrapper::nif_interface::enif_get_tuple::h496dbde1a06b26fa in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_get_long", referenced from:
ruster_unsafe::enif_get_int64::h7322dfab1d51cfe0 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
ruster_unsafe::enif_get_int64::h7322dfab1d51cfe0 in libruster_unsafe-256b634055e24e72.rlib(ruster_unsafe-256b634055e24e72.0.o)
"_enif_get_map_size", referenced from:
rustler::wrapper::nif_interface::enif_get_map_size::hd15a7dd43835f5fa in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_alloc_env", referenced from:
rustler::wrapper::nif_interface::enif_alloc_env::h104eae5c02c87a95 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_make_binary", referenced from:
rustler::wrapper::nif_interface::enif_make_binary::h4df56732cd29a1d9 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
rustler::binary::NifBinary::from_owned::hd68ef82867d453c3 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_alloc_binary", referenced from:
rustler::wrapper::nif_interface::enif_alloc_binary::hc2f02f5b05daa256 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
rustler::binary::OwnedNifBinary::alloc::h83a4138714c8e953 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_release_binary", referenced from:
rustler::wrapper::nif_interface::enif_release_binary::hcf385eda5649cf90 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
_$LT$binary..OwnedNifBinary$u20$as$u20$std..ops..Drop$GT$::drop::h6787ff98ae72ec84 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_get_list_length", referenced from:
rustler::wrapper::nif_interface::enif_get_list_length::he2e2177223e5457e in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_is_empty_list", referenced from:
rustler::wrapper::nif_interface::enif_is_empty_list::hf97958a62da19d09 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_get_double", referenced from:
rustler::wrapper::nif_interface::enif_get_double::h8276570c21d114b6 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
_$LT$f64$u20$as$u20$types..NifDecoder$LT$$u27$a$GT$$GT$::decode::h6c5508c0ba78eb78 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
_$LT$f32$u20$as$u20$types..NifDecoder$LT$$u27$a$GT$$GT$::decode::ha05b75d016c816c4 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_raise_exception", referenced from:
rustler::wrapper::nif_interface::enif_raise_exception::h72fc005bcd6c2a0a in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_is_list", referenced from:
rustler::wrapper::nif_interface::enif_is_list::h76c50d412d0ac05d in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_make_tuple_from_array", referenced from:
rustler::wrapper::nif_interface::enif_make_tuple_from_array::hd9d4712e9e6f5a51 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_make_map_remove", referenced from:
rustler::wrapper::nif_interface::enif_make_map_remove::hffb914012c16730b in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_inspect_binary", referenced from:
rustler::wrapper::nif_interface::enif_inspect_binary::h3e37ee6fd8a4fc76 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
rustler::binary::NifBinary::from_term::ha2e3c6a8a7e79c98 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_get_resource", referenced from:
rustler::wrapper::nif_interface::enif_get_resource::he472a38f7fa68a5b in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
"_enif_make_atom_len", referenced from:
rustler::wrapper::nif_interface::enif_make_atom_len::h45eb891df1a70a11 in librustler-73f06792a5236e6b.rlib(rustler-73f06792a5236e6b.0.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: aborting due to previous error
error: Could not compile `native`.
To learn more, run the command again with --verbose.