Polkadex-Substrate / Polkadex

An Orderbook-based Decentralized Exchange using the Substrate Blockchain Framework.
https://www.polkadex.trade
GNU General Public License v3.0
285 stars 93 forks source link

Wont build - ubuntu 20.04 #26

Closed mahalamobile closed 3 years ago

mahalamobile commented 3 years ago

please help

root@ubuntu-s-1vcpu-1gb-polkadex:~/Polkadex# cargo build --release Compiling node-polkadex-runtime v2.0.0-rc6 (/root/Polkadex/runtime) Compiling node-polkadex v2.0.0-rc6 (/root/Polkadex/node) error: could not compile node-polkadex

Caused by: process didn't exit successfully: rustc --crate-name node_polkadex --edition=2018 node/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=276300912b27e3ac -C extra-filename=-276300912b27e3ac --out-dir /root/Polkadex/target/release/deps -L dependency=/root/Polkadex/target/release/deps --extern jsonrpc_core=/root/Polkadex/target/release/deps/libjsonrpc_core-9b0b0492c96f271b.rmeta --extern jsonrpc_core_client=/root/Polkadex/target/release/deps/libjsonrpc_core_client-603a0c90edc1f736.rmeta --extern jsonrpc_derive=/root/Polkadex/target/release/deps/libjsonrpc_derive-f4487a8f83370a07.so --extern node_polkadex_runtime=/root/Polkadex/target/release/deps/libnode_polkadex_runtime-2b4b7f159fb3a3b6.rmeta --extern pallet_transaction_payment_rpc=/root/Polkadex/target/release/deps/libpallet_transaction_payment_rpc-9571780298b0097c.rmeta --extern rpc=/root/Polkadex/target/release/deps/librpc-d4277266da7a6c28.rmeta --extern runtime_api=/root/Polkadex/target/release/deps/libruntime_api-f154747cca61e4ad.rmeta --extern sc_basic_authorship=/root/Polkadex/target/release/deps/libsc_basic_authorship-8bff4cca6753195d.rmeta --extern sc_cli=/root/Polkadex/target/release/deps/libsc_cli-5f946e43d367d576.rmeta --extern sc_client_api=/root/Polkadex/target/release/deps/libsc_client_api-97175913e7850850.rmeta --extern sc_consensus=/root/Polkadex/target/release/deps/libsc_consensus-6ce14f90ffe97330.rmeta --extern sc_consensus_babe=/root/Polkadex/target/release/deps/libsc_consensus_babe-e63846dc67e4b858.rmeta --extern sc_executor=/root/Polkadex/target/release/deps/libsc_executor-dca1c4963320bee5.rmeta --extern sc_finality_grandpa=/root/Polkadex/target/release/deps/libsc_finality_grandpa-90fe0e5b86f2c5f0.rmeta --extern sc_rpc=/root/Polkadex/target/release/deps/libsc_rpc-f193b9368bdcbffd.rmeta --extern sc_rpc_api=/root/Polkadex/target/release/deps/libsc_rpc_api-a5bf96f7b482689f.rmeta --extern sc_service=/root/Polkadex/target/release/deps/libsc_service-22ea5f9d9278674d.rmeta --extern sc_transaction_pool=/root/Polkadex/target/release/deps/libsc_transaction_pool-3cf652806ace7654.rmeta --extern sp_api=/root/Polkadex/target/release/deps/libsp_api-c5fa8a76061b02c9.rmeta --extern sp_block_builder=/root/Polkadex/target/release/deps/libsp_block_builder-386d012d05ba4d95.rmeta --extern sp_blockchain=/root/Polkadex/target/release/deps/libsp_blockchain-bc367ed12e740e05.rmeta --extern sp_consensus=/root/Polkadex/target/release/deps/libsp_consensus-c684c93b78b31b5a.rmeta --extern sp_consensus_babe=/root/Polkadex/target/release/deps/libsp_consensus_babe-0eee42cae05b4bde.rmeta --extern sp_core=/root/Polkadex/target/release/deps/libsp_core-6c35f85790f0f226.rmeta --extern sp_finality_grandpa=/root/Polkadex/target/release/deps/libsp_finality_grandpa-8a92cb7367a22be7.rmeta --extern sp_inherents=/root/Polkadex/target/release/deps/libsp_inherents-4d842d058ef3183a.rmeta --extern sp_runtime=/root/Polkadex/target/release/deps/libsp_runtime-d2cbe6284c68a828.rmeta --extern sp_transaction_pool=/root/Polkadex/target/release/deps/libsp_transaction_pool-d4ca49994cc2f87b.rmeta --extern structopt=/root/Polkadex/target/release/deps/libstructopt-d07791ba3397a584.rmeta --extern substrate_frame_rpc_system=/root/Polkadex/target/release/deps/libsubstrate_frame_rpc_system-d36bb9cf78d899bb.rmeta -L native=/root/Polkadex/target/release/build/ring-562b25fb7dbe1699/out -L native=/root/Polkadex/target/release/build/libz-sys-68b6c7804e5ae034/out/build -L native=/root/Polkadex/target/release/build/zstd-sys-9bb7b935c7dbcd10/out -L native=/root/Polkadex/target/release/build/wasmtime-runtime-afcdc8d0320438a5/out -L native=/root/Polkadex/target/release/build/librocksdb-sys-6e30ee65f7cd0b83/out -L native=/root/Polkadex/target/release/build/librocksdb-sys-6e30ee65f7cd0b83/out (signal: 9, SIGKILL: kill) root@ubuntu-s-1vcpu-1gb-polkadex:~/Polkadex#

Gauthamastro commented 3 years ago

@mahalamobile Please share the rustc and wasm target version. I am closing the same issue you posted in Documentation

mahalamobile commented 3 years ago

followed this link

https://github.com/Polkadex-Substrate/Documentation/blob/master/Tutorials/README1.md

Compile

Clone the Polkadex repository.
Initialize the WebAssembly Environment

# Load settings into the current shell script if you can't use rustup command
# If you've run this before, you don't need to run it again. But doing so is harmless.
source ~/.cargo/env

# Set Rust Version
rustup override set nightly-2020-09-28

# Add Wasm target
rustup target add wasm32-unknown-unknown --toolchain nightly-2020-09-28

Change directory and Compile the Polkadex Chain

cd polkadex/
cargo build --release

now im trying this

rustup update nightly rustup update stable

rustup target add wasm32-unknown-unknown --toolchain nightly

mahalamobile commented 3 years ago

same error :(

mahalamobile commented 3 years ago

rustup --version rustup 1.22.1 (b01adbbc3 2020-07-08) root@ubuntu-s-1vcpu-1gb-polkadex:/usr/share# cd .. root@ubuntu-s-1vcpu-1gb-polkadex:/usr# cd .. root@ubuntu-s-1vcpu-1gb-polkadex:/# rustup show Default host: x86_64-unknown-linux-gnu rustup home: /root/.rustup

installed toolchains

stable-x86_64-unknown-linux-gnu (default) nightly-2020-09-28-x86_64-unknown-linux-gnu nightly-x86_64-unknown-linux-gnu

active toolchain

stable-x86_64-unknown-linux-gnu (default) rustc 1.47.0 (18bf6b4f0 2020-10-07)

Gauthamastro commented 3 years ago

@mahalamobile It's compiling fine in my machine, and also Travis CI is not failing too. It is due to Out-Of-Memory Error during compilation. Try to use a machine with more RAM. I am using a machine with 16 GB RAM.

Please let me know if you face any other issues. Closing this issue for now.