aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2016-11-06 08:23:40 -0800
committerGitHub <[email protected]>2016-11-06 08:23:40 -0800
commit4f6c842ae42b7d0b3db6786c44e0d46e8535b749 (patch)
tree90bd5e5566fe2040aed16f68baaf88dae2b92500
parentMerge branch 'release' (diff)
parentProvide a tailored error message on Linux (diff)
downloadrust-openssl-4f6c842ae42b7d0b3db6786c44e0d46e8535b749.tar.xz
rust-openssl-4f6c842ae42b7d0b3db6786c44e0d46e8535b749.zip
Merge pull request #513 from alexcrichton/pkg-config-error
Provide a tailored error message on Linux
-rw-r--r--openssl-sys/build.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/openssl-sys/build.rs b/openssl-sys/build.rs
index a435b192..b6c8c2de 100644
--- a/openssl-sys/build.rs
+++ b/openssl-sys/build.rs
@@ -6,6 +6,7 @@ use std::ffi::OsString;
use std::fs::File;
use std::io::Read;
use std::path::{Path, PathBuf};
+use std::process::Command;
fn main() {
let target = env::var("TARGET").unwrap();
@@ -100,6 +101,18 @@ Unfortunately though the compile cannot continue, so aborting.
}
}
+ if host.contains("unknown-linux") && target.contains("unknown-linux-gnu") {
+ if Command::new("pkg-config").output().is_err() {
+ msg.push_str(&format!("
+It looks like you're compiling on Linux and also targeting Linux. Currently this
+requires the `pkg-config` utility to find OpenSSL but unfortunately `pkg-config`
+could not be found. If you have OpenSSL installed you can likely fix this by
+installing `pkg-config`.
+
+"));
+ }
+ }
+
if host.contains("windows") && target.contains("windows-gnu") {
msg.push_str(&format!("
It looks like you're compiling for MinGW but you may not have either OpenSSL or