1

GM, I installed the dependencies for WSL mentioned in the docs, but I am unable to compile the template node. Any tips?

zach@DESKTOP-P2G1H4R:~/substrate/substrate-node-template$ cargo build --package node-template --release
   Compiling wasm-opt-sys v0.111.0
   Compiling librocksdb-sys v0.8.3+7.4.4
The following warnings were emitted during compilation:

warning: c++: fatal error: Killed signal terminated program cc1plus
warning: compilation terminated.

error: failed to run custom build command for `wasm-opt-sys v0.111.0`

Caused by:
  process didn't exit successfully: `/home/zach/substrate/substrate-node-template/target/release/build/wasm-opt-sys-9ea94ca4aad9a4e6/build-script-build` (exit status: 1)
  --- stdout
  TARGET = Some("x86_64-unknown-linux-gnu")
  HOST = Some("x86_64-unknown-linux-gnu")
  cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu
  CXX_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu
  CXX_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CXX
  HOST_CXX = None
  cargo:rerun-if-env-changed=CXX
  CXX = None
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu
  CXXFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_gnu
  CXXFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CXXFLAGS
  HOST_CXXFLAGS = None
  cargo:rerun-if-env-changed=CXXFLAGS
  CXXFLAGS = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  cargo:CXXBRIDGE_PREFIX=wasm-opt-sys
  cargo:CXXBRIDGE_LINKS=binaryen
  cargo:CXXBRIDGE_DIR0=/home/zach/substrate/substrate-node-template/target/release/build/wasm-opt-sys-89f52395fdb4b223/out/cxxbridge/include
  cargo:CXXBRIDGE_DIR1=/home/zach/substrate/substrate-node-template/target/release/build/wasm-opt-sys-89f52395fdb4b223/out/cxxbridge/crate
  cargo:CXXBRIDGE_DIR2=/home/zach/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-opt-sys-0.111.0/binaryen/src
  cargo:CXXBRIDGE_DIR3=/home/zach/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-opt-sys-0.111.0/binaryen/src/tools
  cargo:CXXBRIDGE_DIR4=/home/zach/substrate/substrate-node-template/target/release/build/wasm-opt-sys-89f52395fdb4b223/out
  TARGET = Some("x86_64-unknown-linux-gnu")
  OPT_LEVEL = Some("0")
  HOST = Some("x86_64-unknown-linux-gnu")
  cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu
  CXX_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu
  CXX_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CXX
  HOST_CXX = None
  cargo:rerun-if-env-changed=CXX
  CXX = None
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu
  CXXFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_gnu
  CXXFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CXXFLAGS
  HOST_CXXFLAGS = None
  cargo:rerun-if-env-changed=CXXFLAGS
  CXXFLAGS = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  running: "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "/home/zach/substrate/substrate-node-template/target/release/build/wasm-opt-sys-89f52395fdb4b223/out/cxxbridge/include" "-I" "/home/zach/substrate/substrate-node-template/target/release/build/wasm-opt-sys-89f52395fdb4b223/out/cxxbridge/crate" "-I" "/home/zach/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-opt-sys-0.111.0/binaryen/src" "-I" "/home/zach/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-opt-sys-0.111.0/binaryen/src/tools" "-I" "/home/zach/substrate/substrate-node-template/target/release/build/wasm-opt-sys-89f52395fdb4b223/out" "-Wall" "-Wextra" "-std=c++17" "-Wno-unused-parameter" "-DTHROW_ON_FATAL" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/wasm-opt-sys-89f52395fdb4b223/out/1b6f66997aeb10ce-parsing.o" "-c" "/home/zach/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-opt-sys-0.111.0/binaryen/src/wasm/parsing.cpp"
  
warning: build failed, waiting for other jobs to finish...
The following warnings were emitted during compilation:

warning: c++: fatal error: Killed signal terminated program cc1plus
warning: compilation terminated.
warning: c++: fatal error: Killed signal terminated program cc1plus
warning: compilation terminated.
warning: c++: fatal error: Killed signal terminated program cc1plus
warning: compilation terminated.

error: failed to run custom build command for `librocksdb-sys v0.8.3+7.4.4`

