jackm321 / RustNN

A neural network crate
Apache License 2.0
332 stars 32 forks source link

Build is failing #3

Closed swiesend closed 9 years ago

swiesend commented 9 years ago
RustNN$ cargo build --verbose
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling threadpool v0.1.4
     Running `rustc /home/swiesend/.cargo/registry/src/github.com-1ecc6299db9ec823/threadpool-0.1.4/src/lib.rs --crate-name threadpool --crate-type lib -g -C metadata=213781c0d8fba90b -C extra-filename=-213781c0d8fba90b --out-dir /home/swiesend/workspace/rust/RustNN/target/debug/deps --emit=dep-info,link -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps -Awarnings`
   Compiling libc v0.1.6
     Running `rustc /home/swiesend/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.1.6/rust/src/liblibc/lib.rs --crate-name libc --crate-type lib -g --cfg feature="default" --cfg feature="cargo-build" -C metadata=9b7976990ae0dbd4 -C extra-filename=-9b7976990ae0dbd4 --out-dir /home/swiesend/workspace/rust/RustNN/target/debug/deps --emit=dep-info,link -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps -Awarnings`
   Compiling gcc v0.3.5
     Running `rustc /home/swiesend/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.5/src/lib.rs --crate-name gcc --crate-type lib -g -C metadata=982b24959a427c6e -C extra-filename=-982b24959a427c6e --out-dir /home/swiesend/workspace/rust/RustNN/target/debug/deps --emit=dep-info,link -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps -Awarnings`
   Compiling rustc-serialize v0.3.14
     Running `rustc /home/swiesend/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.14/src/lib.rs --crate-name rustc_serialize --crate-type lib -g -C metadata=9ef26f158d5284e0 -C extra-filename=-9ef26f158d5284e0 --out-dir /home/swiesend/workspace/rust/RustNN/target/debug/deps --emit=dep-info,link -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps -Awarnings`
   Compiling rand v0.3.8
     Running `rustc /home/swiesend/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.3.8/src/lib.rs --crate-name rand --crate-type lib -g -C metadata=b924d9fc5b3eb5b8 -C extra-filename=-b924d9fc5b3eb5b8 --out-dir /home/swiesend/workspace/rust/RustNN/target/debug/deps --emit=dep-info,link -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps --extern libc=/home/swiesend/workspace/rust/RustNN/target/debug/deps/liblibc-9b7976990ae0dbd4.rlib -Awarnings`
   Compiling time v0.1.25
     Running `rustc /home/swiesend/.cargo/registry/src/github.com-1ecc6299db9ec823/time-0.1.25/build.rs --crate-name build_script_build --crate-type bin -C prefer-dynamic -g --out-dir /home/swiesend/workspace/rust/RustNN/target/debug/build/time-e758cbe877e9589d --emit=dep-info,link -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps --extern gcc=/home/swiesend/workspace/rust/RustNN/target/debug/deps/libgcc-982b24959a427c6e.rlib -Awarnings`
     Running `/home/swiesend/workspace/rust/RustNN/target/debug/build/time-e758cbe877e9589d/build-script-build`
     Running `rustc /home/swiesend/.cargo/registry/src/github.com-1ecc6299db9ec823/time-0.1.25/src/lib.rs --crate-name time --crate-type lib -g -C metadata=e758cbe877e9589d -C extra-filename=-e758cbe877e9589d --out-dir /home/swiesend/workspace/rust/RustNN/target/debug/deps --emit=dep-info,link -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps --extern libc=/home/swiesend/workspace/rust/RustNN/target/debug/deps/liblibc-9b7976990ae0dbd4.rlib -Awarnings -L native=/home/swiesend/workspace/rust/RustNN/target/debug/build/time-e758cbe877e9589d/out -l static=time_helpers`
   Compiling nn v0.1.5 (file:///home/swiesend/workspace/rust/RustNN)
     Running `rustc src/lib.rs --crate-name nn --crate-type lib -g --out-dir /home/swiesend/workspace/rust/RustNN/target/debug --emit=dep-info,link -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps --extern time=/home/swiesend/workspace/rust/RustNN/target/debug/deps/libtime-e758cbe877e9589d.rlib --extern threadpool=/home/swiesend/workspace/rust/RustNN/target/debug/deps/libthreadpool-213781c0d8fba90b.rlib --extern rustc_serialize=/home/swiesend/workspace/rust/RustNN/target/debug/deps/librustc_serialize-9ef26f158d5284e0.rlib --extern rand=/home/swiesend/workspace/rust/RustNN/target/debug/deps/librand-b924d9fc5b3eb5b8.rlib -L native=/home/swiesend/workspace/rust/RustNN/target/debug/build/time-e758cbe877e9589d/out`
src/lib.rs:70:18: 70:28 error: unresolved import `threadpool::ScopedPool`. There is no `ScopedPool` in `threadpool`
src/lib.rs:70 use threadpool::{ScopedPool};
                               ^~~~~~~~~~
error: aborting due to previous error
Could not compile `nn`.

Hey Jack,

I'm very new to rust and still don't know how to attack build issues. Can you help me out with that one? I don't understand well why its not working, although the ScopedPool seems to be implemented in the threadpool lib as pub struct ScopedPool<'pool> : https://github.com/rust-lang/threadpool/blob/master/src/lib.rs

rustc --version
rustc 1.0.0-beta.4 (850151a75 2015-04-30) (built 2015-04-30)
jackm321 commented 9 years ago

Hey swiesend,

I think the problem is that since I last update this, scoped threads were discovered to be unsound and so have been marked as unstable again so won't compile. The fix would be to replace the ScopedPool which I'll do as soon as I have time, hopefully by tomorrow.

Jack

swiesend commented 9 years ago

In the IRC channel they told me that I just have to add the scoped-pool feature in the dependencies like this:

[dependencies.threadpool]
version = "0.1"
features = ["scoped-pool"]

So that would only be a temporary solution?

jackm321 commented 9 years ago

I don't think that will work because scoped is still not allowed in beta. I tried that and got error: unstable feature...this feature may not be used in the beta release channel. It might work on nightly but I'm not sure.

jackm321 commented 9 years ago

I removed batch training so no multithreading for now but it is building. 26aff11c545c31a8eb39a5b1bb0e81ebf290f7da