Description
I get the following error when trying to build on WSL (Ubuntu 14.04)
mike@Mike-ZenBook:~/projects/grin$ cargo build --release
warning: An explicit [[bin]] section is specified in Cargo.toml which currently
disables Cargo from automatically inferring other binary targets.
This inference behavior will change in the Rust 2018 edition and the following
files will be included as a binary target:
- /home/mike/projects/grin/src/bin/client.rs
This is likely to break cargo build or cargo test as these files may not be
ready to be compiled as a binary target today. You can future-proof yourself
and disable this warning by addingautobins = false
to your [package]
section. You may also move the files to a location where Cargo would not
automatically infer them to be a target, such as in subfolders.For more information on this warning you can consult
rust-lang/cargo#5330
Compiling librocksdb-sys v5.11.3
Compiling croaring-sys v0.3.1
error: failed to run custom build command forlibrocksdb-sys v5.11.3
process didn't exit successfully:/home/mike/projects/grin/target/release/build/librocksdb-sys-142584821dfa73fb/build-script-build
(exit code: 101)
--- stdout
cargo:rerun-if-changed=build.rs
cargo:rerun-if-changed=rocksdb/
cargo:rerun-if-changed=snappy/
rocksdb/include/rocksdb/c.h:48:9: warning: #pragma once in main file, err: false--- stderr
thread 'main' panicked at 'function not loaded: clang_Type_getNumTemplateArguments', /home/mike/.cargo/registry/src/github.com-1ecc6299db9ec823/clang-sys-0.21.2/src/lib.rs:1456:1
note: Run withRUST_BACKTRACE=1
for a backtrace.warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command forcroaring-sys v0.3.1
process didn't exit successfully:/home/mike/projects/grin/target/release/build/croaring-sys-c3ed2cfb8ca9e426/build-script-build
(exit code: 101)
--- stdout
TARGET = Some("x86_64-unknown-linux-gnu")
OPT_LEVEL = Some("3")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-unknown-linux-gnu = None
CC_x86_64_unknown_linux_gnu = None
HOST_CC = None
CC = None
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CFLAGS_x86_64-unknown-linux-gnu = None
CFLAGS_x86_64_unknown_linux_gnu = None
HOST_CFLAGS = None
CFLAGS = None
DEBUG = Some("false")
running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-std=c11" "-march=native" "-O3" "-Wall" "-Wextra" "-o" "/home/mike/projects/grin/target/release/build/croaring-sys-7ab750b09faedb61/out/CRoaring/roaring.o" "-c" "CRoaring/roaring.c"
exit code: 0
TARGET = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
AR_x86_64-unknown-linux-gnu = None
AR_x86_64_unknown_linux_gnu = None
HOST_AR = None
AR = None
TARGET = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
running: "ar" "crs" "/home/mike/projects/grin/target/release/build/croaring-sys-7ab750b09faedb61/out/libroaring.a" "/home/mike/projects/grin/target/release/build/croaring-sys-7ab750b09faedb61/out/CRoaring/roaring.o"
exit code: 0
TARGET = Some("x86_64-unknown-linux-gnu")
cargo:rustc-link-lib=static=roaring
cargo:rustc-link-search=native=/home/mike/projects/grin/target/release/build/croaring-sys-7ab750b09faedb61/out--- stderr
thread 'main' panicked at 'function not loaded: clang_Type_getNumTemplateArguments', /home/mike/.cargo/registry/src/github.com-1ecc6299db9ec823/clang-sys-0.15.2/src/lib.rs:1356:1
note: Run withRUST_BACKTRACE=1
for a backtrace.
current commit: 3439041
rust version: rustc 1.27.0 (3eda71b00 2018-06-19)
clang version:
Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4)
Target: x86_64-pc-linux-gnu
Thread model: posix
but I have also tried with clang-3.9 as suggested in #584 and I get the same error.
I have installed linux-headers
.
Any help much appreciated.