Skip to content

Instantly share code, notes, and snippets.

@olsonjeffery
Last active December 20, 2015 00:39
Show Gist options
  • Save olsonjeffery/6042901 to your computer and use it in GitHub Desktop.
Save olsonjeffery/6042901 to your computer and use it in GitHub Desktop.
rustc spew
jeff@mbp:~/src/sandbox$ rustc newsched_timer.rs
newsched_timer.rs:4:4: 4:19 warning: unused import [-W unused-imports (default)]
newsched_timer.rs:4 use std::option::*;
^~~~~~~~~~~~~~~
error: linking with `cc` failed with code 1
note: cc arguments: -L/home/jeff/lib/rustc/x86_64-unknown-linux-gnu/lib -m64 -o newsched_timer newsched_timer.o -L/home/jeff/lib/rustc/x86_64-unknown-linux-gnu/lib -lstd-6c65cf4b443341b1-0.8-pre -lrustrt -lrt -lpthread -lrt -ldl -lm -lmorestack -lrustrt -Wl,-rpath,$ORIGIN/../../lib/rustc/x86_64-unknown-linux-gnu/lib -Wl,-rpath,/home/jeff/lib/rustc/x86_64-unknown-linux-gnu/lib
note: newsched_timer.o: In function `main::_b34d73d589378df4::_0$x2e0':
newsched_timer.rc:(.text+0x69): undefined reference to `rt::io::timer::__extensions__::meth_29117::init::_5139afb69d2758a::_0$x2e8$x2dpre'
collect2: error: ld returned 1 exit status
error: aborting due to previous error
jeff@mbp:~/src/sandbox$ RUST_NEWRT=1 rustc newsched_timer.rs
Segmentation fault (core dumped)
jeff@mbp:~/src/sandbox$ rustc --version
rustc 0.8-pre (0d04aa7 2013-07-19 04:10:32 -0700)
host: x86_64-unknown-linux-gnu
jeff@mbp:~/src/sandbox$
use std::rt::rtio::{RtioTimer};
use std::rt::io::timer::{Timer};
use std::io::{println};
use std::option::*;
fn main()
println("blah!");
match Timer::init() {
Some(t) =>
t.sleep(3000),
None => assert!(false)
}
println("blah!");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment