memgraph / rsmgclient

Memgraph database adapter for Rust programming language.
https://crates.io/crates/rsmgclient
Apache License 2.0
38 stars 6 forks source link

Unable to install rsmgclient using Cargo #40

Closed adarshp closed 1 year ago

adarshp commented 1 year ago

Hello, thanks for building this Rust driver, I appreciate it!

Just wanted to let you know, I'm facing an error when I try to install it using Cargo. Here's the output of the cargo install rsmgclient invocation:

    Updating crates.io index
  Downloaded rsmgclient v2.0.0
  Downloaded 1 crate (156.7 KB) in 0.67s
  Installing rsmgclient v2.0.0
  Downloaded env_logger v0.8.4
  Downloaded libloading v0.7.4
  Downloaded regex v1.7.0
  Downloaded which v3.1.1
  Downloaded vec_map v0.8.2
  Downloaded textwrap v0.11.0
  Downloaded peeking_take_while v0.1.2
  Downloaded lazycell v1.3.0
  Downloaded proc-macro2 v1.0.47
  Downloaded rustc-hash v1.1.0
  Downloaded num-integer v0.1.45
  Downloaded unicode-ident v1.0.5
  Downloaded strsim v0.8.0
  Downloaded clang-sys v1.4.0
  Downloaded cmake v0.1.49
  Downloaded unicode-width v0.1.10
  Downloaded shlex v1.1.0
  Downloaded iana-time-zone v0.1.53
  Downloaded ansi_term v0.12.1
  Downloaded humantime v2.1.0
  Downloaded cc v1.0.74
  Downloaded clap v2.34.0
  Downloaded chrono v0.4.22
  Downloaded maplit v1.0.2
  Downloaded core-foundation-sys v0.8.3
  Downloaded time v0.1.44
  Downloaded cexpr v0.4.0
  Downloaded bindgen v0.58.1
  Downloaded libc v0.2.137
  Downloaded regex-syntax v0.6.28
  Downloaded 30 crates (2.2 MB) in 1.46s
   Compiling libc v0.2.137
   Compiling memchr v2.5.0
   Compiling glob v0.3.0
   Compiling autocfg v1.1.0
   Compiling version_check v0.9.4
   Compiling cfg-if v1.0.0
   Compiling clang-sys v1.4.0
   Compiling nom v5.1.2
   Compiling log v0.4.17
   Compiling proc-macro2 v1.0.47
   Compiling aho-corasick v0.7.19
   Compiling atty v0.2.14
   Compiling unicode-width v0.1.10
   Compiling quote v1.0.21
   Compiling regex-syntax v0.6.28
   Compiling unicode-ident v1.0.5
   Compiling textwrap v0.11.0
   Compiling libloading v0.7.4
   Compiling num-traits v0.2.15
   Compiling vec_map v0.8.2
   Compiling strsim v0.8.0
   Compiling core-foundation-sys v0.8.3
   Compiling humantime v2.1.0
   Compiling ansi_term v0.12.1
   Compiling regex v1.7.0
   Compiling termcolor v1.1.3
   Compiling bindgen v0.58.1
   Compiling bitflags v1.3.2
   Compiling clap v2.34.0
   Compiling cexpr v0.4.0
   Compiling env_logger v0.8.4
   Compiling which v3.1.1
   Compiling num-integer v0.1.45
   Compiling rustc-hash v1.1.0
   Compiling peeking_take_while v0.1.2
   Compiling cc v1.0.74
   Compiling lazycell v1.3.0
   Compiling shlex v1.1.0
   Compiling lazy_static v1.4.0
   Compiling cmake v0.1.49
   Compiling iana-time-zone v0.1.53
   Compiling time v0.1.44
   Compiling chrono v0.4.22
   Compiling maplit v1.0.2
   Compiling rsmgclient v2.0.0
error: failed to run custom build command for `rsmgclient v2.0.0`

Caused by:
  process didn't exit successfully: `/var/folders/56/yl5bzsz54rjgryrnb24d29200000gs/T/cargo-installGmNHda/release/build/rsmgclient-2f84394e225e3891/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /Users/adarsh/.cargo/registry/src/github.com-1ecc6299db9ec823/rsmgclient-2.0.0/build.rs:58:18
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: failed to compile `rsmgclient v2.0.0`, intermediate artifacts can be found at `/var/folders/56/yl5bzsz54rjgryrnb24d29200000gs/T/cargo-installGmNHda`
adarshp commented 1 year ago

From looking at build.rs, it looks like this crate expects OpenSSL to be installed on macOS using Homebrew. There should probably be a way to set this using an environment variable like OPENSSL_PATH. We could also make it more robust by checking for MacPorts installations.

adarshp commented 1 year ago

I've submitted a PR to add supports for MacPorts: #41 .

adarshp commented 1 year ago

Closed by #41