1

While following the installation tutorial available at: https://docs.substrate.io/v3/getting-started/installation/

I ended up with cloning the node-template repository and running the build command as shown below which thrown an codegen error.

I tried avoiding this error by providing the misconfigured flag in the release profile section of the Cargo.toml config without any luck. Any ideas?

Marco-Polo :: workspace/substrate/substrate-node-template ‹fbe735e*› % cargo build --release                     
   Compiling libc v0.2.125
   Compiling proc-macro2 v1.0.37
   Compiling unicode-xid v0.2.3
   Compiling syn v1.0.92
   Compiling version_check v0.9.4
   Compiling cfg-if v1.0.0
   Compiling serde v1.0.137
   Compiling serde_derive v1.0.137
   Compiling autocfg v1.1.0
   Compiling memchr v2.5.0
error: incorrect value `...` for codegen option `split-debuginfo` - one of supported split-debuginfo modes (`off`, `packed`, or `unpacked`) was expected

error: could not compile `unicode-xid` due to previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `version_check` due to previous error
error: could not compile `cfg-if` due to previous error
error: could not compile `autocfg` due to previous error
error: could not compile `syn` due to previous error
error: could not compile `serde_derive` due to previous error
error: could not compile `libc` due to previous error
error: could not compile `memchr` due to previous error
error: could not compile `serde` due to previous error
error: could not compile `proc-macro2` due to previous error

I am trying to build this under osx with an m1 pro cpu and the following software packages:

Marco-Polo :: workspace/substrate/substrate-node-template ‹main*› % gcc -v                                  
Apple clang version 13.1.6 (clang-1316.0.21.2.3)
Target: arm64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Marco-Polo :: workspace/substrate/substrate-node-template ‹main*› % g++ -v                                       
Apple clang version 13.1.6 (clang-1316.0.21.2.3)
Target: arm64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Marco-Polo :: workspace/substrate/substrate-node-template ‹main*› % make -v                                      
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-apple-darwin11.3.0

Marco-Polo :: workspace/substrate/substrate-node-template ‹main*› % uname -a                                     
Darwin Marco-Polo.local 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:46:32 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T6000 arm64

Marco-Polo :: workspace/substrate/substrate-node-template ‹main*› % rustup +nightly show                         
Default host: aarch64-apple-darwin
rustup home:  /Users/lucio/.rustup

installed toolchains
--------------------

stable-aarch64-apple-darwin
nightly-aarch64-apple-darwin (default)

installed targets for active toolchain
--------------------------------------

aarch64-apple-darwin
wasm32-unknown-unknown

active toolchain
----------------

nightly-aarch64-apple-darwin (overridden by +toolchain on the command line)
rustc 1.62.0-nightly (4c60a0ea5 2022-05-04)

Update1: regarding opening a github issue, I have initially tried doing so but it seems the issue page redirects me to stackexchange:

https://github.com/substrate-developer-hub/substrate-node-template/issues/new/choose

Support & Troubleshooting with the Substrate Stack Exchange Community For general problems with Substrate or related technologies, please search here first for solutions, by keyword and tags. If you discover no solution, please then ask and questions in our community! We highly encourage everyone also share their understanding by answering questions for others.

Update2:

Regarding rustup show this is the output I get:

:: ~ % rustup show                                                                                     
Default host: aarch64-apple-darwin
rustup home:  /Users/lucio/.rustup

installed toolchains
--------------------

stable-aarch64-apple-darwin
nightly-aarch64-apple-darwin (default)

installed targets for active toolchain
--------------------------------------

aarch64-apple-darwin
wasm32-unknown-unknown

active toolchain
----------------

nightly-aarch64-apple-darwin (default)
rustc 1.62.0-nightly (4c60a0ea5 2022-05-04)
9
  • 1
    I’m voting to close this question because this probably should be posted as an issue in Substrate repo.
    – pepyakin
    May 6, 2022 at 13:08
  • @pepyakin I have tried posting it in the node-template repo and it redirects me to stackexchange, check my update. May 6, 2022 at 16:35
  • Hey Lucian and sorry for this bad experience. This looks as a bug to me, that's why I figured it would be better off as an issue.
    – pepyakin
    May 6, 2022 at 16:43
  • do you have any environment variables defined? How did you install Rust? Have you tried overriding the rust toolchain? what's the output of just rustp show, without +nightly?
    – pepyakin
    May 6, 2022 at 16:52
  • 2
    I've found the issue, I had a previous installation of fleet lying around: github.com/dimensionhq/fleet it seems it was polluting the dependencies list somehow. Removed that and everything works as expected. Thanks! May 7, 2022 at 13:06

0

Your Answer

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

Browse other questions tagged or ask your own question.