Error installing on OSX
priyolahiri opened this issue · 3 comments
cargo install --git https://github.com/derniercri/snatch.git
Updating git repository https://github.com/derniercri/snatch.git
Updating registry https://github.com/rust-lang/crates.io-index
Downloading num_cpus v1.2.0
Downloading pbr v1.0.0-alpha.2
Downloading argparse v0.2.1
Downloading hyper v0.9.14
Downloading ansi_term v0.9.0
Downloading libc v0.2.18
Downloading kernel32-sys v0.2.2
Downloading time v0.1.35
Downloading winapi v0.2.8
Downloading winapi-build v0.1.1
Downloading rustc-serialize v0.3.22
Downloading unicase v1.4.0
Downloading url v1.2.4
Downloading httparse v1.2.1
Downloading openssl-verify v0.1.0
Downloading traitobject v0.0.1
Downloading language-tags v0.2.2
Downloading solicit v0.4.4
Downloading mime v0.2.2
Downloading cookie v0.2.5
Downloading typeable v0.1.2
Downloading log v0.3.6
Downloading openssl v0.7.14
Downloading rustc_version v0.1.7
Downloading semver v0.1.20
Downloading idna v0.1.0
Downloading matches v0.1.4
Downloading unicode-normalization v0.1.2
Downloading unicode-bidi v0.2.3
Downloading bitflags v0.7.0
Downloading openssl-sys v0.7.17
Downloading lazy_static v0.2.2
Downloading openssl-sys-extras v0.7.14
Downloading pkg-config v0.3.8
Downloading gcc v0.3.40
Downloading hpack v0.2.0
Compiling unicode-normalization v0.1.2
Compiling language-tags v0.2.2
Compiling pkg-config v0.3.8
Compiling log v0.3.6
Compiling matches v0.1.4
Compiling semver v0.1.20
Compiling rustc-serialize v0.3.22
Compiling unicode-bidi v0.2.3
Compiling argparse v0.2.1
Compiling ansi_term v0.9.0
Compiling lazy_static v0.2.2
Compiling idna v0.1.0
Compiling httparse v1.2.1
Compiling rustc_version v0.1.7
Compiling unicase v1.4.0
Compiling traitobject v0.0.1
Compiling bitflags v0.7.0
Compiling mime v0.2.2
Compiling libc v0.2.18
Compiling openssl-sys v0.7.17
Compiling gcc v0.3.40
Compiling typeable v0.1.2
Compiling winapi v0.2.8
Compiling winapi-build v0.1.1
Compiling kernel32-sys v0.2.2
Compiling time v0.1.35
Compiling hpack v0.2.0
Compiling num_cpus v1.2.0
Compiling url v1.2.4
Compiling pbr v1.0.0-alpha.2
Compiling solicit v0.4.4
Compiling openssl-sys-extras v0.7.14
Build failed, waiting for other jobs to finish...
error: failed to compile snatch v0.1.1 (https://github.com/derniercri/snatch.git#9e30b500)
, intermediate artifacts can be found at /var/folders/7c/fp0pspqj27l2frkfv567nmfh0000gn/T/cargo-install.PRrg6M7dBiun
Caused by:
failed to run custom build command for openssl-sys-extras v0.7.14
process didn't exit successfully: /var/folders/7c/fp0pspqj27l2frkfv567nmfh0000gn/T/cargo-install.PRrg6M7dBiun/release/build/openssl-sys-extras-5c7e4d8925825f00/build-script-build
(exit code: 101)
--- stdout
TARGET = Some("x86_64-apple-darwin")
OPT_LEVEL = Some("3")
PROFILE = Some("release")
TARGET = Some("x86_64-apple-darwin")
debug=false opt-level=3
HOST = Some("x86_64-apple-darwin")
TARGET = Some("x86_64-apple-darwin")
TARGET = Some("x86_64-apple-darwin")
HOST = Some("x86_64-apple-darwin")
CC_x86_64-apple-darwin = None
CC_x86_64_apple_darwin = None
HOST_CC = None
CC = None
HOST = Some("x86_64-apple-darwin")
TARGET = Some("x86_64-apple-darwin")
HOST = Some("x86_64-apple-darwin")
CFLAGS_x86_64-apple-darwin = None
CFLAGS_x86_64_apple_darwin = None
HOST_CFLAGS = None
CFLAGS = None
running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-m64" "-fPIC" "-o" "/var/folders/7c/fp0pspqj27l2frkfv567nmfh0000gn/T/cargo-install.PRrg6M7dBiun/release/build/openssl-sys-extras-5c7e4d8925825f00/out/src/openssl_shim.o" "-c" "src/openssl_shim.c"
cargo:warning=src/openssl_shim.c:1:10: fatal error: 'openssl/hmac.h' file not found
cargo:warning=#include <openssl/hmac.h>
cargo:warning= ^
cargo:warning=1 error generated.
ExitStatus(ExitStatus(256))
command did not execute successfully, got: exit code: 1
--- stderr
thread 'main' panicked at 'explicit panic', .cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.40/src/lib.rs:1006
note: Run with RUST_BACKTRACE=1
for a backtrace.
This is with the brew version of openssl already installed.
Hi @priyolahiri,
have you tried to export those environment variables ?
export OPENSSL_INCLUDE_DIR=`brew --prefix openssl`/include
export OPENSSL_LIB_DIR=`brew --prefix openssl`/lib
export DEP_OPENSSL_INCLUDE=`brew --prefix openssl`/include
That worked. Thank you so much.
Updating git repository `https://github.com/derniercri/snatch.git`
Compiling lazy_static v0.2.2
Compiling rustc-serialize v0.3.22
Compiling bitflags v0.7.0
Compiling traitobject v0.0.1
Compiling pkg-config v0.3.8
Compiling log v0.3.6
Compiling ansi_term v0.9.0
Compiling unicode-normalization v0.1.2
Compiling hpack v0.2.0
Compiling libc v0.2.18
Compiling httparse v1.2.1
Compiling num_cpus v1.2.0
Compiling mime v0.2.2
Compiling language-tags v0.2.2
Compiling solicit v0.4.4
Compiling winapi-build v0.1.1
Compiling kernel32-sys v0.2.2
Compiling openssl-sys v0.7.17
Compiling winapi v0.2.8
Compiling argparse v0.2.1
Compiling time v0.1.35
Compiling matches v0.1.4
Compiling unicode-bidi v0.2.3
Compiling pbr v1.0.0-alpha.2
Compiling idna v0.1.0
Compiling gcc v0.3.40
Compiling semver v0.1.20
Compiling typeable v0.1.2
Compiling url v1.2.4
Compiling rustc_version v0.1.7
Compiling unicase v1.4.0
Compiling openssl v0.7.14
Compiling openssl-sys-extras v0.7.14
Compiling cookie v0.2.5
Compiling openssl-verify v0.1.0
Compiling hyper v0.9.14
Compiling snatch v0.1.1 (https://github.com/derniercri/snatch.git#9e30b500)
Finished release [optimized] target(s) in 57.6 secs
Installing /Users/priyolahiri/.cargo/bin/snatch
Nice :-)