dashpay / platform

L2 solution for seriously fast decentralized applications for the Dash network
https://dashplatform.readme.io/docs/introduction-what-is-dash-platform
MIT License
72 stars 39 forks source link

failed to run custom build command for `rs-x11-hash v0.1.8` (no `llvm-ar`?) #1533

Closed coolaj86 closed 1 month ago

coolaj86 commented 1 year ago

Problem

Ubuntu 22.04, same install as #1531, but with node@18

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

I'm guessing it wants llvm-ar-14.

I can hack around that by creating a symlink probably. But why didn't it install correctly in the first place? Does it need a different package than the one documented?

Repro

yarn workspace @dashevo/wasm-dpp build
+ TARGET=wasm32-unknown-unknown
+ CARGO_BUILD_PROFILE=dev
+ PROFILE_ARG='--profile dev'
+ PROFILE=dev
+ [[ dev == \d\e\v ]]
+ PROFILE=debug
+ OUTPUT_DIR=/mnt/dashstore/app/dashpay-platform/packages/wasm-dpp/wasm
+ OUTPUT_FILE=/mnt/dashstore/app/dashpay-platform/packages/wasm-dpp/wasm/wasm_dpp_bg.wasm
+ BUILD_COMMAND='cargo build --config net.git-fetch-with-cli=true --target=wasm32-unknown-unknown --profile dev'
+ BINDGEN_COMMAND='wasm-bindgen --out-dir=/mnt/dashstore/app/dashpay-platform/packages/wasm-dpp/wasm --target=web --omit-default-module-path ../../target/wasm32-unknown-unknown/debug/wasm_dpp.wasm'
+ [[ -d /mnt/dashstore/app/dashpay-platform/packages/wasm-dpp/wasm ]]
++ command -v wasm-bindgen
+ [[ -x /mnt/dashstore/app/.cargo/bin/wasm-bindgen ]]
+ [[ linux-gnu == \d\a\r\w\i\n* ]]
+ cargo build --config net.git-fetch-with-cli=true --target=wasm32-unknown-unknown --profile dev
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   /mnt/dashstore/app/dashpay-platform/packages/wasm-dpp/Cargo.toml
workspace: /mnt/dashstore/app/dashpay-platform/Cargo.toml
warning: some crates are on edition 2021 which defaults to `resolver = "2"`, but virtual workspaces default to `resolver = "1"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
warning: /mnt/dashstore/app/dashpay-platform/packages/rs-platform-value/Cargo.toml: unused manifest key: package.private
warning: /mnt/dashstore/app/dashpay-platform/packages/rs-platform-serialization/Cargo.toml: unused manifest key: package.private
warning: /mnt/dashstore/app/dashpay-platform/packages/rs-platform-serialization-derive/Cargo.toml: unused manifest key: package.private
warning: /mnt/dashstore/app/dashpay-platform/packages/rs-platform-value-convertible/Cargo.toml: unused manifest key: package.private
warning: /mnt/dashstore/app/dashpay-platform/packages/rs-platform-versioning/Cargo.toml: unused manifest key: package.private
warning: /mnt/dashstore/app/dashpay-platform/packages/rs-drive/Cargo.toml: unused manifest key: package.private
warning: /mnt/dashstore/app/dashpay-platform/packages/rs-platform-version/Cargo.toml: unused manifest key: package.private
warning: skipping duplicate package `embedded` found at `/mnt/dashstore/app/.cargo/git/checkouts/rust-dashcore-b01a88e2cb0da4a0/db8794e/dash/embedded`
   Compiling cfg-if v1.0.0
   Compiling memchr v2.6.3
   # ... skip a few ...
   Compiling wasm-logger v0.2.0
   Compiling futures v0.3.28
error: failed to run custom build command for `rs-x11-hash v0.1.8`

Caused by:
  process didn't exit successfully: `/mnt/dashstore/app/dashpay-platform/target/debug/build/rs-x11-hash-e2a89e624441d74a/build-script-build` (exit status: 1)
  --- stdout
  TARGET = Some("wasm32-unknown-unknown")
  OPT_LEVEL = Some("0")
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  HOST = Some("x86_64-unknown-linux-gnu")
  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" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "--target=wasm32-unknown-unknown" "-I" "src" "-I" "wasm-sysroot" "-Wall" "-Wextra" "-Wno-unused-but-set-variable" "-o" "/mnt/dashstore/app/dashpay-platform/target/wasm32-unknown-unknown/debug/build/rs-x11-hash-0ca525602c680f32/out/src/x11_hash.o" "-c" "src/x11_hash.c"
  exit status: 0
  cargo:rerun-if-env-changed=ARFLAGS_wasm32-unknown-unknown
  ARFLAGS_wasm32-unknown-unknown = None
  cargo:rerun-if-env-changed=ARFLAGS_wasm32_unknown_unknown
  ARFLAGS_wasm32_unknown_unknown = None
  cargo:rerun-if-env-changed=TARGET_ARFLAGS
  TARGET_ARFLAGS = None
  cargo:rerun-if-env-changed=ARFLAGS
  ARFLAGS = None
  running: ZERO_AR_DATE="1" "llvm-ar" "cq" "/mnt/dashstore/app/dashpay-platform/target/wasm32-unknown-unknown/debug/build/rs-x11-hash-0ca525602c680f32/out/libsrc.a" "/mnt/dashstore/app/dashpay-platform/target/wasm32-unknown-unknown/debug/build/rs-x11-hash-0ca525602c680f32/out/src/x11_hash.o"

  --- stderr

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

warning: build failed, waiting for other jobs to finish...
shumkov commented 1 month ago

Please check README.md