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

Backend build failure #16

Closed
ghaditya opened this issue Feb 28, 2023 · 5 comments
Closed

Backend build failure #16

ghaditya opened this issue Feb 28, 2023 · 5 comments

Comments

@ghaditya
Copy link

Description
Backend fails to build after following the instructions in the readme.

To Reproduce
I followed the instructions as written in the readme.

Expected behavior
The backend starts up.

Actual behavior
The build failed with the following output:

C:\Users\adity\Documents\CSE 403\FitSocial\backend>cargo test
Compiling async-io v1.12.0
Compiling rquickjs-sys v0.1.7
Compiling devise_core v0.2.1
Compiling kv-log-macro v1.0.7
Compiling log v0.3.9
Compiling aead v0.5.1
Compiling rand_chacha v0.3.1
Compiling ref-cast-impl v1.0.14
Compiling spinning_top v0.2.5
Compiling hash32 v0.2.1
Compiling schannel v0.1.21
Compiling socket2 v0.4.7
Compiling windows-sys v0.42.0
Compiling proc-macro-error v1.0.4
Compiling uncased v0.9.7
error: failed to run custom build command for rquickjs-sys v0.1.7

Caused by:
process didn't exit successfully: C:\Users\adity\Documents\CSE 403\FitSocial\backend\target\debug\build\rquickjs-sys-fbb25584092fe374\build-script-build (exit code: 101)
--- stdout
cargo:rerun-if-changed=build.rs
cargo:rerun-if-env-changed=CARGO_FEATURE_EXPORTS
cargo:rerun-if-env-changed=CARGO_FEATURE_BINDGEN
cargo:rerun-if-env-changed=CARGO_FEATURE_UPDATE_BINDINGS
cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_BYTECODE
cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_GC
cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_GC_FREE
cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_FREE
cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_LEAKS
cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_MEM
cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_OBJECTS
cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_ATOMS
cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_SHAPES
cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_MODULE_RESOLVE
cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_PROMISE
cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_READ_OBJECT

--- stderr
thread 'main' panicked at 'called Result::unwrap() on an Err value: Error { kind: NotFound, message: "program not found" }', C:\Users\adity.cargo\registry\src\github.51.al-1ecc6299db9ec823\rquickjs-sys-0.1.7\build.rs:136:10
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

Additional context
I'm using a 64-bit Windows PC.

@ghaditya
Copy link
Author

The above includes the command line output resulting from cargo test - here is the (nearly identical) output from cargo run:

C:\Users\adity\Documents\CSE 403\FitSocial\backend>cargo run
Compiling indexmap v1.9.2
Compiling polling v2.5.2
Compiling url v2.3.1
Compiling curl v0.4.44
Compiling curl-sys v0.4.60+curl-7.88.1
Compiling rquickjs-sys v0.1.7
Compiling serde_json v1.0.93
Compiling pear v0.1.5
Compiling futures-channel v0.3.26
Compiling ghash v0.5.0
Compiling bindgen v0.64.0
Compiling hkdf v0.10.0
Compiling aes v0.8.2
Compiling hmac v0.12.1
Compiling ctr v0.9.2
Compiling tokio-util v0.7.7
error: failed to run custom build command for rquickjs-sys v0.1.7

Caused by:
process didn't exit successfully: C:\Users\adity\Documents\CSE 403\FitSocial\backend\target\debug\build\rquickjs-sys-fbb25584092fe374\build-script-build (exit code: 101)
--- stdout
cargo:rerun-if-changed=build.rs
cargo:rerun-if-env-changed=CARGO_FEATURE_EXPORTS
cargo:rerun-if-env-changed=CARGO_FEATURE_BINDGEN
cargo:rerun-if-env-changed=CARGO_FEATURE_UPDATE_BINDINGS
cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_BYTECODE
cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_GC
cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_GC_FREE
cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_FREE
cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_LEAKS
cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_MEM
cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_OBJECTS
cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_ATOMS
cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_SHAPES
cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_MODULE_RESOLVE
cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_PROMISE
cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_READ_OBJECT

