-
-
Notifications
You must be signed in to change notification settings - Fork 783
Closed
Description
I'm on OS X 10.11.5. I installed openssl via Homebrew, but forgot to set the environment variables. Building openssl-rust
fails (obviously), but then setting OPENSSL_{LIB,INCLUDE}_DIR
doesn't fix the build, I have to cargo clean
to make it work:
mbp:openssl luser$ cargo build
Updating registry `https://github.com/rust-lang/crates.io-index`
Compiling lazy_static v0.2.1
Compiling libc v0.2.11
Compiling pkg-config v0.3.8
Compiling gcc v0.3.28
Compiling bitflags v0.7.0
Compiling openssl-sys v0.7.13 (file:///Users/luser/build/rust-openssl/openssl-sys)
Compiling openssl v0.7.13 (file:///Users/luser/build/rust-openssl/openssl)
Compiling openssl-sys-extras v0.7.13 (file:///Users/luser/build/rust-openssl/openssl-sys-extras)
Build failed, waiting for other jobs to finish...
error: failed to run custom build command for `openssl v0.7.13 (file:///Users/luser/build/rust-openssl/openssl)`
Process didn't exit successfully: `/Users/luser/build/rust-openssl/openssl/target/debug/build/openssl-5eb7cdf3ea741d36/build-script-build` (exit code: 101)
--- stdout
TARGET = Some("x86_64-apple-darwin")
OPT_LEVEL = Some("0")
PROFILE = Some("debug")
TARGET = Some("x86_64-apple-darwin")
debug=true opt-level=0
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" "-O0" "-ffunction-sections" "-fdata-sections" "-g" "-m64" "-fPIC" "-o" "/Users/luser/build/rust-openssl/openssl/target/debug/build/openssl-5eb7cdf3ea741d36/out/src/c_helpers.o" "-c" "src/c_helpers.c"
ExitStatus(ExitStatus(256))
command did not execute successfully, got: exit code: 1
--- stderr
src/c_helpers.c:1:10: fatal error: 'openssl/ssl.h' file not found
#include <openssl/ssl.h>
^
1 error generated.
thread '<main>' panicked at 'explicit panic', /Users/luser/.cargo/registry/src/github.com-88ac128001ac3a9a/gcc-0.3.28/src/lib.rs:840
note: Run with `RUST_BACKTRACE=1` for a backtrace.
mbp:openssl luser$ export OPENSSL_LIB_DIR=`brew --prefix openssl`/lib
mbp:openssl luser$ export OPENSSL_INCLUDE_DIR=`brew --prefix openssl`/include
mbp:openssl luser$ cargo build
Compiling openssl v0.7.13 (file:///Users/luser/build/rust-openssl/openssl)
Compiling openssl-sys-extras v0.7.13 (file:///Users/luser/build/rust-openssl/openssl-sys-extras)
Build failed, waiting for other jobs to finish...
error: failed to run custom build command for `openssl v0.7.13 (file:///Users/luser/build/rust-openssl/openssl)`
Process didn't exit successfully: `/Users/luser/build/rust-openssl/openssl/target/debug/build/openssl-5eb7cdf3ea741d36/build-script-build` (exit code: 101)
--- stdout
TARGET = Some("x86_64-apple-darwin")
OPT_LEVEL = Some("0")
PROFILE = Some("debug")
TARGET = Some("x86_64-apple-darwin")
debug=true opt-level=0
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" "-O0" "-ffunction-sections" "-fdata-sections" "-g" "-m64" "-fPIC" "-o" "/Users/luser/build/rust-openssl/openssl/target/debug/build/openssl-5eb7cdf3ea741d36/out/src/c_helpers.o" "-c" "src/c_helpers.c"
ExitStatus(ExitStatus(256))
command did not execute successfully, got: exit code: 1
--- stderr
src/c_helpers.c:1:10: fatal error: 'openssl/ssl.h' file not found
#include <openssl/ssl.h>
^
1 error generated.
thread '<main>' panicked at 'explicit panic', /Users/luser/.cargo/registry/src/github.com-88ac128001ac3a9a/gcc-0.3.28/src/lib.rs:840
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Metadata
Metadata
Assignees
Labels
No labels