Open alkorang opened 3 years ago
From Rust Blog I found the latest stable rustc when 2.5.13 was released (Dec 31) is 1.40.0 (Dec 19). After I changed default rustc to 1.40.0 by running rustup default 1.40.0, I could build parity 2.5.13.
@alkorang thank you for for the heads-up! Worked for me after the initial problems with unexpected string literal
when trying to compile from the 2.5
branch. I found it very helpful in regard to https://github.com/openethereum/openethereum/issues/11858
Just wanted to put this somewhere.
It's non-trivially difficult to build static binaries of Parity because of the RocksDB dependency, it doesn't like linking against the musl libc. But in rust 'the supported way' to do static binaries is to build against musl.
While it's not impossible to build a static binary linked against glibc, neither is it well supported and even if you manage to manipulate the build flags to do a new rust version could make it dynamic again.
The best that can be done is have release builds built in a docker container against the oldest verson of glibc possible at any given time. Since this is the only dynamic linking performed by the resulting binary you would would essentially make a universally portable binary that way.
I've got a quick debian docker container doing this locally for my own purposes and it works on Centos8 which is all I need. But I think if you really wanted to run such a script for releases you would want to base the docker container on Centos6 as the oldest version of glibc that's still even kinda maintained.
Ubuntu 16.04 will be used to build the binary. https://github.com/openethereum/backport-3.1/pull/73
When I downloaded parity 2.5.13 for Linux and started them in CentOS 7, it returned error that some dynamic libraries are not in the expected paths:
I got the same error when I downloaded and started openethereum 3.0.1:
So I decided to build parity from source code in CentOS 7. I first installed latest stable rustc (1.46.0) with rustup and all packages listed in README (gcc, g++, ...) with yum package manager. I tried to build parity 2.5.13, then building failed because of too old cmake:
After I found cmake 3.17.1 and added it to PATH, building failed again, probably due to change in language specification:
From Rust Blog I found the latest stable rustc when 2.5.13 was released (Dec 31) is 1.40.0 (Dec 19). After I changed default rustc to 1.40.0 by running
rustup default 1.40.0
, I could build parity 2.5.13.In the next release, it'd be better if static binaries are provided so that openethereum can be run on any Linux distributions, or at least information of building and testing environments (Linux distributions, versions of build tools) is provided in README.
PS.
The issue template refers SECURITY.md which does not exist anymore.