--- stderr
thread 'main' panicked at 'called Result::unwrap() on an Err value: Error { kind: NotFound, message: "program not found" }', C:\Users\adity.cargo\registry\src\github.51.al-1ecc6299db9ec823\rquickjs-sys-0.1.7\build.rs:136:10
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

@Lawqup
Copy link
Collaborator

Lawqup commented Feb 28, 2023

DelSkayn/rquickjs#88 take a look at this. It might be the same issue.

@CharlesAtUW
Copy link

CharlesAtUW commented Mar 1, 2023

I'm getting a similar error (with the same steps to reproduce) when running cargo run/cargo test on attu. Before this, I installed Rust through this command: curl https://sh.rustup.rs -sSf | sh
(Also, note that the cargo run running is my second attempt at running the command. The first attempt had the same errors, though.)

(base) [chazi@attu2 backend]$ cargo run
   Compiling indexmap v1.9.2
   Compiling url v2.3.1
   Compiling serde_json v1.0.93
   Compiling serde_urlencoded v0.7.1
   Compiling curl-sys v0.4.60+curl-7.88.1
   Compiling curl v0.4.44
   Compiling isahc v0.9.14
   Compiling rquickjs-sys v0.1.7
   Compiling serde_qs v0.8.5
   Compiling librocksdb-sys v0.8.3+7.4.4
   Compiling rquickjs-core v0.1.7
   Compiling uncased v0.9.7
   Compiling zstd-sys v2.0.7+zstd.1.5.4
   Compiling tokio-util v0.7.7
   Compiling toml v0.5.11
   Compiling toml v0.4.10
   Compiling geo-types v0.7.8
   Compiling rmp-serde v1.1.1
   Compiling tokio-stream v0.1.12
   Compiling uuid v1.3.0
   Compiling chrono v0.4.23
   Compiling echodb v0.3.0
   Compiling bigdecimal v0.3.0
   Compiling unicase_serde v0.1.0
   Compiling storekey v0.3.0
   Compiling ubyte v0.10.3
   Compiling serde_with v2.2.0
error: failed to run custom build command for `librocksdb-sys v0.8.3+7.4.4`

Caused by:
  process didn't exit successfully: `/homes/iws/chazi/403/FitSocial/backend/target/debug/build/librocksdb-sys-f8fed01ccc29e49d/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'Unable to find libclang: "couldn't find any valid shared libraries matching: ['libclang.so', 'libclang-*.so', 'libclang.so.*', 'libclang-*.so.*'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"', /homes/iws/chazi/.cargo/registry/src/github.51.al-1ecc6299db9ec823/bindgen-0.64.0/./lib.rs:2393:31
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `rquickjs-sys v0.1.7`

