Hello, and thanks for what you're doing.
I am trying to build parity from sources with following command query:
$ git clone https://github.com/ethcore/parity
$ cd parity
$ cargo build --release
And I am getting constantly this error (tested on two powerful servers):
Compiling primal v0.2.3
error: failed to run custom build command forhidapi v0.3.1 (https://github.com/paritytech/hidapi-rs#2e618213)
process didn't exit successfully:/root/parity/target/release/build/hidapi-403d0991c4ed2193/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" "-I" "etc/hidapi/hidapi" "-Wall" "-Wextra" "-o" "/root/parity/target/release/build/hidapi-9d76d20f26bef325/out/etc/hidapi/linux/hid.o" "-c" "etc/hidapi/linux/hid.c"
cargo:warning=etc/hidapi/linux/hid.c:44:21: fatal error: libudev.h: No such file or directory
cargo:warning= #include
cargo:warning= ^
cargo:warning=compilation terminated.
exit code: 1--- stderr
thread 'main' panicked at 'Internal error occurred: Command "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "etc/hidapi/hidapi" "-Wall" "-Wextra" "-o" "/root/parity/target/release/build/hidapi-9d76d20f26bef325/out/etc/hidapi/linux/hid.o" "-c" "etc/hidapi/linux/hid.c" with args "cc" did not execute successfully (status code exit code: 1).
', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.54/src/lib.rs:1670:4
note: Run withRUST_BACKTRACE=1for a backtrace.warning: build failed, waiting for other jobs to finish...
error: build failed
If I use this method:
$ cargo install --git https://github.com/paritytech/parity.git parity
I receive the following error:
Downloading foreign-types-shared v0.1.1
error: failed to compileparity v1.9.0 (https://github.com/paritytech/parity.git#fcddc775), intermediate artifacts can be found at/tmp/cargo-install.f7tF7m4Q4papCaused by:
Multiple packages link to native libraryring-asm. A native library can be linked only once.Package
ring v0.9.7
... which is depended on bymultihash v0.6.0
... which is depended on byparity-rpc v1.9.0 (https://github.com/paritytech/parity.git#fcddc775)
... which is depended on byparity-rpc-client v1.4.0 (https://github.com/paritytech/parity.git#fcddc775)
... which is depended on byparity v1.9.0 (https://github.com/paritytech/parity.git#fcddc775)
links to native libraryring-asm.Package
ring v0.12.1
... which is depended on bymultihash v0.7.0
... which is depended on bycid v0.2.3
... which is depended on byparity-rpc v1.9.0 (https://github.com/paritytech/parity.git#fcddc775)
... which is depended on byparity-rpc-client v1.4.0 (https://github.com/paritytech/parity.git#fcddc775)
... which is depended on byparity v1.9.0 (https://github.com/paritytech/parity.git#fcddc775)
also links to native libraryring-asm.
same here
Please update your rust to 1.21.0+ thanks!
curl https://sh.rustup.rs -sSf | sh
git clone https://github.com/paritytech/parity.git
cd parity
git checkout beta
cargo build --release --features final -j $(nproc)
Hello, rust 1.22.1, the same error..
i did try this in a new archbase docker container. Doesnt work for me.
Cargo install is broken, please don't use it like this:
$ cargo install --git https://github.com/paritytech/parity.git parity
Details: #6007
To build parity clone the repo and build using:
$ cargo build --release && sudo cp ./target/release/parity /usr/loca/bin/parity
actually I tried both methods with no success, looks like developers are using mac & ubuntu, and other *nix-es are not tested yet
Just noticed:
cargo:warning=etc/hidapi/linux/hid.c:44:21: fatal error: libudev.h: No such file or directory
Did you install required dependencies:
https://github.com/paritytech/parity#build-dependencies
?
After installing
pkg-config:
$ wget ftp://mirror.switch.ch/pool/4/mirror/scientificlinux/7.4/x86_64/os/Packages/pkgconfig-0.27.1-4.el7.x86_64.rpm
$ rpm -i pkgconfig-0.27.1-4.el7.x86_64.rpm
libudev-devel (systemd-devel)
# Create repo for systemd-container
$ cat >/etc/yum.repos.d/systemd.repo <<EOF
[systemdcontainer]
name=CentOS-\$releasever - systemd-container
baseurl=http://dev.centos.org/centos/7/systemd-container/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
EOF
$ yum -y install systemd-devel
Compilation successfully passed hidapi/ring-asm error. Thanks a lot.
Most helpful comment
After installing
pkg-config:
libudev-devel (systemd-devel)
Compilation successfully passed hidapi/ring-asm error. Thanks a lot.