首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >基板节点模板生成失败(使用macbook )

基板节点模板生成失败(使用macbook )
EN

Stack Overflow用户
提问于 2022-01-01 15:44:48
回答 1查看 159关注 0票数 1

我正在尝试创建我的第一基板链。我的操作系统是macOS蒙特雷v12.1 (最近更新)

这是我在运行$ cargo build --release之后遇到的错误

代码语言:javascript
复制
   ....
   Compiling lru v0.7.1
   Compiling lru v0.6.6
   Compiling rand v0.7.3
   Compiling zeroize_derive v1.2.0
   Compiling parity-util-mem-derive v0.1.0
   Compiling structopt-derive v0.4.18
   Compiling pest_derive v2.1.0
The following warnings were emitted during compilation:

warning: src/helpers.c:1:10: fatal error: 'setjmp.h' file not found
warning: #include <setjmp.h>
warning:          ^~~~~~~~~~
warning: 1 error generated.

error: failed to run custom build command for `wasmtime-runtime v0.31.0`

Caused by:
  process didn't exit successfully: `/Users/tejasvijay/Desktop/MyRepos/others/substrate-node-template/target/release/build/wasmtime-runtime-94ad595a23608fc4/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-changed=src/helpers.c
  TARGET = Some("x86_64-apple-darwin")
  OPT_LEVEL = Some("3")
  HOST = Some("x86_64-apple-darwin")
  CC_x86_64-apple-darwin = None
  CC_x86_64_apple_darwin = None
  HOST_CC = None
  CC = Some("x86_64-apple-darwin13.4.0-clang")
  CFLAGS_x86_64-apple-darwin = None
  CFLAGS_x86_64_apple_darwin = None
  HOST_CFLAGS = None
  CFLAGS = Some("-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe")
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  running: "x86_64-apple-darwin13.4.0-clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=x86_64-apple-darwin" "-march=core2" "-mtune=haswell" "-mssse3" "-ftree-vectorize" "-fPIC" "-fPIE" "-fstack-protector-strong" "-O2" "-pipe" "-Wall" "-Wextra" "-DCFG_TARGET_OS_macos" "-o" "/Users/tejasvijay/Desktop/MyRepos/others/substrate-node-template/target/release/build/wasmtime-runtime-0c7a2181a8140e90/out/src/helpers.o" "-c" "src/helpers.c"
  cargo:warning=src/helpers.c:1:10: fatal error: 'setjmp.h' file not found
  cargo:warning=#include <setjmp.h>
  cargo:warning=         ^~~~~~~~~~
  cargo:warning=1 error generated.
  exit status: 1

  --- stderr


  error occurred: Command "x86_64-apple-darwin13.4.0-clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=x86_64-apple-darwin" "-march=core2" "-mtune=haswell" "-mssse3" "-ftree-vectorize" "-fPIC" "-fPIE" "-fstack-protector-strong" "-O2" "-pipe" "-Wall" "-Wextra" "-DCFG_TARGET_OS_macos" "-o" "/Users/tejasvijay/Desktop/MyRepos/others/substrate-node-template/target/release/build/wasmtime-runtime-0c7a2181a8140e90/out/src/helpers.o" "-c" "src/helpers.c" with args "x86_64-apple-darwin13.4.0-clang" did not execute successfully (status code exit status: 1).


warning: build failed, waiting for other jobs to finish...
The following warnings were emitted during compilation:

warning: In file included from zstd/lib/common/entropy_common.c:18:
warning: In file included from zstd/lib/common/mem.h:24:
warning: zstd/lib/common/zstd_deps.h:29:10: fatal error: 'string.h' file not found
warning: #include <string.h>
warning:          ^~~~~~~~~~
warning: 1 error generated.
warning: In file included from zstd/lib/common/fse_decompress.c:20:
warning: In file included from zstd/lib/common/bitstream.h:29:
warning: In file included from zstd/lib/common/mem.h:24:
warning: zstd/lib/common/zstd_deps.h:29:10: fatal error: 'string.h' file not found
warning: #include <string.h>
warning:          ^~~~~~~~~~
warning: 1 error generated.

The following warnings were emitted during compilation:

warning: In file included from zstd/lib/common/entropy_common.c:18:
warning: In file included from zstd/lib/common/mem.h:24:
warning: zstd/lib/common/zstd_deps.h:29:10: fatal error: 'string.h' file not found
warning: #include <string.h>
warning:          ^~~~~~~~~~
warning: 1 error generated.
warning: In file included from zstd/lib/common/fse_decompress.c:20:
warning: In file included from zstd/lib/common/bitstream.h:29:
warning: In file included from zstd/lib/common/mem.h:24:
warning: zstd/lib/common/zstd_deps.h:29:10: fatal error: 'string.h' file not found
warning: #include <string.h>
warning:          ^~~~~~~~~~
warning: 1 error generated.

error: build failed

我不知道为什么会这样。另外,我无法覆盖Cargo.toml文件中的包,因为它不接受依赖项标记。

有什么办法解决这个问题吗?

谢谢。

EN

回答 1

Stack Overflow用户

发布于 2022-01-04 13:01:18

我能够使用conda环境运行构建。

$ conda create -c conda-forge -n rustenv rust的形式在conda中创建环境

然后使用$ conda activate rustenv激活它

如果其他人面临类似的问题,就回答这个问题。在基本环境下,构建仍然失败。任何其他的答案也是有帮助的。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70549947

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档