Caused by:
  process didn't exit successfully: `/homes/iws/chazi/403/FitSocial/backend/target/debug/build/rquickjs-sys-28a1dfc9d5707967/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=build.rs
  cargo:rerun-if-env-changed=CARGO_FEATURE_EXPORTS
  cargo:rerun-if-env-changed=CARGO_FEATURE_BINDGEN
  cargo:rerun-if-env-changed=CARGO_FEATURE_UPDATE_BINDINGS
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_BYTECODE
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_GC
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_GC_FREE
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_FREE
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_LEAKS
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_MEM
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_OBJECTS
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_ATOMS
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_SHAPES
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_MODULE_RESOLVE
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_PROMISE
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_READ_OBJECT
  Appliyng patch patches/check_stack_overflow.patch
  patching file quickjs.c
  Appliyng patch patches/infinity_handling.patch
  patching file quickjs.c
  Hunk #1 succeeded at 10235 (offset 44 lines).
  Hunk #2 succeeded at 41732 (offset 168 lines).
  Hunk #3 succeeded at 47839 (offset 168 lines).
  Appliyng patch patches/atomic_new_class_id.patch
  patching file quickjs.c
  Hunk #1 succeeded at 3371 (offset 18 lines).
  Appliyng patch patches/read_module_exports.patch
  patching file quickjs.c
  Hunk #1 succeeded at 27254 (offset 93 lines).
  patching file quickjs.h
  Hunk #1 succeeded at 1039 (offset 4 lines).

  --- stderr
  thread 'main' panicked at 'Unable to find libclang: "couldn't find any valid shared libraries matching: ['libclang.so', 'libclang-*.so', 'libclang.so.*', 'libclang-*.so.*'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"', /homes/iws/chazi/.cargo/registry/src/github.51.al-1ecc6299db9ec823/bindgen-0.60.1/src/lib.rs:2172:31
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
(base) [chazi@attu2 backend]$ cargo test
   Compiling rquickjs-sys v0.1.7
   Compiling librocksdb-sys v0.8.3+7.4.4
   Compiling isahc v0.9.14
   Compiling rquickjs-macro v0.1.7
   Compiling h2 v0.3.16
   Compiling rocket_http v0.4.11
   Compiling geo v0.23.1
   Compiling figment v0.10.8
   Compiling multer v2.0.4
   Compiling http-types v2.12.0
error: failed to run custom build command for `librocksdb-sys v0.8.3+7.4.4`

Caused by:
  process didn't exit successfully: `/homes/iws/chazi/403/FitSocial/backend/target/debug/build/librocksdb-sys-f8fed01ccc29e49d/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'Unable to find libclang: "couldn't find any valid shared libraries matching: ['libclang.so', 'libclang-*.so', 'libclang.so.*', 'libclang-*.so.*'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"', /homes/iws/chazi/.cargo/registry/src/github.51.al-1ecc6299db9ec823/bindgen-0.64.0/./lib.rs:2393:31
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `rquickjs-sys v0.1.7`

Caused by:
  process didn't exit successfully: `/homes/iws/chazi/403/FitSocial/backend/target/debug/build/rquickjs-sys-28a1dfc9d5707967/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=build.rs
  cargo:rerun-if-env-changed=CARGO_FEATURE_EXPORTS
  cargo:rerun-if-env-changed=CARGO_FEATURE_BINDGEN
  cargo:rerun-if-env-changed=CARGO_FEATURE_UPDATE_BINDINGS
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_BYTECODE
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_GC
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_GC_FREE
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_FREE
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_LEAKS
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_MEM
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_OBJECTS
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_ATOMS
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_SHAPES
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_MODULE_RESOLVE
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_PROMISE
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_READ_OBJECT
  Appliyng patch patches/check_stack_overflow.patch
  patching file quickjs.c
  Appliyng patch patches/infinity_handling.patch
  patching file quickjs.c
  Hunk #1 succeeded at 10235 (offset 44 lines).
  Hunk #2 succeeded at 41732 (offset 168 lines).
  Hunk #3 succeeded at 47839 (offset 168 lines).
  Appliyng patch patches/atomic_new_class_id.patch
  patching file quickjs.c
  Hunk #1 succeeded at 3371 (offset 18 lines).
  Appliyng patch patches/read_module_exports.patch
  patching file quickjs.c
  Hunk #1 succeeded at 27254 (offset 93 lines).
  patching file quickjs.h
  Hunk #1 succeeded at 1039 (offset 4 lines).

  --- stderr
  thread 'main' panicked at 'Unable to find libclang: "couldn't find any valid shared libraries matching: ['libclang.so', 'libclang-*.so', 'libclang.so.*', 'libclang-*.so.*'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"', /homes/iws/chazi/.cargo/registry/src/github.51.al-1ecc6299db9ec823/bindgen-0.60.1/src/lib.rs:2172:31
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@Lawqup
Copy link
Collaborator

Lawqup commented Mar 1, 2023

Looks like you need to install libclang (I think clang from your package manager)

@CharlesAtUW
Copy link

CharlesAtUW commented Mar 1, 2023

I got it working, thank you! I switched to Windows (64-bit) since I had some issues installing clang on attu (independent of this project). There, I installed clang, and ran cargo add rquickjs while in the backend folder (this command may or may not be needed, since I didn't see if these steps without this step worked), and added "C:\Program Files\Git\usr\bin" to my PATH (since patch was needed, and Git had it already). After that, cargo run and cargo test worked.

@Lawqup Lawqup closed this as completed Mar 1, 2023
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

3 participants