energymon / energymon-rust

Rust abstractions over energymon-default C library
Apache License 2.0
0 stars 1 forks source link

Does not compile on OSX with nightly rust #4

Closed frewsxcv closed 8 years ago

frewsxcv commented 8 years ago
coreyf@frewbook-pro ~/D/r/energymon-rust (master)> cargo build
   Compiling libc v0.2.2
   Compiling pkg-config v0.3.6
   Compiling libc v0.1.12
   Compiling energy-monitor v0.1.0
   Compiling energymon-sys v0.1.0 (https://github.com/energymon/energymon-sys.git#92eaa056)
   Compiling energymon-default-sys v0.1.0 (https://github.com/energymon/energymon-sys.git#92eaa056)
   Compiling energymon v0.1.0 (file:///Users/coreyf/Development/rust/energymon-rust)
src/lib.rs:57:50: 57:82 error: mismatched types:
 expected `usize`,
    found `u64`
(expected usize,
    found u64) [E0308]
src/lib.rs:57                                                  mem::size_of_val(&buf) as size_t);
                                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lib.rs:57:50: 57:82 help: run `rustc --explain E0308` to see a detailed explanation
error: aborting due to previous error
Could not compile `energymon`.

To learn more, run the command again with --verbose.
coreyf@frewbook-pro ~/D/r/energymon-rust (master) [101]> rustc -Vv
rustc 1.6.0-nightly (aad4e5665 2015-12-05)
binary: rustc
commit-hash: aad4e5665e81a3ec998b3648d395d0eb99a7500b
commit-date: 2015-12-05
host: x86_64-apple-darwin
release: 1.6.0-nightly
connorimes commented 8 years ago

I guess I forgot to update this project to libc 0.2 as well (see #4). This error should be fixed with that. I don't have nightly rust builds. Please post back if it's still broken there. Thanks.