Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade substrate #2675

Closed
product-flippy-bot opened this issue Dec 30, 2022 · 1 comment · Fixed by #2682
Closed

Upgrade substrate #2675

product-flippy-bot opened this issue Dec 30, 2022 · 1 comment · Fixed by #2682
Assignees

Comments

@product-flippy-bot
Copy link

Description

We should upgrade substrate - we're currently using monthly-2022-06. The latest at the time of writing is 2022-12.

I tried to update and have a branch that almost compiles. The wasm build script is failing.

I've tried everything suggested in the following discussion:

I've also replicated the same issue on CI so it doesn't appear to be a platform-specific issue.

The substrate repo that is being linked to compiles fine on my machine with no extra settings required (apart from installing the protobuf compiler).

Given the above, I can only assume the problem is with the code or dependencies rather than a local environment issue.

This is a the full compiler error I get when I run cargo clean && cargo check -p state-chain-runtime:

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 v1.0.0`

  Caused by:
    process didn't exit successfully: `/Users/dan/Work/chainflip/chainflip-backend/target/debug/wbuild/state-chain-runtime/target/release/build/wasmtime-runtime-10458ee77919e22c/build-script-build` (exit status: 1)
    --- stdout
    cargo:rerun-if-changed=src/helpers.c
    TARGET = Some("wasm32-unknown-unknown")
    OPT_LEVEL = Some("3")
    HOST = Some("aarch64-apple-darwin")
    cargo:rerun-if-env-changed=CC_wasm32-unknown-unknown
    CC_wasm32-unknown-unknown = None
    cargo:rerun-if-env-changed=CC_wasm32_unknown_unknown
    CC_wasm32_unknown_unknown = None
    cargo:rerun-if-env-changed=TARGET_CC
    TARGET_CC = None
    cargo:rerun-if-env-changed=CC
    CC = Some("/opt/homebrew/opt/llvm/bin/clang")
    cargo:rerun-if-env-changed=CFLAGS_wasm32-unknown-unknown
    CFLAGS_wasm32-unknown-unknown = None
    cargo:rerun-if-env-changed=CFLAGS_wasm32_unknown_unknown
    CFLAGS_wasm32_unknown_unknown = None
    cargo:rerun-if-env-changed=TARGET_CFLAGS
    TARGET_CFLAGS = None
    cargo:rerun-if-env-changed=CFLAGS
    CFLAGS = None
    cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
    CRATE_CC_NO_DEFAULTS = None
    DEBUG = Some("false")
    running: "/opt/homebrew/opt/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-Wall" "-Wextra" "-DCFG_TARGET_OS_unknown" "-DCFG_TARGET_ARCH_wasm32" "-o" "/Users/dan/Work/chainflip/chainflip-backend/target/debug/wbuild/state-chain-runtime/target/wasm32-unknown-unknown/release/build/wasmtime-runtime-c69ce23c9ccf2d58/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 "/opt/homebrew/opt/llvm/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-Wall" "-Wextra" "-DCFG_TARGET_OS_unknown" "-DCFG_TARGET_ARCH_wasm32" "-o" "/Users/dan/Work/chainflip/chainflip-backend/target/debug/wbuild/state-chain-runtime/target/wasm32-unknown-unknown/release/build/wasmtime-runtime-c69ce23c9ccf2d58/out/src/helpers.o" "-c" "src/helpers.c" with args "clang" did not execute successfully (status code exit status: 1).


  warning: build failed, waiting for other jobs to finish...
@kylezs
Copy link
Contributor

kylezs commented Jan 2, 2023

There are currently still errors when compiling natively, with SKIP_WASM_BUILD=1 so first thing I'll do is fix these issues before looking into the error above (which might resolve with the other things resolved)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants