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

Build fails on Mac M1 #1465

Open
4 tasks done
hummusonrails opened this issue Nov 15, 2023 · 4 comments
Open
4 tasks done

Build fails on Mac M1 #1465

hummusonrails opened this issue Nov 15, 2023 · 4 comments
Assignees

Comments

@hummusonrails
Copy link

hummusonrails commented Nov 15, 2023

Issue

Thanks for opening an issue on the Fuel Indexer project.

Prerequisites

  • Can you reproduce the problem?
  • Do you know which version of the indexer you're using?
  • Are you using the latest versions of Fuel ecosystem components available in fuelup?
  • Did you already check for an answer in previous Discussions?

Description

  • Please describe your issue in detail.

I am experiencing an issue when attempting to build with forc index build. At first, the issue was exactly the same as documented in the forum, and I followed the steps outlined in the solution on the forum to the letter by following the guide here.

Now, the issue I am experiencing is the build fails with an error that includes (among several hundred lines of output):

--- stderr


  error occurred: Failed to find tool. Is `` installed?


warning: build failed, waiting for other jobs to finish...
▹▹▹▹▸ ⏰ Building indexer...                                                                                                                                            The following warnings were emitted during compilation:

warning: secp256k1-sys@0.8.1: In file included from depend/secp256k1/src/precomputed_ecmult_gen.c:7:
warning: secp256k1-sys@0.8.1: In file included from depend/secp256k1/src/group.h:10:
warning: secp256k1-sys@0.8.1: depend/secp256k1/src/field.h:44:13: warning: unused function 'rustsecp256k1_v0_8_1_fe_normalize' [-Wunused-function]
warning: secp256k1-sys@0.8.1:    44 | static void rustsecp256k1_v0_8_1_fe_normalize(rustsecp256k1_v0_8_1_fe *r);

I am using rust version: 1.73.0 (cc66ad468 2023-10-03).

My fuel toolchain versioning is as follows:

active toolchain
-----------------
beta-4-aarch64-apple-darwin (default)
  forc : 0.45.0
    - forc-client
      - forc-deploy : 0.45.0
      - forc-run : 0.45.0
    - forc-doc : 0.45.0
    - forc-explore : 0.28.1
    - forc-fmt : 0.45.0
    - forc-index : 0.21.0
    - forc-lsp : 0.45.0
    - forc-tx : 0.45.0
    - forc-wallet : 0.3.0
  fuel-core : 0.20.4
  fuel-core-keygen : Error getting version string
  fuel-indexer : 0.21.0

fuels versions
---------------
forc : 0.45
forc-wallet : 0.45

Versions

Please list what version of indexer components you're using. Latest is currently .

  • fuel-indexer: 0.21.0
  • forc-index: 0.21.0
  • forc: 0.45.0
@ra0x3
Copy link
Contributor

ra0x3 commented Nov 16, 2023

Thanks @hummusonrails

  • First thing, let's get you on the proper versions of things :)
  • Could you update your fuelup to the latest beta-4 components?
  • My beta-4 currently shows indexer v0.23.0 (our latest version)
>>> fuelup show
Default host: aarch64-apple-darwin
fuelup home: /Users/rashad/.fuelup

installed toolchains
--------------------
latest-aarch64-apple-darwin
beta-4-aarch64-apple-darwin (default)
latest-2023-07-07-aarch64-apple-darwin
latest-2023-07-13-aarch64-apple-darwin
latest-2023-07-18-aarch64-apple-darwin
latest-2023-07-20-aarch64-apple-darwin
latest-2023-11-06-aarch64-apple-darwin

active toolchain
-----------------
beta-4-aarch64-apple-darwin (default)
  forc : 0.46.1
    - forc-client
      - forc-deploy : 0.46.1
      - forc-run : 0.46.1
    - forc-doc : 0.46.1
    - forc-explore : 0.28.1
    - forc-fmt : 0.46.1
    - forc-index : 0.23.0
    - forc-lsp : 0.46.1
    - forc-tx : 0.46.1
    - forc-wallet : 0.3.0
  fuel-core : 0.20.5
  fuel-core-keygen : Error getting version string
  fuel-indexer : 0.23.0

fuels versions
---------------
forc : 0.45
forc-wallet : 0.45
  • After getting on version 0.23.0 (the latest version, for which rustc 1.73 is used) could you try to run your command again and paste your output here? :)

@ra0x3 ra0x3 self-assigned this Nov 16, 2023
@ra0x3
Copy link
Contributor

ra0x3 commented Nov 27, 2023

@hummusonrails Just checking in here :)

@hummusonrails
Copy link
Author

Thanks @ra0x3! I was away from my computer past week or so. I'll give it a go later today or tomorrow and report back!

@hummusonrails
Copy link
Author

I've updated to the latest versions and still it is unable to build.

My versions:

installed toolchains
--------------------
beta-3-aarch64-apple-darwin
latest-aarch64-apple-darwin
beta-4-aarch64-apple-darwin (default)

active toolchain
-----------------
beta-4-aarch64-apple-darwin (default)
  forc : 0.46.1
    - forc-client
      - forc-deploy : 0.46.1
      - forc-run : 0.46.1
    - forc-doc : 0.46.1
    - forc-explore : 0.28.1
    - forc-fmt : 0.46.1
    - forc-index : 0.23.0
    - forc-lsp : 0.46.1
    - forc-tx : 0.46.1
    - forc-wallet : 0.3.0
  fuel-core : 0.20.5
  fuel-core-keygen : Error getting version string
  fuel-indexer : 0.23.0

fuels versions
---------------
forc : 0.45
forc-wallet : 0.45

The error output:

forc index build
▹▸▹▹▹ ⏰ Building indexer...                                                                                                                   Compiling secp256k1-sys v0.8.1
   Compiling anyhow v1.0.75
   Compiling fuel-vm v0.35.3
   Compiling clap_derive v3.2.25
   Compiling syn v2.0.39
   Compiling postcard v1.0.8
   Compiling heapless v0.7.16
   Compiling tracing v0.1.40
   Compiling indexmap v1.9.3
   Compiling serde_with v1.14.0
▹▹▸▹▹ ⏰ Building indexer...                                                                                                                   Compiling hashbrown v0.12.3
▹▹▹▸▹ ⏰ Building indexer...                                                                                                                   Compiling cobs v0.2.3
The following warnings were emitted during compilation:

warning: error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
warning: 1 error generated.
warning: error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
warning: 1 error generated.

error: failed to run custom build command for `secp256k1-sys v0.8.1`

Caused by:
  process didn't exit successfully: `/Users/bengreenberg/Dev/fuel/hello-indexer/target/release/build/secp256k1-sys-f471911d3f2140fa/build-script-build` (exit status: 1)
  --- stdout
  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 = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  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=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 = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  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
  running: "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-I" "wasm/wasm-sysroot" "-Wall" "-Wextra" "-DSECP256K1_API=" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DECMULT_GEN_PREC_BITS=4" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-DENABLE_MODULE_RECOVERY=1" "-o" "/Users/bengreenberg/Dev/fuel/hello-indexer/target/wasm32-unknown-unknown/release/build/secp256k1-sys-5689534f498b4979/out/wasm/wasm.o" "-c" "wasm/wasm.c"
  cargo:warning=error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'

  cargo:warning=1 error generated.

  exit status: 1
  running: "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-I" "wasm/wasm-sysroot" "-I" "wasm/wasm-sysroot" "-Wall" "-Wextra" "-DSECP256K1_API=" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DECMULT_GEN_PREC_BITS=4" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-DENABLE_MODULE_RECOVERY=1" "-o" "/Users/bengreenberg/Dev/fuel/hello-indexer/target/wasm32-unknown-unknown/release/build/secp256k1-sys-5689534f498b4979/out/wasm/wasm.o" "-c" "wasm/wasm.c"
  cargo:warning=error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'

  cargo:warning=1 error generated.

  exit status: 1

  --- stderr


  error occurred: Command "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-I" "wasm/wasm-sysroot" "-I" "wasm/wasm-sysroot" "-Wall" "-Wextra" "-DSECP256K1_API=" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DECMULT_GEN_PREC_BITS=4" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-DENABLE_MODULE_RECOVERY=1" "-o" "/Users/bengreenberg/Dev/fuel/hello-indexer/target/wasm32-unknown-unknown/release/build/secp256k1-sys-5689534f498b4979/out/wasm/wasm.o" "-c" "wasm/wasm.c" with args "clang" did not execute successfully (status code exit status: 1).


warning: build failed, waiting for other jobs to finish...
▹▹▹▹▸ ⏰ Building indexer...                                                                                                                ▹▸▹▹▹ ⏰ Building indexer...                                                                                                                ▸▹▹▹▹ ⏰ Building indexer...                                                                                                                ▹▹▹▹▸ ⏰ Building indexer...                                                                                                                ▪▪▪▪▪ ❌ Build failed.                                                                                                                      Error: ❌ Failed to build index.

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

No branches or pull requests

2 participants