title: Openssl can't compile when compiling for ARM, otherwise works fine
body: <p>So recently I have been compiling a rust project for ARM. It compiles perfectly for x86, but whenever I switch to an ARM target it can't find the Openssl installation, I have pkg-config installed and working so its not that error. Not sure how to set the OPENSSL_DIR variable successfully either or where to find the installation myself. The error is pasted fully below</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>error: failed to run custom build command for `openssl-sys v0.9.61`
  
  Caused by:
    process didn't exit successfully: `/home/bob/yagna/blueberry/debug/build/openssl-sys-aae22c7790b14724/build-script-main` (exit code: 101)
    --- stdout
    cargo:rustc-cfg=const_fn
    cargo:rerun-if-env-changed=ARMV7_UNKNOWN_LINUX_GNUEABIHF_OPENSSL_LIB_DIR
    ARMV7_UNKNOWN_LINUX_GNUEABIHF_OPENSSL_LIB_DIR unset
    cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
    OPENSSL_LIB_DIR unset
    cargo:rerun-if-env-changed=ARMV7_UNKNOWN_LINUX_GNUEABIHF_OPENSSL_INCLUDE_DIR
    ARMV7_UNKNOWN_LINUX_GNUEABIHF_OPENSSL_INCLUDE_DIR unset
    cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
    OPENSSL_INCLUDE_DIR unset
    cargo:rerun-if-env-changed=ARMV7_UNKNOWN_LINUX_GNUEABIHF_OPENSSL_DIR
    ARMV7_UNKNOWN_LINUX_GNUEABIHF_OPENSSL_DIR unset
    cargo:rerun-if-env-changed=OPENSSL_DIR
    OPENSSL_DIR unset
    cargo:rerun-if-env-changed=OPENSSL_NO_PKG_CONFIG
    cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_armv7-unknown-linux-gnueabihf
    cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_armv7_unknown_linux_gnueabihf
    cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS
    cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS
    cargo:rerun-if-env-changed=PKG_CONFIG_armv7-unknown-linux-gnueabihf
    cargo:rerun-if-env-changed=PKG_CONFIG_armv7_unknown_linux_gnueabihf
    cargo:rerun-if-env-changed=TARGET_PKG_CONFIG
    cargo:rerun-if-env-changed=PKG_CONFIG
    cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_armv7-unknown-linux-gnueabihf
    cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_armv7_unknown_linux_gnueabihf
    cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_SYSROOT_DIR
    cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
    run pkg_config fail: "pkg-config has not been configured to support cross-compilation.\n\n                Install a sysroot for the target platform and configure it via\n                PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_PATH, or install a\n                cross-compiling wrapper for pkg-config and set it via\n                PKG_CONFIG environment variable."
  
    --- stderr
    thread 'main' panicked at '
  
    Could not find directory of OpenSSL installation, and this `-sys` crate cannot
    proceed without this knowledge. If OpenSSL is installed and this crate had
    trouble finding it,  you can set the `OPENSSL_DIR` environment variable for the
    compilation process.
  
    Make sure you also have the development packages of openssl installed.
    For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora.
  
    If you're in a situation where you think the directory *should* be found
    automatically, please open a bug at https://github.com/sfackler/rust-openssl
    and include information about your system as well as this message.
  
    $HOST = x86_64-unknown-linux-gnu
    $TARGET = armv7-unknown-linux-gnueabihf
    openssl-sys = 0.9.61
  
    ', /home/bob/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.61/build/find_normal.rs:174:5
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace</code></pre>
  </div>
  </div>
  </p>
  <p>The .cargo config file is also as follows</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>[build]
  target-dir="/home/bob/yagna/blueberry"
  target="armv7-unknown-linux-gnueabihf"
  linker = "arm-linux-gnueabihf-gcc"
  [target.armv7-unknown-linux-gnueabihf]
  linker = "arm-linux-gnueabihf-gcc"</code></pre>
  </div>
  </div>
  </p>
  <p>At a loss for what to do, this ubuntu, I have libssl-dev installed and up to date, the target is added and install using rustup and sudo apt get. Not sure how to fix this</p>