paritytech / substrate

Substrate: The platform for blockchain innovators
Apache License 2.0
8.39k stars 2.65k forks source link

Abort when building node template #2257

Closed hanwencheng closed 5 years ago

hanwencheng commented 5 years ago

Hi,

I just installed Substrate with the command,

$ curl https://getsubstrate.io -sSf | bash -s,

encountered and solved a previous issue which is https://github.com/paritytech/scripts/issues/67

After that, I try to build the node template with substrate-node-new substrate-node-template <author-name>

now another compiling error happens, I have checked a same issue on Rustlang, it seems related to the code in the rust script, but I am not sure how to solve it.

Here is the complete log:

substrate-node-new substrate-node-template hanwencheng                     
Downloading project...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 66477  100 66477    0     0  40478      0  0:00:01  0:00:01 --:--:-- 40485
mv: rename substrate-node-template to substrate-node-template/substrate-node-template: Invalid argument
Customising project...
Initialising repository...
Initialising webassembly build environment...
Building webassembly binary in runtime/wasm...
  Downloaded parity-codec-derive v3.1.0
  Downloaded parity-codec v3.2.0
   Compiling serde v1.0.89
   Compiling proc-macro2 v0.4.27
   Compiling unicode-xid v0.1.0
   Compiling syn v0.15.29
   Compiling semver-parser v0.7.0
   Compiling arrayvec v0.4.10
   Compiling nodrop v0.1.13
   Compiling crunchy v0.2.1
   Compiling byteorder v1.3.1
   Compiling static_assertions v0.2.5
   Compiling rustc-hex v2.0.1
   Compiling num-traits v0.2.6
   Compiling hash-db v0.12.0
   Compiling constant_time_eq v0.1.3
   Compiling proc-macro-hack-impl v0.4.1
   Compiling integer-sqrt v0.1.2
   Compiling bitmask v0.5.0
   Compiling semver v0.9.0
   Compiling fixed-hash v0.3.0
   Compiling proc-macro-hack v0.4.1
   Compiling hash256-std-hasher v0.12.0
   Compiling blake2-rfc v0.2.18
   Compiling rustc_version v0.2.3
   Compiling uint v0.6.1
   Compiling hex-literal-impl v0.1.1
   Compiling quote v0.6.11
   Compiling hex-literal v0.1.3
   Compiling sr-std v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling sr-io v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling safe-mix v1.0.0
   Compiling toml v0.4.10
   Compiling proc-macro-crate v0.1.3
   Compiling parity-codec-derive v3.1.0
   Compiling srml-support-procedural-tools-derive v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling proc-macro-hack v0.5.4
   Compiling sr-api-macros v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling paste-impl v0.1.4
   Compiling srml-support-procedural-tools v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling parity-codec v3.2.0
   Compiling paste v0.1.4
   Compiling srml-support-procedural v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling impl-codec v0.2.0
   Compiling primitive-types v0.2.1
   Compiling substrate-primitives v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling srml-metadata v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling sr-primitives v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-inherents v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling sr-version v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling srml-support v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-client v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-offchain-primitives v0.1.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-consensus-aura-primitives v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling srml-system v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-consensus-authorities v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling srml-timestamp v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling srml-consensus v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling srml-balances v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling srml-executive v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling srml-sudo v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling srml-indices v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling srml-session v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling srml-staking v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling srml-aura v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-node-template-runtime v1.0.0 (/Users/hanwencheng/substrate-node-template/runtime)
warning: unused doc comment
  --> /Users/hanwencheng/substrate-node-template/runtime/src/template.rs:22:1
   |
22 |   /// This module's storage items.
   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23 | / decl_storage! {
24 | |     trait Store for Module<T: Trait> as TemplateModule {
25 | |         // Just a dummy storage item. 
26 | |         // Here we are declaring a StorageValue, `Something` as a Option<u32>
...  |
29 | |     }
30 | | }
   | |_- rustdoc does not generate documentation for macro expansions
   |
   = note: #[warn(unused_doc_comments)] on by default
   = help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion

warning: use of deprecated item 'sr_api_hidden_includes_IMPL_RUNTIME_APIS::sr_api_client::runtime_api::runtime_decl_for_Core::Core::authorities': Please switch to `AuthoritiesApi`.
   --> /Users/hanwencheng/substrate-node-template/runtime/src/lib.rs:231:1
    |