Caused by:
  process didn't exit successfully: `/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-3172205394e5ba33/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-changed=rocksdb/
  TARGET = Some("x86_64-unknown-linux-gnu")
  OPT_LEVEL = Some("3")
  HOST = Some("x86_64-unknown-linux-gnu")
  cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu
  CXX_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu
  CXX_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CXX
  HOST_CXX = None
  cargo:rerun-if-env-changed=CXX
  CXX = None
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu
  CXXFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_gnu
  CXXFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CXXFLAGS
  HOST_CXXFLAGS = None
  cargo:rerun-if-env-changed=CXXFLAGS
  CXXFLAGS = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu
  CXX_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu
  CXX_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CXX
  HOST_CXX = None
  cargo:rerun-if-env-changed=CXX
  CXX = None
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu
  CXXFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_gnu
  CXXFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CXXFLAGS
  HOST_CXXFLAGS = None
  cargo:rerun-if-env-changed=CXXFLAGS
  CXXFLAGS = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu
  CXX_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu
  CXX_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CXX
  HOST_CXX = None
  cargo:rerun-if-env-changed=CXX
  CXX = None
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu
  CXXFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_gnu
  CXXFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CXXFLAGS
  HOST_CXXFLAGS = None
  cargo:rerun-if-env-changed=CXXFLAGS
  CXXFLAGS = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/cache/cache_entry_roles.o" "-c" "rocksdb/cache/cache_entry_roles.cc"
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/cache/cache.o" "-c" "rocksdb/cache/cache.cc"
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/cache/cache_key.o" "-c" "rocksdb/cache/cache_key.cc"
  exit status: 0
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/cache/cache_reservation_manager.o" "-c" "rocksdb/cache/cache_reservation_manager.cc"
  exit status: 0
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/cache/clock_cache.o" "-c" "rocksdb/cache/clock_cache.cc"
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/cache/fast_lru_cache.o" "-c" "rocksdb/cache/fast_lru_cache.cc"
  exit status: 0
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/cache/lru_cache.o" "-c" "rocksdb/cache/lru_cache.cc"
  exit status: 0
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/cache/compressed_secondary_cache.o" "-c" "rocksdb/cache/compressed_secondary_cache.cc"
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/cache/sharded_cache.o" "-c" "rocksdb/cache/sharded_cache.cc"
  exit status: 0
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/arena_wrapped_db_iter.o" "-c" "rocksdb/db/arena_wrapped_db_iter.cc"
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/blob/blob_fetcher.o" "-c" "rocksdb/db/blob/blob_fetcher.cc"
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/blob/blob_file_addition.o" "-c" "rocksdb/db/blob/blob_file_addition.cc"
  exit status: 0
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/blob/blob_file_builder.o" "-c" "rocksdb/db/blob/blob_file_builder.cc"
  exit status: 0
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/blob/blob_file_garbage.o" "-c" "rocksdb/db/blob/blob_file_garbage.cc"
  exit status: 0
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/blob/blob_file_meta.o" "-c" "rocksdb/db/blob/blob_file_meta.cc"
  exit status: 0
  exit status: 0
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/blob/blob_file_reader.o" "-c" "rocksdb/db/blob/blob_file_reader.cc"
  exit status: 0
  exit status: 0
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/blob/blob_garbage_meter.o" "-c" "rocksdb/db/blob/blob_garbage_meter.cc"
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/blob/blob_log_format.o" "-c" "rocksdb/db/blob/blob_log_format.cc"
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/blob/blob_log_sequential_reader.o" "-c" "rocksdb/db/blob/blob_log_sequential_reader.cc"
  exit status: 0
  exit status: 0
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/blob/blob_log_writer.o" "-c" "rocksdb/db/blob/blob_log_writer.cc"
  exit status: 0
  exit status: 0
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/blob/blob_source.o" "-c" "rocksdb/db/blob/blob_source.cc"
  exit status: 0

  exit status: 0
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/db_impl/compacted_db_impl.o" "-c" "rocksdb/db/db_impl/compacted_db_impl.cc"
  exit status: 0
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/db_impl/db_impl.o" "-c" "rocksdb/db/db_impl/db_impl.cc"
  exit status: 0

...
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/experimental.o" "-c" "rocksdb/db/experimental.cc"
  exit status: 0
  cargo:warning=c++: fatal error: Killed signal terminated program cc1plus
  cargo:warning=compilation terminated.
  exit status: 1
  cargo:warning=c++: fatal error: Killed signal terminated program cc1plus
  cargo:warning=compilation terminated.
  exit status: 1
  exit status: 0
  exit status: 0
  exit status: 0
  exit status: 0
  exit status: 0
  exit status: 0
  exit status: 0
  exit status: 0
  exit status: 0
  exit status: 0

  --- stderr


  error occurred: Command "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "rocksdb/include/" "-I" "rocksdb/" "-I" "rocksdb/third-party/gtest-1.8.1/fused-src/" "-I" "snappy/" "-I" "." "-Wall" "-Wextra" "-std=c++17" "-Wsign-compare" "-Wshadow" "-Wno-unused-parameter" "-Wno-unused-variable" "-Woverloaded-virtual" "-Wnon-virtual-dtor" "-Wno-missing-field-initializers" "-Wno-strict-aliasing" "-Wno-invalid-offsetof" "-msse2" "-std=c++17" "-DSNAPPY=1" "-DNDEBUG=1" "-DOS_LINUX" "-DROCKSDB_PLATFORM_POSIX" "-DROCKSDB_LIB_IO_POSIX" "-DROCKSDB_SUPPORT_THREAD_LOCAL" "-DWITH_JEMALLOC=ON" "-DHAVE_UINT128_EXTENSION=1" "-DHAVE_UINT128_EXTENSION=1" "-o" "/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/db_impl/db_impl_experimental.o" "-c" "rocksdb/db/db_impl/db_impl_experimental.cc" with args "c++" did not execute successfully (status code exit status: 1).

1 Answer 1

2

Increase your swap space or give more memory to the WSL.

WSL will use half of your physical memory by default.

Also, check:

https://superuser.com/questions/1707758/wsl-2-does-not-have-all-memory-available-to-it


Just a tip:

When I run cargo test --workspace --all-features under the substrate repo. It took around 100g ram on my computer.

2
  • Thank you very much for the tip! I'm still getting the same error unfortunately -- I doubled the ram consumption to 16GB. At this point I either need a new computer / upgrade this machine or there is some issue with the C++ dependencies Commented Mar 13, 2023 at 15:16
  • Try increasing the swap. And what's your build command?
    – AurevoirXavier
    Commented Mar 14, 2023 at 2:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.