Rocky Linux 8でAkulaをビルドして実行した記録

AkulaはEthereumのクライアントの実装の1つです。数あるEthereumクライアントの中では新しい部類で、まだまだマイナーなようです。
https://github.com/akula-bft/akula

最近Ethereumに興味を持ち、自分でNodeを作ってみたいと思ったので、Akulaをビルドして実行してみました。その際、多数エラーが出たのでその解消方法を備忘録的に残します。

なお、著者はBlockchain、Ethereum、Rocky Linux、Rustの全てについて初心者なので、技術的に突っ込んだ話はできません。この記事では発生したエラーと解決方法だけを書きます。

# ログ（さくらのVPS 1G編）

* CPU: 仮想2Core, x86_64
* メモリ: 1GB
* SSD: 50GB
* OS: Rocky Linux 8.5
* Akulaのバージョン: 7b7b54ed7f39e98a8c7146fbac7f0df0bfd567fc

でビルドを試した。

インストール手順はAkulaの公式ページの手順に従った。
https://akula.app/installation.html

## インストール手順

```
# 公式ページにRequirementsとして記載されたソフトをインストール
$ sudo yum install clang
$ sudo yum install e2fsprogs-libs
$ sudo yum install pkgconf-pkg-config

# Rustのインストール(Profileはminimalを選択)
$ curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh

# Gitのインストール
$ sudo yum install git

# akulaのビルドを開始
$ git clone https://github.com/akula-bft/akula

$ cd akula

$ cargo build --all --profile=production
```

## エラー1

```
error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: could not compile `proc-macro2` due to previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `quote` due to previous error
```

→リンクを貼ってclangへのパスを通すことで解決した

```
# ~/.local/binにて実行
$ sudo ln -s /usr/bin/clang cc
```

## エラー2

```
error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "/tmp/rustcmwEKuW/symbols.o" "/home/username/akula/target/production/build/proc-macro2-a974ee6a14a8aff3/build_script_build-a974ee6a14a8aff3.build_script_build.234df125-cgu.0.rcgu.o" "/home/username/akula/target/production/build/proc-macro2-a974ee6a14a8aff3/build_script_build-a974ee6a14a8aff3.build_script_build.234df125-cgu.1.rcgu.o" "/home/username/akula/target/production/build/proc-macro2-a974ee6a14a8aff3/build_script_build-a974ee6a14a8aff3.build_script_build.234df125-cgu.10.rcgu.o" "/home/username/akula/target/production/build/proc-macro2-a974ee6a14a8aff3/build_script_build-a974ee6a14a8aff3.build_script_build.234df125-cgu.11.rcgu.o" "/home/username/akula/target/production/build/proc-macro2-a974ee6a14a8aff3/build_script_build-a974ee6a14a8aff3.build_script_build.234df125-cgu.12.rcgu.o" "/home/username/akula/target/production/build/proc-macro2-a974ee6a14a8aff3/build_script_build-a974ee6a14a8aff3.build_script_build.234df125-cgu.13.rcgu.o" "/home/username/akula/target/production/build/proc-macro2-a974ee6a14a8aff3/build_script_build-a974ee6a14a8aff3.build_script_build.234df125-cgu.14.rcgu.o" "/home/username/akula/target/production/build/proc-macro2-a974ee6a14a8aff3/build_script_build-a974ee6a14a8aff3.build_script_build.234df125-cgu.15.rcgu.o" "/home/username/akula/target/production/build/proc-macro2-a974ee6a14a8aff3/build_script_build-a974ee6a14a8aff3.build_script_build.234df125-cgu.2.rcgu.o" "/home/username/akula/target/production/build/proc-macro2-a974ee6a14a8aff3/build_script_build-a974ee6a14a8aff3.build_script_build.234df125-cgu.3.rcgu.o" "/home/username/akula/target/production/build/proc-macro2-a974ee6a14a8aff3/build_script_build-a974ee6a14a8aff3.build_script_build.234df125-cgu.4.rcgu.o" "/home/username/akula/target/production/build/proc-macro2-a974ee6a14a8aff3/build_script_build-a974ee6a14a8aff3.build_script_build.234df125-cgu.5.rcgu.o" "/home/username/akula/target/production/build/proc-macro2-a974ee6a14a8aff3/build_script_build-a974ee6a14a8aff3.build_script_build.234df125-cgu.6.rcgu.o" "/home/username/akula/target/production/build/proc-macro2-a974ee6a14a8aff3/build_script_build-a974ee6a14a8aff3.build_script_build.234df125-cgu.7.rcgu.o" "/home/username/akula/target/production/build/proc-macro2-a974ee6a14a8aff3/build_script_build-a974ee6a14a8aff3.build_script_build.234df125-cgu.8.rcgu.o" "/home/username/akula/target/production/build/proc-macro2-a974ee6a14a8aff3/build_script_build-a974ee6a14a8aff3.build_script_build.234df125-cgu.9.rcgu.o" "/home/username/akula/target/production/build/proc-macro2-a974ee6a14a8aff3/build_script_build-a974ee6a14a8aff3.3fdkcxuigaxo1w3x.rcgu.o" "-Wl,--as-needed" "-L" "/home/username/akula/target/production/deps" "-L" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,--start-group" "-Wl,-Bstatic" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-5670385a2fe8b60b.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-fd56ba6dbf7aaecc.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-b8acf8e5c2e85baa.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-1706edefffdca0a2.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-f483302e0b13708e.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-725b0718fc18e1ed.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-de685fcf2157e6fb.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-f613ac3eda05b9ff.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-3de98a7d049af6a1.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-c12183655bdce152.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-0fc7beea925de7e3.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-8c34825485bf59dc.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-ba5f7e926e729d81.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-643de0950163a839.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-539ea2f72ef89687.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-871432094bb4c885.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-ef1a8ee61f2e39bf.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-f1646747442c1c7b.rlib" "-Wl,--end-group" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-ff283b4bf550fa1c.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/username/akula/target/production/build/proc-macro2-a974ee6a14a8aff3/build_script_build-a974ee6a14a8aff3" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-nodefaultlibs"
  = note: clang-13: error: unable to execute command: Executable "ld" doesn't exist!
          clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
          

error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "/tmp/rustcv5xLtI/symbols.o" "/home/username/akula/target/production/build/quote-8461a40a0111d66d/build_script_build-8461a40a0111d66d.build_script_build.4d11e4c6-cgu.0.rcgu.o" "/home/username/akula/target/production/build/quote-8461a40a0111d66d/build_script_build-8461a40a0111d66d.build_script_build.4d11e4c6-cgu.1.rcgu.o" "/home/username/akula/target/production/build/quote-8461a40a0111d66d/build_script_build-8461a40a0111d66d.build_script_build.4d11e4c6-cgu.10.rcgu.o" "/home/username/akula/target/production/build/quote-8461a40a0111d66d/build_script_build-8461a40a0111d66d.build_script_build.4d11e4c6-cgu.11.rcgu.o" "/home/username/akula/target/production/build/quote-8461a40a0111d66d/build_script_build-8461a40a0111d66d.build_script_build.4d11e4c6-cgu.12.rcgu.o" "/home/username/akula/target/production/build/quote-8461a40a0111d66d/build_script_build-8461a40a0111d66d.build_script_build.4d11e4c6-cgu.13.rcgu.o" "/home/username/akula/target/production/build/quote-8461a40a0111d66d/build_script_build-8461a40a0111d66d.build_script_build.4d11e4c6-cgu.14.rcgu.o" "/home/username/akula/target/production/build/quote-8461a40a0111d66d/build_script_build-8461a40a0111d66d.build_script_build.4d11e4c6-cgu.15.rcgu.o" "/home/username/akula/target/production/build/quote-8461a40a0111d66d/build_script_build-8461a40a0111d66d.build_script_build.4d11e4c6-cgu.2.rcgu.o" "/home/username/akula/target/production/build/quote-8461a40a0111d66d/build_script_build-8461a40a0111d66d.build_script_build.4d11e4c6-cgu.3.rcgu.o" "/home/username/akula/target/production/build/quote-8461a40a0111d66d/build_script_build-8461a40a0111d66d.build_script_build.4d11e4c6-cgu.4.rcgu.o" "/home/username/akula/target/production/build/quote-8461a40a0111d66d/build_script_build-8461a40a0111d66d.build_script_build.4d11e4c6-cgu.5.rcgu.o" "/home/username/akula/target/production/build/quote-8461a40a0111d66d/build_script_build-8461a40a0111d66d.build_script_build.4d11e4c6-cgu.6.rcgu.o" "/home/username/akula/target/production/build/quote-8461a40a0111d66d/build_script_build-8461a40a0111d66d.build_script_build.4d11e4c6-cgu.7.rcgu.o" "/home/username/akula/target/production/build/quote-8461a40a0111d66d/build_script_build-8461a40a0111d66d.build_script_build.4d11e4c6-cgu.8.rcgu.o" "/home/username/akula/target/production/build/quote-8461a40a0111d66d/build_script_build-8461a40a0111d66d.build_script_build.4d11e4c6-cgu.9.rcgu.o" "/home/username/akula/target/production/build/quote-8461a40a0111d66d/build_script_build-8461a40a0111d66d.2phk8e3mtmbzkj81.rcgu.o" "-Wl,--as-needed" "-L" "/home/username/akula/target/production/deps" "-L" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,--start-group" "-Wl,-Bstatic" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-5670385a2fe8b60b.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-fd56ba6dbf7aaecc.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-b8acf8e5c2e85baa.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-1706edefffdca0a2.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-f483302e0b13708e.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-725b0718fc18e1ed.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-de685fcf2157e6fb.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-f613ac3eda05b9ff.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-3de98a7d049af6a1.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-c12183655bdce152.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-0fc7beea925de7e3.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-8c34825485bf59dc.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-ba5f7e926e729d81.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-643de0950163a839.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-539ea2f72ef89687.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-871432094bb4c885.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-ef1a8ee61f2e39bf.rlib" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-f1646747442c1c7b.rlib" "-Wl,--end-group" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-ff283b4bf550fa1c.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/username/akula/target/production/build/quote-8461a40a0111d66d/build_script_build-8461a40a0111d66d" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-nodefaultlibs"
  = note: clang-13: error: unable to execute command: Executable "ld" doesn't exist!
          clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
          

error: could not compile `quote` due to previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `proc-macro2` due to previous error
```

