cmyr / cargo-instruments

A cargo plugin to generate Xcode Instruments trace files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mention feature `vendored-openssl` in installation instructions

stevecheckoway opened this issue · comments

Neither cargo install cargo-instruments nor the Nix instructions worked for me for the same reason: openssl-sys expects openssl to have been installed via Homebrew. It would be good to mention this requirement as well as mention that

$ cargo install --features vendored-openssl -- cargo-instruments

works if you don't have Homebrew installed.

Adding the --features vendored-openssl flag to the Nix instructions did not work for me.
error: failed to run custom build command for `openssl-sys v0.9.75`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installrmUUH3/release/build/openssl-sys-d14eba0fcebfd515/build-script-main` (exit status: 101)
  --- stdout
  cargo:rustc-cfg=const_fn
  cargo:rerun-if-env-changed=AARCH64_APPLE_DARWIN_OPENSSL_NO_VENDOR
  AARCH64_APPLE_DARWIN_OPENSSL_NO_VENDOR unset
  cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
  OPENSSL_NO_VENDOR unset
  CC_aarch64-apple-darwin = None
  CC_aarch64_apple_darwin = None
  HOST_CC = None
  CC = Some("clang")
  CFLAGS_aarch64-apple-darwin = None
  CFLAGS_aarch64_apple_darwin = None
  HOST_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  running "perl" "./Configure" "--prefix=/tmp/cargo-installrmUUH3/release/build/openssl-sys-1b841185aab54a66/out/openssl-build/install" "--openssldir=/usr/local/ssl" "no-dso" "no-shared" "no-ssl3" "no-unit-test" "no-comp" "no-zlib" "no-zlib-dynamic" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "darwin64-arm64-cc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=arm64-apple-darwin"

  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /Users/steve/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-src-111.22.0+1.1.1q/src/lib.rs:488:39
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-instruments v0.4.7`, intermediate artifacts can be found at `/tmp/cargo-installrmUUH3`

Caused by:
  build failed

Feel free to submit a PR to clarify this! It isn't a problem I run into personally, so you're in a better position to make this change. :)