231 | / impl_runtime_apis! {
232 | |     impl runtime_api::Core<Block> for Runtime {
233 | |         fn version() -> RuntimeVersion {
234 | |             VERSION
...   |
300 | |     }
301 | | }
    | |_^
    |
    = note: #[warn(deprecated)] on by default

   Compiling substrate-node-template-runtime-wasm v1.0.0 (/Users/hanwencheng/substrate-node-template/runtime/wasm)
error: expected one of `::`, `;`, or `as`, found `-`
 --> src/lib.rs:5:18
  |
5 | pub use substrate-node-template_runtime::*;
  |                  ^ expected one of `::`, `;`, or `as` here

error: aborting due to previous error

error: Could not compile `substrate-node-template-runtime-wasm`.

To learn more, run the command again with --verbose.
Building node...
  Downloaded tokio v0.1.18
  Downloaded serde_derive v1.0.89
  Downloaded either v1.5.1
  Downloaded futures v0.1.26
  Downloaded backtrace v0.3.14
  Downloaded serde_json v1.0.39
  Downloaded openssl v0.10.20
  Downloaded bytes v0.4.12
  Downloaded exit-future v0.1.4
  Downloaded tokio-executor v0.1.7
  Downloaded tokio-io v0.1.12
  Downloaded tokio-reactor v0.1.9
  Downloaded protobuf v2.4.2
  Downloaded ctr v0.3.2
  Downloaded structopt v0.2.15
  Downloaded env_logger v0.6.1
  Downloaded jsonrpc-ws-server v10.1.0
  Downloaded x25519-dalek v0.5.2
  Downloaded jsonrpc-http-server v10.1.0
  Downloaded websocket v0.22.3
  Downloaded jsonrpc-derive v10.1.0
  Downloaded jsonrpc-pubsub v10.1.0
  Downloaded jsonrpc-core v10.1.0
  Downloaded paste v0.1.5
  Downloaded sysinfo v0.8.2
  Downloaded tokio-sync v0.1.4
  Downloaded openssl-sys v0.9.43
  Downloaded tokio-trace-core v0.1.0
  Downloaded tokio-fs v0.1.6
  Downloaded librocksdb-sys v5.17.2
  Downloaded tokio-threadpool v0.1.13
  Downloaded jsonrpc-server-utils v10.1.0
  Downloaded tempfile v3.0.7
  Downloaded tokio-current-thread v0.1.6
  Downloaded snow v0.5.2
  Downloaded unicase v2.3.0
  Downloaded hyper v0.12.25
  Downloaded structopt-derive v0.2.15
  Downloaded crossbeam-queue v0.1.2
  Downloaded crossbeam-deque v0.7.1
  Downloaded aho-corasick v0.6.10
  Downloaded bindgen v0.47.3
  Downloaded h2 v0.1.17
  Downloaded http v0.1.16
  Downloaded paste-impl v0.1.5
  Downloaded which v2.0.1
  Downloaded cexpr v0.3.5
  Downloaded nom v4.2.3
   Compiling arrayvec v0.4.10
   Compiling nodrop v0.1.13
   Compiling libc v0.2.51
   Compiling cfg-if v0.1.7
   Compiling lazy_static v1.3.0
   Compiling scopeguard v0.3.3
   Compiling memoffset v0.2.1
   Compiling rayon-core v1.4.1
   Compiling rayon v1.0.3
   Compiling either v1.5.1
   Compiling typenum v1.10.0
   Compiling proc-macro2 v0.4.27
   Compiling unicode-xid v0.1.0
   Compiling syn v0.15.29
   Compiling autocfg v0.1.2
   Compiling semver-parser v0.7.0
   Compiling serde v1.0.89
   Compiling byteorder v1.3.1
   Compiling rand_core v0.4.0
   Compiling subtle v2.0.0
   Compiling failure_derive v0.1.5
   Compiling byte-tools v0.3.1
   Compiling stable_deref_trait v1.1.1
   Compiling rustc-demangle v0.1.13
   Compiling crunchy v0.2.1
   Compiling crunchy v0.1.6
   Compiling futures v0.1.26
   Compiling fake-simd v0.1.2
   Compiling heapsize v0.4.2
   Compiling smallvec v0.6.9
   Compiling core-foundation-sys v0.5.1
   Compiling opaque-debug v0.2.2
   Compiling memchr v2.2.0
   Compiling security-framework-sys v0.2.3
   Compiling proc-macro-hack-impl v0.4.1
   Compiling keccak v0.1.0
   Compiling subtle v1.0.0
   Compiling fnv v1.0.6
   Compiling lazycell v1.2.1
   Compiling slab v0.4.2
   Compiling static_assertions v0.2.5
   Compiling constant_time_eq v0.1.3
   Compiling ucd-util v0.1.3
   Compiling version_check v0.1.5
   Compiling rustc-hex v2.0.1
   Compiling matches v0.1.8
   Compiling regex v1.1.5
   Compiling byte-tools v0.2.0
   Compiling spin v0.5.0
   Compiling remove_dir_all v0.5.1
   Compiling utf8-ranges v1.0.2
   Compiling native-tls v0.2.2
   Compiling httparse v1.3.3
   Compiling hash-db v0.12.2
   Compiling untrusted v0.6.2
   Compiling memory_units v0.3.0
   Compiling sha1 v0.6.0
   Compiling protobuf v2.4.2
   Compiling hashmap_core v0.1.10
   Compiling hex v0.3.2
   Compiling data-encoding v2.1.2
   Compiling num-traits v0.2.6
   Compiling arrayref v0.3.5
   Compiling safemem v0.3.0
   Compiling base58 v0.1.0
   Compiling glob v0.2.11
   Compiling pkg-config v0.3.14
   Compiling bs58 v0.2.2
   Compiling percent-encoding v1.0.1
   Compiling num-integer v0.1.39
   Compiling typeable v0.1.2
   Compiling traitobject v0.1.0
   Compiling unicode-width v0.1.5
   Compiling language-tags v0.2.2
   Compiling quick-error v1.2.2
   Compiling void v1.0.2
   Compiling zeroize v0.5.2
   Compiling ryu v0.2.7
   Compiling static_slice v0.0.3
   Compiling slog v2.4.1
   Compiling environmental v1.0.1
   Compiling ansi_term v0.11.0
   Compiling nohash-hasher v0.1.1
   Compiling bitflags v1.0.4
   Compiling vec_map v0.8.1
   Compiling openssl v0.10.20
   Compiling strsim v0.7.0
   Compiling bindgen v0.47.3
   Compiling termcolor v1.0.4
   Compiling quick-error v0.1.4
   Compiling byteorder v0.5.3
   Compiling foreign-types-shared v0.1.1
   Compiling peeking_take_while v0.1.2
   Compiling integer-sqrt v0.1.2
   Compiling itoa v0.4.3
   Compiling unicode-segmentation v1.2.1
   Compiling take_mut v0.2.2
   Compiling parity-bytes v0.1.0 (https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d#b0317f64)
   Compiling strum v0.14.0
   Compiling gcc v0.3.55
   Compiling bitmask v0.5.0
   Compiling indexmap v1.0.2
   Compiling linked-hash-map v0.5.2
   Compiling try-lock v0.2.2
   Compiling string v0.1.3
   Compiling rustc-serialize v0.3.24
   Compiling interleaved-ordered v0.1.1
   Compiling names v0.11.0
   Compiling nix v0.11.0
   Compiling sysinfo v0.8.2
   Compiling target_info v0.1.0
   Compiling app_dirs v1.2.1
   Compiling crossbeam-utils v0.2.2
   Compiling log v0.4.6
   Compiling thread_local v0.3.6
   Compiling rand_pcg v0.1.2
   Compiling rand_chacha v0.1.1
   Compiling rand v0.6.5
   Compiling backtrace v0.3.14
   Compiling semver v0.9.0
   Compiling rand_core v0.3.1
   Compiling crossbeam-utils v0.6.5
   Compiling tokio-trace-core v0.1.0
   Compiling block-padding v0.1.3
   Compiling owning_ref v0.4.0
   Compiling owning_ref v0.3.3
   Compiling unicode-normalization v0.1.8
   Compiling proc-macro-hack v0.4.1
   Compiling regex-syntax v0.6.6
   Compiling unicode-bidi v0.3.4
   Compiling unicase v1.4.2
   Compiling nom v4.2.3
   Compiling unicase v2.3.0
   Compiling tokio-sync v0.1.4
   Compiling trie-root v0.12.2
   Compiling clang-sys v0.26.4
   Compiling textwrap v0.10.0
   Compiling humantime v1.2.0
   Compiling foreign-types v0.3.2
   Compiling linked_hash_set v0.1.3
   Compiling lru-cache v0.1.2
   Compiling heck v0.3.1
   Compiling rust-crypto v0.2.36
   Compiling rustc_version v0.2.3
   Compiling rand_isaac v0.1.1
   Compiling rand_xorshift v0.1.1
   Compiling rand_hc v0.1.0
   Compiling log v0.3.9
   Compiling want v0.0.6
   Compiling crossbeam-queue v0.1.2
   Compiling tokio-executor v0.1.7
   Compiling crossbeam-channel v0.3.8
   Compiling lock_api v0.1.5
   Compiling hex-literal-impl v0.1.2
   Compiling idna v0.1.5
   Compiling num_cpus v1.10.0
   Compiling atty v0.2.11
   Compiling time v0.1.42
   Compiling crossbeam-epoch v0.3.1
   Compiling blake2-rfc v0.2.18
   Compiling rand_jitter v0.1.3
   Compiling iovec v0.1.2
   Compiling rand_os v0.1.3
   Compiling net2 v0.2.33
   Compiling MacTypes-sys v2.1.0
   Compiling rand v0.5.6
   Compiling rand v0.4.6
   Compiling fdlimit v0.1.1
   Compiling crossbeam-epoch v0.7.1
   Compiling generic-array v0.12.0
   Compiling generic-array v0.8.3
   Compiling quote v0.6.11
   Compiling parking_lot_core v0.4.0
   Compiling sr-std v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling parking_lot_core v0.3.1
   Compiling snow v0.5.2
   Compiling sr-io v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling safe-mix v1.0.0
   Compiling mime v0.2.6
   Compiling tokio-timer v0.2.10
   Compiling tokio-current-thread v0.1.6
   Compiling hashbrown v0.1.8
   Compiling hash256-std-hasher v0.12.2
   Compiling tiny-keccak v1.4.2
   Compiling parity-wasm v0.31.3
   Compiling base64 v0.9.3
   Compiling base64 v0.10.1
   Compiling bigint v4.4.1
   Compiling dns-parser v0.8.0
   Compiling uint v0.6.1
   Compiling elastic-array v0.10.2
   Compiling memory-db v0.12.2
   Compiling hex-literal v0.1.4
   Compiling aho-corasick v0.7.3
   Compiling aho-corasick v0.6.10
   Compiling toml v0.4.10
   Compiling impl-serde v0.1.1
   Compiling serde_json v1.0.39
   Compiling slog-async v2.3.0
   Compiling clap v2.32.0
   Compiling crossbeam-deque v0.2.0
   Compiling url v1.7.2
   Compiling bytes v0.4.12
   Compiling futures-cpupool v0.1.8
   Compiling core-foundation v0.5.1
   Compiling mio v0.6.16
   Compiling parking_lot_core v0.2.14
   Compiling rand v0.3.23
   Compiling fixed-hash v0.3.0
   Compiling crossbeam-deque v0.7.1
   Compiling crossbeam-deque v0.6.3
   Compiling digest v0.8.0
   Compiling crypto-mac v0.4.0
   Compiling digest v0.6.2
   Compiling block-buffer v0.2.0
   Compiling block-buffer v0.7.0
   Compiling crypto-mac v0.7.0
   Compiling block-cipher-trait v0.6.2
   Compiling stream-cipher v0.3.0
   Compiling substrate-panic-handler v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling error-chain v0.12.0
   Compiling ctrlc v3.1.1
   Compiling kvdb v0.1.0 (https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d#b0317f64)
   Compiling wasmi v0.4.4
   Compiling chrono v0.4.6
   Compiling cexpr v0.3.5
   Compiling substrate-serializer v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling proc-macro-crate v0.1.3
   Compiling hyper v0.10.15
   Compiling tokio-io v0.1.12
   Compiling http v0.1.16
   Compiling security-framework v0.2.2
   Compiling cuckoofilter v0.3.2
   Compiling parking_lot v0.5.5
   Compiling mio-uds v0.6.7
   Compiling mio-extras v2.0.5
   Compiling hmac v0.4.2
   Compiling sha2 v0.6.0
   Compiling sha2 v0.8.0
   Compiling sha3 v0.8.1
   Compiling hmac v0.7.0
   Compiling blake2 v0.8.0
   Compiling aes-soft v0.3.3
   Compiling twofish v0.2.0
   Compiling ctr v0.3.2
   Compiling tempfile v3.0.7
   Compiling trie-db v0.12.2
   Compiling tokio-threadpool v0.1.13
   Compiling twox-hash v1.1.2
   Compiling globset v0.4.2
   Compiling env_logger v0.6.1
   Compiling synstructure v0.10.1
   Compiling serde_derive v1.0.89
   Compiling asn1_der_derive v0.1.1
   Compiling proc-macro-hack v0.5.4
   Compiling srml-support-procedural-tools-derive v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling libp2p-core-derive v0.6.0
   Compiling strum_macros v0.14.0
   Compiling jsonrpc-derive v10.1.0
   Compiling structopt-derive v0.2.15
   Compiling vergen v3.0.4
   Compiling slog-json v2.3.0
   Compiling tokio-codec v0.1.1
   Compiling rw-stream-sink v0.1.1
   Compiling parity-codec-derive v3.2.0
   Compiling sr-api-macros v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling h2 v0.1.17
   Compiling parity-ws v0.8.0
   Compiling hmac-drbg v0.1.2
   Compiling aio-limited v0.1.0
   Compiling aes-ctr v0.3.0
   Compiling parking_lot v0.7.1
   Compiling tokio-fs v0.1.6
   Compiling parking_lot v0.6.4
   Compiling paste-impl v0.1.5
   Compiling asn1_der v0.6.1
   Compiling srml-support-procedural-tools v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling structopt v0.2.15
   Compiling jsonrpc-core v10.1.0
   Compiling cc v1.0.26
   Compiling unsigned-varint v0.2.2
   Compiling libsecp256k1 v0.2.2
   Compiling parity-codec v3.3.0
   Compiling once_cell v0.1.8
   Compiling tokio-reactor v0.1.9
   Compiling crossbeam v0.6.0
   Compiling exit-future v0.1.4
   Compiling tokio-tls v0.2.1
   Compiling pbkdf2 v0.3.0
   Compiling yamux v0.1.9
   Compiling paste v0.1.5
   Compiling failure v0.1.5
   Compiling parity-multihash v0.1.0
   Compiling multistream-select v0.4.0
   Compiling srml-support-procedural v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling jsonrpc-pubsub v10.1.0
   Compiling clear_on_drop v0.2.3
   Compiling ring v0.14.6
   Compiling secp256k1 v0.12.2
   Compiling libloading v0.5.0
   Compiling openssl-sys v0.9.43
   Compiling impl-codec v0.2.0
   Compiling substrate-trie v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling fork-tree v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling slog-scope v4.1.1
   Compiling tokio-uds v0.2.5
   Compiling tokio-udp v0.1.3
   Compiling tokio-tcp v0.1.3
   Compiling tiny-bip39 v0.6.1
   Compiling which v2.0.1
   Compiling parity-multiaddr v0.2.0
   Compiling primitive-types v0.2.1
   Compiling tokio v0.1.18
   Compiling substrate-node-template v1.0.0 (/Users/hanwencheng/substrate-node-template)
   Compiling tk-listen v0.2.1
   Compiling tokio-dns-unofficial v0.4.0
   Compiling websocket v0.22.3
   Compiling jsonrpc-server-utils v10.1.0
   Compiling hyper v0.12.25
   Compiling curve25519-dalek v1.1.3
   Compiling merlin v1.0.3
   Compiling fs-swap v0.2.4
   Compiling jsonrpc-ws-server v10.1.0
   Compiling jsonrpc-http-server v10.1.0
   Compiling parity-crypto v0.3.0
   Compiling ws v0.7.9
   Compiling substrate-telemetry v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling ed25519-dalek v1.0.0-pre.1
   Compiling x25519-dalek v0.5.2
   Compiling schnorrkel v0.1.1
   Compiling libp2p-core v0.6.0
   Compiling substrate-bip39 v0.2.1 (https://github.com/paritytech/substrate-bip39#44307fda)
   Compiling substrate-primitives v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-state-machine v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling srml-metadata v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-keyring v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-state-db v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-keystore v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling libp2p-identify v0.6.0
   Compiling libp2p-ping v0.6.0
   Compiling libp2p-yamux v0.6.0
   Compiling libp2p-uds v0.6.0
   Compiling libp2p-websocket v0.6.0
   Compiling libp2p-noise v0.4.0
   Compiling libp2p-floodsub v0.6.0
   Compiling libp2p-ratelimit v0.6.0
   Compiling libp2p-mplex v0.6.0
   Compiling libp2p-dns v0.6.0
   Compiling libp2p-mdns v0.6.0
   Compiling libp2p-plaintext v0.6.0
   Compiling libp2p-tcp v0.6.0
   Compiling libp2p-secio v0.6.0
   Compiling libp2p-kad v0.6.0
   Compiling librocksdb-sys v5.17.2
   Compiling sr-primitives v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling libp2p v0.6.0
   Compiling substrate-inherents v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling sr-version v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-transaction-graph v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-executor v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling srml-support v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-peerset v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-consensus-common v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling srml-system v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-network-libp2p v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-client v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-transaction-pool v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-offchain-primitives v0.1.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-consensus-aura-primitives v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-consensus-authorities v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-offchain v0.1.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling srml-timestamp v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling srml-consensus v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling srml-executive v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling srml-sudo v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling srml-indices v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling srml-balances v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-consensus-aura-slots v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-basic-authorship v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-network v0.1.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling srml-session v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-rpc v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling srml-staking v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-rpc-servers v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling srml-aura v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-consensus-aura v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-node-template-runtime v1.0.0 (/Users/hanwencheng/substrate-node-template/runtime)
warning: use of deprecated item 'sr_api_hidden_includes_IMPL_RUNTIME_APIS::sr_api_client::runtime_api::runtime_decl_for_Core::Core::authorities': Please switch to `AuthoritiesApi`.
   --> runtime/src/lib.rs:231:1
    |
231 | / impl_runtime_apis! {
232 | |     impl runtime_api::Core<Block> for Runtime {
233 | |         fn version() -> RuntimeVersion {
234 | |             VERSION
...   |
300 | |     }
301 | | }
    | |_^
    |
    = note: #[warn(deprecated)] on by default

warning: redundant linker flag specified for library `c++`

   Compiling rocksdb v0.11.0
   Compiling kvdb-rocksdb v0.1.4 (https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d#b0317f64)
   Compiling substrate-client-db v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-service v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
   Compiling substrate-cli v1.0.0 (https://github.com/paritytech/substrate.git?rev=59d5ec144704cec017a01f3e4dbb6b73c5542bf7#59d5ec14)
error: expected one of `::`, `;`, or `as`, found `-`
 --> src/chain_spec.rs:2:14
  |
2 | use substrate-node-template_runtime::{
  |              ^ expected one of `::`, `;`, or `as` here

error: aborting due to previous error

error: Could not compile `substrate-node-template`.

To learn more, run the command again with --verbose.
Chain client created in substrate-node-template.
To start a dev chain, run:
$ substrate-node-template/target/release/substrate-node-template --dev
To create a basic Bonds UI for your chain, run:
$ substrate-ui-new substrate-node-template
To push to a newly created GitHub repository, inside substrate-node-template, run:
$ git remote add origin git@github.com:myusername/myprojectname && git push -u origin master

I use Mojave 10.14.4 and I just check Rust version is 1.33.0

bkchr commented 5 years ago

The substrate-node-new is rather dumb. You can not use - in any name in rust. By giving it the name substrate-node-template, the compilation fails. You could use substrate-node-template and it will compile.

bkchr commented 5 years ago

CC @shawntabrizi maybe something you want to solve in the script ;)

shawntabrizi commented 5 years ago

@bkchr I am missing something here. substrate-node-new substrate-node-template <author-name> should work fine? Is there some other Unicode character which looks like a dash?

bkchr commented 5 years ago

I found the bug, a recent change of substrate-node-new added this line, but it should be replace node_template "${lname//[- ]/_}". I will open a pr.

bkchr commented 5 years ago

Okay, there as already one by @xlc: https://github.com/paritytech/substrate-up/pull/21 @hanwencheng fix is merged and it should work now :)

shawntabrizi commented 5 years ago

I have not tested the latest script yet, but it appears to me it will cause some issues with common uses of renaming.

For example, we tell people to rename their project substrate-node-template in some tutorials.

Then the script will look for node-template and replace that too.

So I expect to get substrate-substrate-node-template in places... will test now @xlc @bkchr

Can we update substrate so all strings that need to be changed are template-node?

shawntabrizi commented 5 years ago

Indeed this happens. We need to reorder the rename commands, or better yet, come up with a more consistent plan here.