→以下のようにlldをインストールし、リンクを貼ってパスを通すと解決した

```
# lldのインストール
$ sudo yum install lld

# ~/.local/binで実行
$ sudo ln -s /usr/bin/ld.lld ld
```

## エラー3

```
error: failed to run custom build command for `protobuf-src v1.1.0+21.5`

Caused by:
  process didn't exit successfully: `/home/username/akula/target/production/build/protobuf-src-742ab168e867a69f/build-script-build` (exit status: 101)
  --- stdout
  running: "sh" "-c" "exec \"$0\" \"$@\"" "/home/username/.cargo/registry/src/github.com-1ecc6299db9ec823/protobuf-src-1.1.0+21.5/protobuf/configure" "--prefix=/home/username/akula/target/production/build/protobuf-src-95236b2644e76ab5/out/install" "--disable-shared" "--enable-static" "--disable-maintainer-mode"
  checking whether to enable maintainer-specific portions of Makefiles... no
  checking build system type... x86_64-pc-linux-gnu
  checking host system type... x86_64-pc-linux-gnu
  checking target system type... x86_64-pc-linux-gnu
  checking for a BSD-compatible install... /usr/bin/install -c
  checking whether build environment is sane... yes
  checking for a race-free mkdir -p... /usr/bin/mkdir -p
  checking for gawk... gawk
  checking whether make sets $(MAKE)... yes
  checking whether make supports nested variables... yes
  checking whether UID '1001' is supported by ustar format... yes
  checking whether GID '1001' is supported by ustar format... yes
  checking how to create a ustar tar archive... gnutar
  checking whether make supports nested variables... (cached) yes
  checking for gcc... cc
  checking whether the C compiler works... yes
  checking for C compiler default output file name... a.out
  checking for suffix of executables... 
  checking whether we are cross compiling... no
  checking for suffix of object files... o
  checking whether the compiler supports GNU C... yes
  checking whether cc accepts -g... yes
  checking for cc option to enable C11 features... none needed
  checking whether cc understands -c and -o together... yes
  checking whether make supports the include directive... yes (GNU style)
  checking dependency style of cc... gcc3
  checking whether the compiler supports GNU C++... no
  checking whether c++ accepts -g... no
  checking for c++ option to enable C++11 features... none needed
  checking dependency style of c++... none
  checking how to run the C preprocessor... cc -E
  checking for gcc... no
  checking for cc... cc
  checking whether the compiler supports GNU C... (cached) yes
  checking whether cc accepts -g... yes
  checking for cc option to enable C11 features... (cached) none needed
  checking whether cc understands -c and -o together... (cached) yes
  checking dependency style of cc... (cached) gcc3
  checking how to run the C preprocessor... cc -E
  checking how to run the C++ preprocessor... /lib/cpp

  --- stderr
  configure: error: in `/home/username/akula/target/production/build/protobuf-src-95236b2644e76ab5/out/install/build':
  configure: error: C++ preprocessor "/lib/cpp" fails sanity check
  See `config.log' for more details
  thread 'main' panicked at '
  command did not execute successfully, got: exit status: 1

  build script failed, must exit now', /home/username/.cargo/registry/src/github.com-1ecc6299db9ec823/autotools-0.2.5/src/lib.rs:715:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `ethnum-intrinsics v1.1.0 (https://github.com/vorot93/ethnum-rs?branch=impls#168043b6)`

Caused by:
  process didn't exit successfully: `/home/username/akula/target/production/build/ethnum-intrinsics-3fe434b5859345c9/build-script-main` (exit status: 1)
  --- stdout
  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
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  running: "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=x86_64-unknown-linux-gnu" "-Wall" "-Wextra" "-o" "/home/username/akula/target/production/build/ethnum-intrinsics-9d9c3b35c1de8a41/out/intrinsics.o" "-c" "/home/username/akula/target/production/build/ethnum-intrinsics-9d9c3b35c1de8a41/out/intrinsics.ll"
  exit status: 0
  AR_x86_64-unknown-linux-gnu = None
  AR_x86_64_unknown_linux_gnu = None
  HOST_AR = None
  AR = None
  running: "ar" "cq" "/home/username/akula/target/production/build/ethnum-intrinsics-9d9c3b35c1de8a41/out/libethnum.a" "/home/username/akula/target/production/build/ethnum-intrinsics-9d9c3b35c1de8a41/out/intrinsics.o"

  --- stderr
  Error: Error { kind: ToolNotFound, message: "Failed to find tool. Is `ar` installed?" }
error: failed to run custom build command for `libz-sys v1.1.8`

Caused by:
  process didn't exit successfully: `/home/username/akula/target/production/build/libz-sys-3d7949160cf0761b/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=LIBZ_SYS_STATIC
  cargo:rerun-if-changed=build.rs
  cargo:rerun-if-env-changed=ZLIB_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=ZLIB_STATIC
  cargo:rerun-if-env-changed=ZLIB_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo-warning=`"pkg-config" "--libs" "--cflags" "zlib"` did not exit successfully: exit status: 1
  error: could not find system library 'zlib' required by the 'libz-sys' crate

  --- stderr
  Package zlib was not found in the pkg-config search path.
  Perhaps you should add the directory containing `zlib.pc'
  to the PKG_CONFIG_PATH environment variable
  Package 'zlib', required by 'virtual:world', not found

  OPT_LEVEL = Some("0")
  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
  CFLAGS_x86_64-unknown-linux-gnu = None
  CFLAGS_x86_64_unknown_linux_gnu = None
  HOST_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  running "cc" "src/smoke.c" "-o" "/dev/null" "-lz"
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "src/zlib" "-fvisibility=hidden" "-DSTDC" "-D_LARGEFILE64_SOURCE" "-D_POSIX_SOURCE" "-o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/adler32.o" "-c" "src/zlib/adler32.c"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "src/zlib" "-fvisibility=hidden" "-DSTDC" "-D_LARGEFILE64_SOURCE" "-D_POSIX_SOURCE" "-o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/compress.o" "-c" "src/zlib/compress.c"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "src/zlib" "-fvisibility=hidden" "-DSTDC" "-D_LARGEFILE64_SOURCE" "-D_POSIX_SOURCE" "-o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/crc32.o" "-c" "src/zlib/crc32.c"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "src/zlib" "-fvisibility=hidden" "-DSTDC" "-D_LARGEFILE64_SOURCE" "-D_POSIX_SOURCE" "-o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/deflate.o" "-c" "src/zlib/deflate.c"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "src/zlib" "-fvisibility=hidden" "-DSTDC" "-D_LARGEFILE64_SOURCE" "-D_POSIX_SOURCE" "-o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/infback.o" "-c" "src/zlib/infback.c"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "src/zlib" "-fvisibility=hidden" "-DSTDC" "-D_LARGEFILE64_SOURCE" "-D_POSIX_SOURCE" "-o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/inffast.o" "-c" "src/zlib/inffast.c"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "src/zlib" "-fvisibility=hidden" "-DSTDC" "-D_LARGEFILE64_SOURCE" "-D_POSIX_SOURCE" "-o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/inflate.o" "-c" "src/zlib/inflate.c"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "src/zlib" "-fvisibility=hidden" "-DSTDC" "-D_LARGEFILE64_SOURCE" "-D_POSIX_SOURCE" "-o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/inftrees.o" "-c" "src/zlib/inftrees.c"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "src/zlib" "-fvisibility=hidden" "-DSTDC" "-D_LARGEFILE64_SOURCE" "-D_POSIX_SOURCE" "-o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/trees.o" "-c" "src/zlib/trees.c"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "src/zlib" "-fvisibility=hidden" "-DSTDC" "-D_LARGEFILE64_SOURCE" "-D_POSIX_SOURCE" "-o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/uncompr.o" "-c" "src/zlib/uncompr.c"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "src/zlib" "-fvisibility=hidden" "-DSTDC" "-D_LARGEFILE64_SOURCE" "-D_POSIX_SOURCE" "-o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/zutil.o" "-c" "src/zlib/zutil.c"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "src/zlib" "-fvisibility=hidden" "-DSTDC" "-D_LARGEFILE64_SOURCE" "-D_POSIX_SOURCE" "-o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/gzclose.o" "-c" "src/zlib/gzclose.c"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "src/zlib" "-fvisibility=hidden" "-DSTDC" "-D_LARGEFILE64_SOURCE" "-D_POSIX_SOURCE" "-o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/gzlib.o" "-c" "src/zlib/gzlib.c"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "src/zlib" "-fvisibility=hidden" "-DSTDC" "-D_LARGEFILE64_SOURCE" "-D_POSIX_SOURCE" "-o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/gzread.o" "-c" "src/zlib/gzread.c"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "src/zlib" "-fvisibility=hidden" "-DSTDC" "-D_LARGEFILE64_SOURCE" "-D_POSIX_SOURCE" "-o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/gzwrite.o" "-c" "src/zlib/gzwrite.c"
  exit status: 0
  AR_x86_64-unknown-linux-gnu = None
  AR_x86_64_unknown_linux_gnu = None
  HOST_AR = None
  AR = None
  running: "ar" "cq" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/libz.a" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/adler32.o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/compress.o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/crc32.o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/deflate.o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/infback.o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/inffast.o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/inflate.o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/inftrees.o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/trees.o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/uncompr.o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/zutil.o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/gzclose.o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/gzlib.o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/gzread.o" "/home/username/akula/target/production/build/libz-sys-afcc5594c56d68c0/out/lib/src/zlib/gzwrite.o"

  --- stderr
  src/smoke.c:1:10: fatal error: 'zlib.h' file not found
  #include <zlib.h>
           ^~~~~~~~
  1 error generated.


  error occurred: Failed to find tool. Is `ar` installed?


error: failed to run custom build command for `secp256k1-sys v0.6.0`

Caused by:
  process didn't exit successfully: `/home/username/akula/target/production/build/secp256k1-sys-9070dffca288a602/build-script-build` (exit status: 1)
  --- stdout
  TARGET = Some("x86_64-unknown-linux-gnu")
  OPT_LEVEL = Some("3")
  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
  CFLAGS_x86_64-unknown-linux-gnu = None
  CFLAGS_x86_64_unknown_linux_gnu = None
  HOST_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  CC_x86_64-unknown-linux-gnu = None
  CC_x86_64_unknown_linux_gnu = None
  HOST_CC = None
  CC = None
  CFLAGS_x86_64-unknown-linux-gnu = None
  CFLAGS_x86_64_unknown_linux_gnu = None
  HOST_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-Wall" "-Wextra" "-Wno-unused-function" "-DSECP256K1_API=" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DECMULT_GEN_PREC_BITS=4" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-DENABLE_MODULE_RECOVERY=1" "-o" "/home/username/akula/target/production/build/secp256k1-sys-462906f7490fbf6c/out/depend/secp256k1/contrib/lax_der_parsing.o" "-c" "depend/secp256k1/contrib/lax_der_parsing.c"
  exit status: 0
  running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-Wall" "-Wextra" "-Wno-unused-function" "-DSECP256K1_API=" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DECMULT_GEN_PREC_BITS=4" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-DENABLE_MODULE_RECOVERY=1" "-o" "/home/username/akula/target/production/build/secp256k1-sys-462906f7490fbf6c/out/depend/secp256k1/src/precomputed_ecmult_gen.o" "-c" "depend/secp256k1/src/precomputed_ecmult_gen.c"
  exit status: 0
  running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-Wall" "-Wextra" "-Wno-unused-function" "-DSECP256K1_API=" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DECMULT_GEN_PREC_BITS=4" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-DENABLE_MODULE_RECOVERY=1" "-o" "/home/username/akula/target/production/build/secp256k1-sys-462906f7490fbf6c/out/depend/secp256k1/src/precomputed_ecmult.o" "-c" "depend/secp256k1/src/precomputed_ecmult.c"
  running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-Wall" "-Wextra" "-Wno-unused-function" "-DSECP256K1_API=" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DECMULT_GEN_PREC_BITS=4" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-DENABLE_MODULE_RECOVERY=1" "-o" "/home/username/akula/target/production/build/secp256k1-sys-462906f7490fbf6c/out/depend/secp256k1/src/secp256k1.o" "-c" "depend/secp256k1/src/secp256k1.c"
  exit status: 0
  exit status: 0
  AR_x86_64-unknown-linux-gnu = None
  AR_x86_64_unknown_linux_gnu = None
  HOST_AR = None
  AR = None
  running: "ar" "cq" "/home/username/akula/target/production/build/secp256k1-sys-462906f7490fbf6c/out/libsecp256k1.a" "/home/username/akula/target/production/build/secp256k1-sys-462906f7490fbf6c/out/depend/secp256k1/contrib/lax_der_parsing.o" "/home/username/akula/target/production/build/secp256k1-sys-462906f7490fbf6c/out/depend/secp256k1/src/precomputed_ecmult_gen.o" "/home/username/akula/target/production/build/secp256k1-sys-462906f7490fbf6c/out/depend/secp256k1/src/precomputed_ecmult.o" "/home/username/akula/target/production/build/secp256k1-sys-462906f7490fbf6c/out/depend/secp256k1/src/secp256k1.o"

  --- stderr


  error occurred: Failed to find tool. Is `ar` installed?
```

→binutilsをインストールすると解消した

```
$ sudo yum install binutils
```

## エラー4

```
error: failed to run custom build command for `protobuf-src v1.1.0+21.5`

Caused by:
  process didn't exit successfully: `/home/username/akula/target/production/build/protobuf-src-742ab168e867a69f/build-script-build` (exit status: 101)
  --- stdout
  running: "sh" "-c" "exec \"$0\" \"$@\"" "/home/username/.cargo/registry/src/github.com-1ecc6299db9ec823/protobuf-src-1.1.0+21.5/protobuf/configure" "--prefix=/home/username/akula/target/production/build/protobuf-src-95236b2644e76ab5/out/install" "--disable-shared" "--enable-static" "--disable-maintainer-mode"
  checking whether to enable maintainer-specific portions of Makefiles... no
  checking build system type... x86_64-pc-linux-gnu
  checking host system type... x86_64-pc-linux-gnu
  checking target system type... x86_64-pc-linux-gnu
  checking for a BSD-compatible install... /usr/bin/install -c
  checking whether build environment is sane... yes
  checking for a race-free mkdir -p... /usr/bin/mkdir -p
  checking for gawk... gawk
  checking whether make sets $(MAKE)... yes
  checking whether make supports nested variables... yes
  checking whether UID '1001' is supported by ustar format... yes
  checking whether GID '1001' is supported by ustar format... yes
  checking how to create a ustar tar archive... gnutar
  checking whether make supports nested variables... (cached) yes
  checking for gcc... cc
  checking whether the C compiler works... yes
  checking for C compiler default output file name... a.out
  checking for suffix of executables... 
  checking whether we are cross compiling... no
  checking for suffix of object files... o
  checking whether the compiler supports GNU C... yes
  checking whether cc accepts -g... yes
  checking for cc option to enable C11 features... none needed
  checking whether cc understands -c and -o together... yes
  checking whether make supports the include directive... yes (GNU style)
  checking dependency style of cc... gcc3
  checking whether the compiler supports GNU C++... no
  checking whether c++ accepts -g... no
  checking for c++ option to enable C++11 features... none needed
  checking dependency style of c++... none
  checking how to run the C preprocessor... cc -E
  checking for gcc... no
  checking for cc... cc
  checking whether the compiler supports GNU C... (cached) yes
  checking whether cc accepts -g... yes
  checking for cc option to enable C11 features... (cached) none needed
  checking whether cc understands -c and -o together... (cached) yes
  checking dependency style of cc... (cached) gcc3
  checking how to run the C preprocessor... cc -E
  checking how to run the C++ preprocessor... /lib/cpp

  --- stderr
  configure: error: in `/home/username/akula/target/production/build/protobuf-src-95236b2644e76ab5/out/install/build':
  configure: error: C++ preprocessor "/lib/cpp" fails sanity check
  See `config.log' for more details
  thread 'main' panicked at '
  command did not execute successfully, got: exit status: 1

  build script failed, must exit now', /home/username/.cargo/registry/src/github.com-1ecc6299db9ec823/autotools-0.2.5/src/lib.rs:715:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
```

→リンクを貼ってclang++へのリンクを貼ることで解決した。

```
$ sudo ln -s /usr/bin/clang++ c++
```

ちなみに、ログに `See 'config.log' for more details` と出ていますが、これはtargetディレクトリ内を探すと見つかります。

```
$ find . -name config.log
./target/production/build/protobuf-src-95236b2644e76ab5/out/install/build/config.log
```

## エラー5

```
error: failed to run custom build command for `e2p-sys v0.1.0 (https://github.com/michaellass/e2p-sys.git#b9970006)`

Caused by:
  process didn't exit successfully: `/home/username/akula/target/production/build/e2p-sys-1cab4d41cd8e7575/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=E2P_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=E2P_STATIC
  cargo:rerun-if-env-changed=E2P_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error(PkgConfig(`"pkg-config" "--libs" "--cflags" "e2p" "e2p >= *"` did not exit successfully: exit status: 1
  error: could not find system library 'e2p' required by the 'e2p-sys' crate

  --- stderr
  Package e2p was not found in the pkg-config search path.
  Perhaps you should add the directory containing `e2p.pc'
  to the PKG_CONFIG_PATH environment variable
  Package 'e2p', required by 'virtual:world', not found
  Package 'e2p', required by 'virtual:world', not found
  ), State { next_error: None })', /home/username/.cargo/git/checkouts/e2p-sys-81917b868398fd74/b997000/build.rs:36:23
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
```

→e2fsprogs-develをインストールすると解消しました（e2fsprogs-develはAkulaのドキュメントに記載されているのにインストールしていなかったので、これは単なる作業漏れ）。

```
$ sudo yum install e2fsprogs-devel
```

## エラー6

```
error: failed to run custom build command for `tonic-reflection v0.5.0`

Caused by:
  process didn't exit successfully: `/home/username/akula/target/production/build/tonic-reflection-c72cd610df75465b/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=proto/reflection.proto
  cargo:rerun-if-changed=proto/

  --- stderr
  thread 'main' panicked at '
  Could not find `protoc` installation and this build crate cannot proceed without
  this knowledge. If `protoc` is installed and this crate had trouble finding
  it, you can set the `PROTOC` environment variable with the specific path to your
  installed `protoc` binary.

  For more information: https://docs.rs/prost-build/#sourcing-protoc
  ', /home/username/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-build-0.11.1/src/lib.rs:1227:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
```

→このあたりはちょっと曖昧で、環境変数PROTOCを設定したら解消したはずです。

```
$ export PROTOC=/usr/lib64/libprotobuf.so.15
```

## エラー7

```
error: failed to run custom build command for `tonic-reflection v0.5.0`

Caused by:
  process didn't exit successfully: `/home/username/akula/target/production/build/tonic-reflection-c72cd610df75465b/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-changed=proto/reflection.proto
  cargo:rerun-if-changed=proto/
  Running: "/usr/lib64/libprotobuf.so.15" "--include_imports" "--include_source_info" "-o" "/home/username/akula/target/production/build/tonic-reflection-447f61d3b1c6f355/out/reflection_v1alpha1.bin" "-I" "proto/" "proto/reflection.proto"

  --- stderr
  Error: Custom { kind: Other, error: "protoc failed: " }
warning: build failed, waiting for other jobs to finish...
```

→引き続きこの辺りも曖昧で、色々試しているうちにエラーが解消しました。

```
# それっぽいものをインストールしてみたり
$ sudo yum install protobuf
$ sudo yum install protobuf-c-compiler
$ sudo yum install protobuf-c-devel

# 一旦ログアウトして再度ログインしてみたり

# サーバーを再起動してみたり
```

正直、どれが効いたのかは良く分かってません。

## エラー8

```
error: could not compile `akula`

Caused by:
  process didn't exit successfully: `rustc --crate-name akula_toolbox --edition=2021 bin/akula-toolbox.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C lto -C codegen-units=1 --cfg 'feature="default"' -C metadata=fa42345db0c507da -C extra-filename=-fa42345db0c507da --out-dir /home/username/akula/target/production/deps -L dependency=/home/username/akula/target/production/deps --extern aes=/home/username/akula/target/production/deps/libaes-efcd5e7b0381f263.rlib --extern akula=/home/username/akula/target/production/deps/libakula-d7190c7fa5a59e55.rlib --extern anyhow=/home/username/akula/target/production/deps/libanyhow-e03a41e52952291e.rlib --extern array_init=/home/username/akula/target/production/deps/libarray_init-e47fed719eb16217.rlib --extern arrayref=/home/username/akula/target/production/deps/libarrayref-d702ea2952db0042.rlib --extern arrayvec=/home/username/akula/target/production/deps/libarrayvec-2d90c6f68f6b9cf1.rlib --extern async_recursion=/home/username/akula/target/production/deps/libasync_recursion-13069556d7731089.so --extern async_stream=/home/username/akula/target/production/deps/libasync_stream-3bf31b8f5f81fa82.rlib --extern async_trait=/home/username/akula/target/production/deps/libasync_trait-4591a482dca46781.so --extern auto_impl=/home/username/akula/target/production/deps/libauto_impl-15c84ca948602ce3.so --extern block_padding=/home/username/akula/target/production/deps/libblock_padding-ba120322187de442.rlib --extern byte_unit=/home/username/akula/target/production/deps/libbyte_unit-11472f1179c189f8.rlib --extern byteorder=/home/username/akula/target/production/deps/libbyteorder-ffbc6f5423ecdc80.rlib --extern bytes=/home/username/akula/target/production/deps/libbytes-2d147b2ed3cb85ac.rlib --extern bytes_literal=/home/username/akula/target/production/deps/libbytes_literal-093a1bb7527985bf.rlib --extern bytesize=/home/username/akula/target/production/deps/libbytesize-f042459baacc31e0.rlib --extern cidr=/home/username/akula/target/production/deps/libcidr-fdebf8057f16e98b.rlib --extern cipher=/home/username/akula/target/production/deps/libcipher-a6914f5b3d335a2e.rlib --extern clap=/home/username/akula/target/production/deps/libclap-0406dd1d101e2253.rlib --extern croaring=/home/username/akula/target/production/deps/libcroaring-9adc0e69aef9cf77.rlib --extern ctr=/home/username/akula/target/production/deps/libctr-5e6ffcc7c5fa1930.rlib --extern dashmap=/home/username/akula/target/production/deps/libdashmap-25a2239fd36392d3.rlib --extern data_encoding=/home/username/akula/target/production/deps/libdata_encoding-a55061823f789cfa.rlib --extern derive_more=/home/username/akula/target/production/deps/libderive_more-bdec577bd20bcec7.so --extern digest=/home/username/akula/target/production/deps/libdigest-aa5ae591f1f23a27.rlib --extern directories=/home/username/akula/target/production/deps/libdirectories-9c70ee9a01c89224.rlib --extern e2p_fileflags=/home/username/akula/target/production/deps/libe2p_fileflags-3a1e099c7a86a42d.rlib --extern educe=/home/username/akula/target/production/deps/libeduce-6fde3e6801faad81.so --extern enr=/home/username/akula/target/production/deps/libenr-dd3dbabb961829b8.rlib --extern enum_primitive_derive=/home/username/akula/target/production/deps/libenum_primitive_derive-ce4693d5950f9429.so --extern ethereum_forkid=/home/username/akula/target/production/deps/libethereum_forkid-889750a7cfca5d92.rlib --extern ethereum_interfaces=/home/username/akula/target/production/deps/libethereum_interfaces-67a2a942d98158bf.rlib --extern ethereum_jsonrpc=/home/username/akula/target/production/deps/libethereum_jsonrpc-ec8869cd10133c4b.rlib --extern ethereum_types=/home/username/akula/target/production/deps/libethereum_types-bc2428ed893aee9e.rlib --extern ethnum=/home/username/akula/target/production/deps/libethnum-57db6c210dc6898d.rlib --extern expanded_pathbuf=/home/username/akula/target/production/deps/libexpanded_pathbuf-3e08609f07084ab7.rlib --extern fastrlp=/home/username/akula/target/production/deps/libfastrlp-80dbc6448374a5d5.rlib --extern fdlimit=/home/username/akula/target/production/deps/libfdlimit-b9b46b11e6e344f8.rlib --extern futures=/home/username/akula/target/production/deps/libfutures-e4778f6c559398bf.rlib --extern futures_intrusive=/home/username/akula/target/production/deps/libfutures_intrusive-5d7656d8e439791c.rlib --extern gen_iter=/home/username/akula/target/production/deps/libgen_iter-b72717fd6a5483a5.rlib --extern generic_array=/home/username/akula/target/production/deps/libgeneric_array-dec4a91afab26fd9.rlib --extern getset=/home/username/akula/target/production/deps/libgetset-e4972980768a595a.so --extern hash_db=/home/username/akula/target/production/deps/libhash_db-bba1158587afabc9.rlib --extern hash256_std_hasher=/home/username/akula/target/production/deps/libhash256_std_hasher-a4d78709f15c3419.rlib --extern hashbrown=/home/username/akula/target/production/deps/libhashbrown-896feee294571ddb.rlib --extern hashlink=/home/username/akula/target/production/deps/libhashlink-ab9dc743f5567373.rlib --extern hex=/home/username/akula/target/production/deps/libhex-83f06f9b5e7293d0.rlib --extern hex_literal=/home/username/akula/target/production/deps/libhex_literal-af47c1e87033b53a.so --extern hmac=/home/username/akula/target/production/deps/libhmac-b2563b443df7f8c6.rlib --extern http=/home/username/akula/target/production/deps/libhttp-7d22bbf56dfa52bd.rlib --extern i256=/home/username/akula/target/production/deps/libi256-4bcdcefdf01ed291.rlib --extern igd=/home/username/akula/target/production/deps/libigd-f1dcff43247b7b29.rlib --extern impls=/home/username/akula/target/production/deps/libimpls-24acd699211dcc60.rlib --extern itertools=/home/username/akula/target/production/deps/libitertools-9f2395859953af26.rlib --extern jsonrpsee=/home/username/akula/target/production/deps/libjsonrpsee-6d66229c4aa0cfc4.rlib --extern mdbx=/home/username/akula/target/production/deps/liblibmdbx-9713605e23e37eaa.rlib --extern lru=/home/username/akula/target/production/deps/liblru-e220886ccf12a874.rlib --extern maplit=/home/username/akula/target/production/deps/libmaplit-a4210bc40fcd0860.rlib --extern modular_bitfield=/home/username/akula/target/production/deps/libmodular_bitfield-4a0c073d44c59ed5.rlib --extern num_bigint=/home/username/akula/target/production/deps/libnum_bigint-9dd48572668cc555.rlib --extern num_traits=/home/username/akula/target/production/deps/libnum_traits-eeddc04ac4df34c3.rlib --extern num_cpus=/home/username/akula/target/production/deps/libnum_cpus-0471bda384f210f1.rlib --extern once_cell=/home/username/akula/target/production/deps/libonce_cell-2e7de0613428ab15.rlib --extern parity_scale_codec=/home/username/akula/target/production/deps/libparity_scale_codec-cf4e2aff2da41f9b.rlib --extern parking_lot=/home/username/akula/target/production/deps/libparking_lot-f58e319d9e299ddf.rlib --extern primitive_types=/home/username/akula/target/production/deps/libprimitive_types-8688990a1651b486.rlib --extern public_ip=/home/username/akula/target/production/deps/libpublic_ip-adad622e4bf3df23.rlib --extern rand=/home/username/akula/target/production/deps/librand-181453554d659832.rlib --extern rayon=/home/username/akula/target/production/deps/librayon-6bfc5a55605318c7.rlib --extern ripemd=/home/username/akula/target/production/deps/libripemd-e6e5e9ff6d3489c5.rlib --extern ron=/home/username/akula/target/production/deps/libron-8885ebe9209d28f5.rlib --extern secp256k1=/home/username/akula/target/production/deps/libsecp256k1-4614ca4ed1755561.rlib --extern serde=/home/username/akula/target/production/deps/libserde-3c251d2f9016df84.rlib --extern serde_json=/home/username/akula/target/production/deps/libserde_json-98ad43c02c3e3d72.rlib --extern serde_with=/home/username/akula/target/production/deps/libserde_with-11fcfd37a1b0c40d.rlib --extern sha2=/home/username/akula/target/production/deps/libsha2-49c48e1a6814c4aa.rlib --extern sha3=/home/username/akula/target/production/deps/libsha3-98d7d5a6e50366b6.rlib --extern shellexpand=/home/username/akula/target/production/deps/libshellexpand-209a801dd0961764.rlib --extern snap=/home/username/akula/target/production/deps/libsnap-d1f9911083e67855.rlib --extern string=/home/username/akula/target/production/deps/libstring-a2cc6e1d0f4b20d8.rlib --extern strum=/home/username/akula/target/production/deps/libstrum-ffdb2fba720d3cd3.rlib --extern strum_macros=/home/username/akula/target/production/deps/libstrum_macros-c7f87c0361a80d65.so --extern stubborn_io=/home/username/akula/target/production/deps/libstubborn_io-76aad4a5b5db123e.rlib --extern substrate_bn=/home/username/akula/target/production/deps/libsubstrate_bn-f1a294270da19326.rlib --extern task_group=/home/username/akula/target/production/deps/libtask_group-161f616177793eae.rlib --extern tempfile=/home/username/akula/target/production/deps/libtempfile-dcdc3bb4ca7ff518.rlib --extern thiserror=/home/username/akula/target/production/deps/libthiserror-4ce3d2dcf2ddae5c.rlib --extern tokio=/home/username/akula/target/production/deps/libtokio-503475f999260bb9.rlib --extern tokio_stream=/home/username/akula/target/production/deps/libtokio_stream-5cc293e46cdb903c.rlib --extern tokio_util=/home/username/akula/target/production/deps/libtokio_util-11d9131bbd58306e.rlib --extern toml=/home/username/akula/target/production/deps/libtoml-e3a49dcd80beff85.rlib --extern tonic=/home/username/akula/target/production/deps/libtonic-6d6ce587994eee82.rlib --extern tonic_health=/home/username/akula/target/production/deps/libtonic_health-2e027cae9ac48e50.rlib --extern tonic_reflection=/home/username/akula/target/production/deps/libtonic_reflection-d3199e4f3a138652.rlib --extern tracing=/home/username/akula/target/production/deps/libtracing-5069de77b875769e.rlib --extern tracing_futures=/home/username/akula/target/production/deps/libtracing_futures-fd57c55d8ee5444e.rlib --extern tracing_subscriber=/home/username/akula/target/production/deps/libtracing_subscriber-958938441c6efa13.rlib --extern trust_dns_resolver=/home/username/akula/target/production/deps/libtrust_dns_resolver-8ad98f087d5b4b64.rlib --extern url=/home/username/akula/target/production/deps/liburl-0132cca616671034.rlib --extern walkdir=/home/username/akula/target/production/deps/libwalkdir-0312402ed75115a7.rlib -L native=/home/username/akula/target/production/build/croaring-sys-6ca89f33119515a2/out -L native=/usr/lib64 -L native=/home/username/akula/target/production/build/secp256k1-sys-462906f7490fbf6c/out -L native=/home/username/akula/target/production/build/ethnum-intrinsics-9d9c3b35c1de8a41/out -L native=/home/username/akula/target/production/build/mdbx-sys-2f96fe6b622e20c2/out` (signal: 9, SIGKILL: kill)
warning: build failed, waiting for other jobs to finish...
error: could not compile `akula`

Caused by:
  process didn't exit successfully: `rustc --crate-name akula_rpc --edition=2021 bin/akula-rpc.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C lto -C codegen-units=1 --cfg 'feature="default"' -C metadata=9b3ee1393f5ac1dd -C extra-filename=-9b3ee1393f5ac1dd --out-dir /home/username/akula/target/production/deps -L dependency=/home/username/akula/target/production/deps --extern aes=/home/username/akula/target/production/deps/libaes-efcd5e7b0381f263.rlib --extern akula=/home/username/akula/target/production/deps/libakula-d7190c7fa5a59e55.rlib --extern anyhow=/home/username/akula/target/production/deps/libanyhow-e03a41e52952291e.rlib --extern array_init=/home/username/akula/target/production/deps/libarray_init-e47fed719eb16217.rlib --extern arrayref=/home/username/akula/target/production/deps/libarrayref-d702ea2952db0042.rlib --extern arrayvec=/home/username/akula/target/production/deps/libarrayvec-2d90c6f68f6b9cf1.rlib --extern async_recursion=/home/username/akula/target/production/deps/libasync_recursion-13069556d7731089.so --extern async_stream=/home/username/akula/target/production/deps/libasync_stream-3bf31b8f5f81fa82.rlib --extern async_trait=/home/username/akula/target/production/deps/libasync_trait-4591a482dca46781.so --extern auto_impl=/home/username/akula/target/production/deps/libauto_impl-15c84ca948602ce3.so --extern block_padding=/home/username/akula/target/production/deps/libblock_padding-ba120322187de442.rlib --extern byte_unit=/home/username/akula/target/production/deps/libbyte_unit-11472f1179c189f8.rlib --extern byteorder=/home/username/akula/target/production/deps/libbyteorder-ffbc6f5423ecdc80.rlib --extern bytes=/home/username/akula/target/production/deps/libbytes-2d147b2ed3cb85ac.rlib --extern bytes_literal=/home/username/akula/target/production/deps/libbytes_literal-093a1bb7527985bf.rlib --extern bytesize=/home/username/akula/target/production/deps/libbytesize-f042459baacc31e0.rlib --extern cidr=/home/username/akula/target/production/deps/libcidr-fdebf8057f16e98b.rlib --extern cipher=/home/username/akula/target/production/deps/libcipher-a6914f5b3d335a2e.rlib --extern clap=/home/username/akula/target/production/deps/libclap-0406dd1d101e2253.rlib --extern croaring=/home/username/akula/target/production/deps/libcroaring-9adc0e69aef9cf77.rlib --extern ctr=/home/username/akula/target/production/deps/libctr-5e6ffcc7c5fa1930.rlib --extern dashmap=/home/username/akula/target/production/deps/libdashmap-25a2239fd36392d3.rlib --extern data_encoding=/home/username/akula/target/production/deps/libdata_encoding-a55061823f789cfa.rlib --extern derive_more=/home/username/akula/target/production/deps/libderive_more-bdec577bd20bcec7.so --extern digest=/home/username/akula/target/production/deps/libdigest-aa5ae591f1f23a27.rlib --extern directories=/home/username/akula/target/production/deps/libdirectories-9c70ee9a01c89224.rlib --extern e2p_fileflags=/home/username/akula/target/production/deps/libe2p_fileflags-3a1e099c7a86a42d.rlib --extern educe=/home/username/akula/target/production/deps/libeduce-6fde3e6801faad81.so --extern enr=/home/username/akula/target/production/deps/libenr-dd3dbabb961829b8.rlib --extern enum_primitive_derive=/home/username/akula/target/production/deps/libenum_primitive_derive-ce4693d5950f9429.so --extern ethereum_forkid=/home/username/akula/target/production/deps/libethereum_forkid-889750a7cfca5d92.rlib --extern ethereum_interfaces=/home/username/akula/target/production/deps/libethereum_interfaces-67a2a942d98158bf.rlib --extern ethereum_jsonrpc=/home/username/akula/target/production/deps/libethereum_jsonrpc-ec8869cd10133c4b.rlib --extern ethereum_types=/home/username/akula/target/production/deps/libethereum_types-bc2428ed893aee9e.rlib --extern ethnum=/home/username/akula/target/production/deps/libethnum-57db6c210dc6898d.rlib --extern expanded_pathbuf=/home/username/akula/target/production/deps/libexpanded_pathbuf-3e08609f07084ab7.rlib --extern fastrlp=/home/username/akula/target/production/deps/libfastrlp-80dbc6448374a5d5.rlib --extern fdlimit=/home/username/akula/target/production/deps/libfdlimit-b9b46b11e6e344f8.rlib --extern futures=/home/username/akula/target/production/deps/libfutures-e4778f6c559398bf.rlib --extern futures_intrusive=/home/username/akula/target/production/deps/libfutures_intrusive-5d7656d8e439791c.rlib --extern gen_iter=/home/username/akula/target/production/deps/libgen_iter-b72717fd6a5483a5.rlib --extern generic_array=/home/username/akula/target/production/deps/libgeneric_array-dec4a91afab26fd9.rlib --extern getset=/home/username/akula/target/production/deps/libgetset-e4972980768a595a.so --extern hash_db=/home/username/akula/target/production/deps/libhash_db-bba1158587afabc9.rlib --extern hash256_std_hasher=/home/username/akula/target/production/deps/libhash256_std_hasher-a4d78709f15c3419.rlib --extern hashbrown=/home/username/akula/target/production/deps/libhashbrown-896feee294571ddb.rlib --extern hashlink=/home/username/akula/target/production/deps/libhashlink-ab9dc743f5567373.rlib --extern hex=/home/username/akula/target/production/deps/libhex-83f06f9b5e7293d0.rlib --extern hex_literal=/home/username/akula/target/production/deps/libhex_literal-af47c1e87033b53a.so --extern hmac=/home/username/akula/target/production/deps/libhmac-b2563b443df7f8c6.rlib --extern http=/home/username/akula/target/production/deps/libhttp-7d22bbf56dfa52bd.rlib --extern i256=/home/username/akula/target/production/deps/libi256-4bcdcefdf01ed291.rlib --extern igd=/home/username/akula/target/production/deps/libigd-f1dcff43247b7b29.rlib --extern impls=/home/username/akula/target/production/deps/libimpls-24acd699211dcc60.rlib --extern itertools=/home/username/akula/target/production/deps/libitertools-9f2395859953af26.rlib --extern jsonrpsee=/home/username/akula/target/production/deps/libjsonrpsee-6d66229c4aa0cfc4.rlib --extern mdbx=/home/username/akula/target/production/deps/liblibmdbx-9713605e23e37eaa.rlib --extern lru=/home/username/akula/target/production/deps/liblru-e220886ccf12a874.rlib --extern maplit=/home/username/akula/target/production/deps/libmaplit-a4210bc40fcd0860.rlib --extern modular_bitfield=/home/username/akula/target/production/deps/libmodular_bitfield-4a0c073d44c59ed5.rlib --extern num_bigint=/home/username/akula/target/production/deps/libnum_bigint-9dd48572668cc555.rlib --extern num_traits=/home/username/akula/target/production/deps/libnum_traits-eeddc04ac4df34c3.rlib --extern num_cpus=/home/username/akula/target/production/deps/libnum_cpus-0471bda384f210f1.rlib --extern once_cell=/home/username/akula/target/production/deps/libonce_cell-2e7de0613428ab15.rlib --extern parity_scale_codec=/home/username/akula/target/production/deps/libparity_scale_codec-cf4e2aff2da41f9b.rlib --extern parking_lot=/home/username/akula/target/production/deps/libparking_lot-f58e319d9e299ddf.rlib --extern primitive_types=/home/username/akula/target/production/deps/libprimitive_types-8688990a1651b486.rlib --extern public_ip=/home/username/akula/target/production/deps/libpublic_ip-adad622e4bf3df23.rlib --extern rand=/home/username/akula/target/production/deps/librand-181453554d659832.rlib --extern rayon=/home/username/akula/target/production/deps/librayon-6bfc5a55605318c7.rlib --extern ripemd=/home/username/akula/target/production/deps/libripemd-e6e5e9ff6d3489c5.rlib --extern ron=/home/username/akula/target/production/deps/libron-8885ebe9209d28f5.rlib --extern secp256k1=/home/username/akula/target/production/deps/libsecp256k1-4614ca4ed1755561.rlib --extern serde=/home/username/akula/target/production/deps/libserde-3c251d2f9016df84.rlib --extern serde_json=/home/username/akula/target/production/deps/libserde_json-98ad43c02c3e3d72.rlib --extern serde_with=/home/username/akula/target/production/deps/libserde_with-11fcfd37a1b0c40d.rlib --extern sha2=/home/username/akula/target/production/deps/libsha2-49c48e1a6814c4aa.rlib --extern sha3=/home/username/akula/target/production/deps/libsha3-98d7d5a6e50366b6.rlib --extern shellexpand=/home/username/akula/target/production/deps/libshellexpand-209a801dd0961764.rlib --extern snap=/home/username/akula/target/production/deps/libsnap-d1f9911083e67855.rlib --extern string=/home/username/akula/target/production/deps/libstring-a2cc6e1d0f4b20d8.rlib --extern strum=/home/username/akula/target/production/deps/libstrum-ffdb2fba720d3cd3.rlib --extern strum_macros=/home/username/akula/target/production/deps/libstrum_macros-c7f87c0361a80d65.so --extern stubborn_io=/home/username/akula/target/production/deps/libstubborn_io-76aad4a5b5db123e.rlib --extern substrate_bn=/home/username/akula/target/production/deps/libsubstrate_bn-f1a294270da19326.rlib --extern task_group=/home/username/akula/target/production/deps/libtask_group-161f616177793eae.rlib --extern tempfile=/home/username/akula/target/production/deps/libtempfile-dcdc3bb4ca7ff518.rlib --extern thiserror=/home/username/akula/target/production/deps/libthiserror-4ce3d2dcf2ddae5c.rlib --extern tokio=/home/username/akula/target/production/deps/libtokio-503475f999260bb9.rlib --extern tokio_stream=/home/username/akula/target/production/deps/libtokio_stream-5cc293e46cdb903c.rlib --extern tokio_util=/home/username/akula/target/production/deps/libtokio_util-11d9131bbd58306e.rlib --extern toml=/home/username/akula/target/production/deps/libtoml-e3a49dcd80beff85.rlib --extern tonic=/home/username/akula/target/production/deps/libtonic-6d6ce587994eee82.rlib --extern tonic_health=/home/username/akula/target/production/deps/libtonic_health-2e027cae9ac48e50.rlib --extern tonic_reflection=/home/username/akula/target/production/deps/libtonic_reflection-d3199e4f3a138652.rlib --extern tracing=/home/username/akula/target/production/deps/libtracing-5069de77b875769e.rlib --extern tracing_futures=/home/username/akula/target/production/deps/libtracing_futures-fd57c55d8ee5444e.rlib --extern tracing_subscriber=/home/username/akula/target/production/deps/libtracing_subscriber-958938441c6efa13.rlib --extern trust_dns_resolver=/home/username/akula/target/production/deps/libtrust_dns_resolver-8ad98f087d5b4b64.rlib --extern url=/home/username/akula/target/production/deps/liburl-0132cca616671034.rlib --extern walkdir=/home/username/akula/target/production/deps/libwalkdir-0312402ed75115a7.rlib -L native=/home/username/akula/target/production/build/croaring-sys-6ca89f33119515a2/out -L native=/usr/lib64 -L native=/home/username/akula/target/production/build/secp256k1-sys-462906f7490fbf6c/out -L native=/home/username/akula/target/production/build/ethnum-intrinsics-9d9c3b35c1de8a41/out -L native=/home/username/akula/target/production/build/mdbx-sys-2f96fe6b622e20c2/out` (signal: 9, SIGKILL: kill)
```

→メモリ不足っぽいので、ここでさくらVPSのプランを1Gから2Gに変更

# ログ（さくらのVPS 2G編）

* CPU: 仮想3Core, x86_64
* メモリ: 2GB
* SSD: 100GB

にアップグレードしてビルドを再開するも、いつまでたってもビルドが進まない。CPUかメモリの不足と判断し、Amazon EC2上でのビルドに切り替えることに（さくらのVPSは月単位の課金で初回は2ヶ月分の支払いが必要なので、スペックの高いサーバーを使いたくない）

# ログ（Amazon EC2 r6g.large編）

* CPU: 仮想1Core, aarch64
* メモリ: 16GB
* ディスク容量: 10GB
* OS: Rocky Linux 8(マイナーバージョンは確認していない)
* Akulaのバージョン: 5754e9a4045ca8aa6044beca21b6dd4604f68b6b

にてビルドを再実施。ほぼ同じ手順でビルドを進めた。

```
$ sudo yum update

# 公式ページに書いてあるものをインストール
$ sudo yum install clang
$ sudo yum install e2fsprogs-libs
$ sudo yum install pkgconf-pkg-config

$ sudo yum install git

# Rustのインストール(Profileはminimalを選択)
$ curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh

# 足りないものを色々インストールした
$ sudo yum install lld
$ sudo yum install binutils
$ sudo yum install e2fsprogs-devel

# シンボリックリンクを貼ってコンパイルが通るようにした(~/.local/bin)
$ sudo ln -s /usr/bin/clang cc
$ sudo ln -s /usr/bin/ld.lld ld
$ sudo ln -s /usr/bin/clang++ c++
```

20分ほどかかってビルドは無事に完了。

# 実行

```
$ cd /home/rocky
$ mkdir akuladata
$ cd akula/target/production
$ ./akula --datadir=/home/rocky/akuladata
2022-10-13T23:12:05.263252Z  INFO Starting Akula (akula/v0.1.0-master-5754e9a-2022-10-12/aarch64-unknown-linux-gnu/rustc1.64.0)
2022-10-13T23:12:05.424693Z  INFO Current network: Ethereum
2022-10-13T23:12:05.450903Z  INFO Generated new node key: xxxxxxxxxxxxxxxxxxxxxxxxx
2022-10-13T23:12:05.450974Z  INFO HTTP server listening on 127.0.0.1:8545
2022-10-13T23:12:05.450986Z  INFO WebSocket server listening on 127.0.0.1:8546
2022-10-13T23:12:05.450994Z  INFO Starting Ethereum P2P node
2022-10-13T23:12:05.451000Z  INFO Starting gRPC server on 127.0.0.1:7545
2022-10-13T23:12:05.451325Z  INFO Node ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2022-10-13T23:12:05.451386Z  INFO Starting DNS discovery fetch from all.mainnet.ethdisco.net
2022-10-13T23:12:05.451475Z  INFO Starting discv4 at port 30303
2022-10-13T23:12:05.452352Z  INFO RLPx node listening at 0.0.0.0:30303
2022-10-13T23:12:05.453934Z  INFO Sentry gRPC server starting on 127.0.0.1:8000
2022-10-13T23:12:06.453765Z  INFO Running staged sync
2022-10-13T23:12:06.453816Z  INFO { 1/14 Headers }: RUNNING from genesis
2022-10-13T23:12:06.454560Z  INFO { 1/14 Headers }: Awaiting chain tip...
2022-10-13T23:12:11.454838Z  INFO P2P node peer info: 2 active (+4 dialing) / 100 max.
2022-10-13T23:12:16.455975Z  INFO P2P node peer info: 4 active (+9 dialing) / 100 max.
2022-10-13T23:12:21.456789Z  INFO P2P node peer info: 5 active (+7 dialing) / 100 max.
```

おお〜起動した・・・

まだ上記のログが何を表しているのかすら分かってませんが（というか、色々なポートをリッスンしてるようだが、セキュリティグループでSSH以外のアクセスを許可してないのでまともに動作するとは思えない）、とりあえず起動はできたと言うことで、バンザイ。

以上です。