Error Description
describe which command you ran
Using compiled version of Juice (Commit 4dbf539 (21-Aug-17)) with
cargo build --features=native --no-default-features
Built successfully.
Attempted to build a default test Rust program using Juice as a dependency in the TOML, with
juice = {path = "../../BitBucket/juice/"}
Which directs to the BitBucket version of Juice.
This seems related to openblas vs blas, as mentioned in Environment/Native Related Issues.
Program is:
extern crate juice;
fn main() {
println!("hello world");
}
TOML is:
(...)
[dependencies]
nn = "0.1.6"
coaster = "0.1.0"
coaster-nn = "0.4.0"
juice = {path = "../../BitBucket/juice/"}
[features]
default = ["native"]
native = ["juice/native"]
What should have happened
Successful build, with warning of unused crate.
What happened
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-m64" "-L" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/deep_learning-2179b3ff6a25a3b2.0.o" "-o" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/deep_learning-2179b3ff6a25a3b2" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps" "-L" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libjuice-76a0d0d4778ee247.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libcoaster_blas-e48d12b535504280.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libcapnp-cea9b1e207536b0f.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libbyteorder-4b33a51270316e1c.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libcoaster_nn-34b634248642aaf2.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libtimeit-88ca41b63903fa24.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libtime-b42059b58d782f84.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/liblog-653d9a3a0b7e9d0b.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libcoaster-84e7e6b8b2bcc1c3.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libbyteorder-7ac464879d42bb20.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libenum_primitive-8a3da1a6ee21c137.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libbitflags-e23c19204c484d23.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/liblazy_static-35b44458f059304c.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/librblas-b3994b8d1991b435.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libnum-9324c52ca75791ea.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libnum_rational-139c9a80f9301bf4.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libnum_bigint-8814a701f9d040e1.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/librand-0668ab5ce5d1cfb3.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libnum_complex-97d44be024c0a5d9.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/librustc_serialize-a7771718d4ee73a5.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libnum_iter-3ba3b370d4563109.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libnum_integer-82c2fec7ed3ae431.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libnum_traits-b6a66e4d76196aca.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/liblibc-750342d372c7156a.rlib" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-438eba4cd7d88a45.rlib" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-00160610bfa2c7b4.rlib" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libunwind-88eece318c5ccb15.rlib" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librand-646fe8114e6965a2.rlib" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcollections-7d6da376f6405c93.rlib" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc-ab03bba0be78edaa.rlib" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3d46a711e5badb84.rlib" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liblibc-31c7158cd96c571c.rlib" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd_unicode-a732f07ce6fa7392.rlib" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcore-ee2a935baf6741f5.rlib" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-53f5ee584666574a.rlib" "-l" "openblas" "-l" "System" "-l" "resolv" "-l" "pthread" "-l" "c" "-l" "m"
= note: ld: library not found for -lopenblas
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Also tried using the default version of Juice with juice = { version = "0.2.2", default-features = false }
in the TOML, which results in a separate failure to build with a warning about the CUDA library, as follows:
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-m64" "-L" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/deep_learning-2179b3ff6a25a3b2.0.o" "-o" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/deep_learning-2179b3ff6a25a3b2" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps" "-L" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libjuice-1bc8b54a3308a0b6.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libcoaster_blas-f0128de324e54c02.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libcapnp-cea9b1e207536b0f.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libbyteorder-4b33a51270316e1c.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libcoaster_nn-03d5f8a863bd35c1.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libtimeit-88ca41b63903fa24.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libtime-b42059b58d782f84.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/liblog-653d9a3a0b7e9d0b.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libcoaster-fbdf93f1b7e0c6c1.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libbyteorder-7ac464879d42bb20.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libenum_primitive-8a3da1a6ee21c137.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libbitflags-e23c19204c484d23.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/liblazy_static-35b44458f059304c.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/librblas-55b5430647968442.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libnum-9324c52ca75791ea.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libnum_rational-139c9a80f9301bf4.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libnum_bigint-8814a701f9d040e1.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/librand-0668ab5ce5d1cfb3.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libnum_complex-97d44be024c0a5d9.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/librustc_serialize-a7771718d4ee73a5.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libnum_iter-3ba3b370d4563109.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libnum_integer-82c2fec7ed3ae431.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/libnum_traits-b6a66e4d76196aca.rlib" "/Users/lissa.hyacinth/Rust/DeepLearning/target/debug/deps/liblibc-750342d372c7156a.rlib" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-438eba4cd7d88a45.rlib" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-00160610bfa2c7b4.rlib" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libunwind-88eece318c5ccb15.rlib" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librand-646fe8114e6965a2.rlib" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcollections-7d6da376f6405c93.rlib" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc-ab03bba0be78edaa.rlib" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-3d46a711e5badb84.rlib" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liblibc-31c7158cd96c571c.rlib" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd_unicode-a732f07ce6fa7392.rlib" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcore-ee2a935baf6741f5.rlib" "/Users/lissa.hyacinth/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-53f5ee584666574a.rlib" "-framework" "OpenCL" "-l" "cuda" "-l" "blas" "-l" "System" "-l" "resolv" "-l" "pthread" "-l" "c" "-l" "m"
= note: ld: library not found for -lcuda
clang: error: linker command failed with exit code 1 (use -v to see invocation)
CUDA is not installed, as local machine only supports native and openCL, so the error is expected, but Native should force use of native packages and not use the cuda library.
Describe in which context it happened
custom app, demo compilation, test run
Test run.
Environment
OS:
uname -a
Darwin C02T5172GVC8.local 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64
Mac OS Sierra 10.12.5
Native related issues:
pkg-config --libs --cflags blas
Package blas was not found in the pkg-config search path.
Perhaps you should add the directory containing `blas.pc'
to the PKG_CONFIG_PATH environment variable
No package 'blas' found
This seems related to the issue - I've already run
export PKG_CONFIG_PATH=/usr/local/opt/openblas/lib/pkgconfig
But openblas only has openblas.pc at that location, and won't have blas.pc.
And using openblas in the command returns:
pkg-config --libs --cflags openblas
-I/usr/local/Cellar/openblas/0.2.20/include -L/usr/local/Cellar/openblas/0.2.20/lib -lopenblas
OpenCL related issues:
clinfo
clinfo.txt
bug