Spotifyd / spotifyd-http

A web server that controls Spotify Connect devices.
38 stars 9 forks source link

Can't compile on archlinux #16

Closed jvkassi closed 7 years ago

jvkassi commented 7 years ago

Hello,

I have this error after launching this cargo build --release -j 1 --verbose

error[E0195]: lifetime parameters or bounds on method `to_mdb_value` do not match the trait declaration                                                  --> /home/jekas/.cargo/registry/src/github.com-1ecc6299db9ec823/lmdb-rs-0.7.2/src/traits.rs:55:5                                                        |                                                                                                                                                   55 | /     fn to_mdb_value<'b, 's>(&'s self) -> MdbValue<'b> {                                                                                         56 | |         unsafe {                                                                                                                                57 | |             MdbValue::new(mem::transmute(self.as_ptr()),                                                                                        58 | |                           self.len())                                                                                                           
59 | |         }                                                           
60 | |     }                                                               
   | |_____^ lifetimes do not match trait                                  

error: aborting due to previous error                                                                                                                  

error: Could not compile `lmdb-rs`.                                                                                                                    

Caused by:                                                                                                                                             
  process didn't exit successfully: `rustc --crate-name lmdb_rs /home/jekas/.cargo/registry/src/github.com-1ecc6299db9ec823/lmdb-rs-0.7.2/src/lib.rs --
crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=4a8e8f477ceca001 -C extra-filename=-4a8e8f477ceca001 --out-dir /home/jekas/dev/lang/node
js/spotify/spotifyd-http/target/release/deps -L dependency=/home/jekas/dev/lang/nodejs/spotify/spotifyd-http/target/release/deps --extern bitflags=/hom
e/jekas/dev/lang/nodejs/spotify/spotifyd-http/target/release/deps/libbitflags-d11cff7f1eb40828.rlib --extern log=/home/jekas/dev/lang/nodejs/spotify/sp
otifyd-http/target/release/deps/liblog-12ece4199ed1286f.rlib --extern regex=/home/jekas/dev/lang/nodejs/spotify/spotifyd-http/target/release/deps/libre
gex-a6073169727060f6.rlib --extern libc=/home/jekas/dev/lang/nodejs/spotify/spotifyd-http/target/release/deps/liblibc-f36de82e6d7996ad.rlib --extern li
blmdb_sys=/home/jekas/dev/lang/nodejs/spotify/spotifyd-http/target/release/deps/libliblmdb_sys-4e4a99cc01a771f8.rlib --cap-lints allow -L native=/home/
jekas/dev/lang/nodejs/spotify/spotifyd-http/target/release/build/liblmdb-sys-0bceb4b9ed334ea8/out` (exit code: 101)    
SimonTeixidor commented 7 years ago

Which version of rustc are you using?

In any case, I haven't been keeping this repo updated. I think you might be better off using this API, which should do the same thing. Although, I haven't tried it yet 😃

jvkassi commented 7 years ago

I got

rustc -V
rustc 1.18.0

It compiles now after

cargo update -p lmdb-rs