static binaries, description of building/testing environments

Author: yeonsookimdevCreated Aug 29, 2020Updated Oct 16, 2020
  • OpenEthereum version: since 2.5.13 (maybe older)
  • Operating system: Linux (CentOS 7)
  • Installation: one-line installer, built from source
  • Fully synchronized: -
  • Network: -
  • Restarted: -

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:

./parity: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./parity)
./parity: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by ./parity)
./parity: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./parity)
./parity: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by ./parity)

I got the same error when I downloaded and started openethereum 3.0.1:

./openethereum: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./openethereum)
./openethereum: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by ./openethereum)
./openethereum: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./openethereum)
./openethereum: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by ./openethereum)

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:

--- stderr
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  CMake 3.1 or higher is required.  You are running version 2.8.12.2

After I found cmake 3.17.1 and added it to PATH, building failed again, probably due to change in language specification:

error: unexpected string literal
   --> rpc/src/tests/http_client.rs:117:4
    |
116 |             headers.iter().any(|header| header.as_str() == "X-Frame-Options: SAMEORIGIN")
    |                                                                                          - help: try adding a comma
117 |             "X-Frame-Options: SAMEORIGIN missing: {:?}", headers
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: unexpected string literal
   --> rpc/src/tests/http_client.rs:122:3
    |
121 |         headers.iter().any(|header| header.as_str() == "X-XSS-Protection: 1; mode=block")
    |                                                                                          - help: try adding a comma
122 |         "X-XSS-Protection missing: {:?}", headers
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: unexpected string literal
   --> rpc/src/tests/http_client.rs:126:3
    |
125 |         headers.iter().any(|header|  header.as_str() == "X-Content-Type-Options: nosniff")
    |                                                                                           - help: try adding a comma
126 |         "X-Content-Type-Options missing: {:?}", headers
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: unexpected string literal
   --> rpc/src/tests/http_client.rs:130:3
    |
129 |         headers.iter().any(|header| header.starts_with("Content-Security-Policy: "))
    |                                                                                     - help: try adding a comma
130 |         "Content-Security-Policy missing: {:?}", headers
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

...... warnings ......

error: aborting due to 4 previous errors; 43 warnings emitted

error: could not compile `parity-rpc`.

To learn more, run the command again with --verbose.

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.

You can find mode info on the reporting process in SECURITY.md

Source: openethereum/parity-ethereum