Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fails when compiling openssl-sys v0.6.5 #283

Closed
judy-zz opened this issue Oct 13, 2015 · 5 comments
Closed

Installation fails when compiling openssl-sys v0.6.5 #283

judy-zz opened this issue Oct 13, 2015 · 5 comments

Comments

@judy-zz
Copy link

judy-zz commented Oct 13, 2015

Fresh install of Eve on a MacBook Air (13-inch, Mid 2011) running OS X El Capitan. Homebrew 0.9.5 is installed, along with latest XCode for El Capitan.

./install-multirust.sh completed with no warnings or errors. Then I run ./bash.sh and get this:

* Installing commit hooks...done.
* Checking dependencies...npm WARN package.json eve@0.0.0 No README data
run.sh: line 71: =0: command not found
run.sh: line 73: return: codemirror@5.7.0: numeric argument required
done.
* Compiling editor...done.
* Opening editor: /Users/clinton/Projects/Eve/ui/waiting-room.html
* Updating Rust...done.
* Compiling and running server. This takes a while...
    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading num_cpus v0.2.6
 Downloading gcc v0.3.14
 Downloading libressl-pnacl-sys v2.1.6
 Downloading language-tags v0.0.7
 Downloading hyper v0.6.13
 Downloading advapi32-sys v0.1.2
 Downloading libc v0.1.10
 Downloading unicase v1.0.0
 Downloading httparse v0.1.6
 Downloading rustc-serialize v0.3.16
 Downloading traitobject v0.0.1
 Downloading cookie v0.2.0
 Downloading bitflags v0.3.2
 Downloading conduit-mime-types v0.7.3
 Downloading time v0.1.32
 Downloading openssl v0.6.5
 Downloading websocket v0.12.2
 Downloading pkg-config v0.3.5
 Downloading winapi-build v0.1.1
 Downloading openssl-sys v0.6.5
 Downloading pnacl-build-helper v1.4.10
 Downloading url v0.2.37
 Downloading bit-vec v0.4.1
 Downloading tempdir v0.3.4
 Downloading mime v0.1.0
 Downloading winapi v0.2.4
 Downloading log v0.3.2
 Downloading cbor v0.3.16
 Downloading matches v0.1.2
 Downloading hpack v0.2.0
 Downloading byteorder v0.3.13
 Downloading typeable v0.1.2
 Downloading kernel32-sys v0.1.4
 Downloading getopts v0.2.14
 Downloading bit-set v0.2.0
 Downloading lazy_static v0.1.14
 Downloading cookie v0.1.21
 Downloading solicit v0.4.4
 Downloading rand v0.3.11
   Compiling getopts v0.2.14
   Compiling typeable v0.1.2
   Compiling language-tags v0.0.7
   Compiling bit-vec v0.4.1
   Compiling winapi-build v0.1.1
   Compiling byteorder v0.3.13
   Compiling libc v0.1.10
   Compiling bitflags v0.3.2
   Compiling pkg-config v0.3.5
   Compiling traitobject v0.0.1
   Compiling httparse v0.1.6
   Compiling unicase v1.0.0
   Compiling lazy_static v0.1.14
   Compiling rustc-serialize v0.3.16
   Compiling winapi v0.2.4
   Compiling matches v0.1.2
   Compiling kernel32-sys v0.1.4
   Compiling advapi32-sys v0.1.2
   Compiling bit-set v0.2.0
   Compiling log v0.3.2
   Compiling num_cpus v0.2.6
   Compiling hpack v0.2.0
   Compiling mime v0.1.0
   Compiling gcc v0.3.14
   Compiling rand v0.3.11
   Compiling time v0.1.32
   Compiling openssl-sys v0.6.5
   Compiling solicit v0.4.4
Build failed, waiting for other jobs to finish...
failed to run custom build command for `openssl-sys v0.6.5`
Process didn't exit successfully: `/Users/clinton/Projects/Eve/runtime/target/release/build/openssl-sys-e0bd245bf09b1a3f/build-script-build` (exit code: 101)
--- stdout
cargo:rustc-link-search=native=/usr/lib
cargo:rustc-link-lib=ssl
cargo:rustc-link-lib=crypto
cargo:rustc-link-lib=z
TARGET = Some("x86_64-apple-darwin")
OPT_LEVEL = Some("3")
PROFILE = Some("release")
TARGET = Some("x86_64-apple-darwin")
debug=false opt-level=3
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
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" "-c" "-ffunction-sections" "-fdata-sections" "-m64" "-fPIC" "-o" "/Users/clinton/Projects/Eve/runtime/target/release/build/openssl-sys-e0bd245bf09b1a3f/out/src/openssl_shim.o" "src/openssl_shim.c"


command did not execute successfully, got: exit code: 1



--- stderr
src/openssl_shim.c:1:10: fatal error: 'openssl/hmac.h' file not found
#include <openssl/hmac.h>
         ^
1 error generated.
thread '<main>' panicked at 'explicit panic', /Users/clinton/.multirust/toolchains/nightly-2015-09-17/cargo/registry/src/github.com-0a35038f75765ae4/gcc-0.3.14/src/lib.rs:667
stack backtrace:
   1:        0x106d33560 - sys::backtrace::tracing::imp::write::h2840f83d535a2071Y7s
   2:        0x106d326c3 - panicking::on_panic::h087bd48712199c80wWw
   3:        0x106d1a582 - sys_common::unwind::begin_unwind_inner::h3614f013547b5d8fvas
   4:        0x106d101d4 - sys_common::unwind::begin_unwind::h3454235707985699741
   5:        0x106d0e2a6 - fail::hee240580605efbc3IVa
   6:        0x106d13efd - run::ha3af0f21bda82509ASa
   7:        0x106d12b8f - Config::compile_object::h8d5066b35e843438ipa
   8:        0x106d0e7ee - Config::compile::h526e6a8dc823d0235ka
   9:        0x106d0099f - build_openssl_shim::h1d2215594f233aceBua
  10:        0x106cfb073 - main::h8ee66a42e050a7e5laa
  11:        0x106d36d62 - sys_common::unwind::try::try_fn::h11609466537374562779
  12:        0x106d31d88 - __rust_try
  13:        0x106d36beb - rt::lang_start::hf0f318bf9acb9103hUw
  14:        0x106d06a19 - main

 ~/P/Eve   master  bash run.sh                                                                                  Tue Oct 13 09:12:06 EDT 2015
* Installing commit hooks...done.
* Checking dependencies...done.
* Compiling editor...done.
* Opening editor: /Users/clinton/Projects/Eve/ui/waiting-room.html
* Rust is up to date.
* Compiling and running server. This takes a while...
   Compiling cbor v0.3.16
   Compiling conduit-mime-types v0.7.3
   Compiling url v0.2.37
   Compiling openssl-sys v0.6.5
Build failed, waiting for other jobs to finish...
failed to run custom build command for `openssl-sys v0.6.5`
Process didn't exit successfully: `/Users/clinton/Projects/Eve/runtime/target/release/build/openssl-sys-e0bd245bf09b1a3f/build-script-build` (exit code: 101)
--- stdout
cargo:rustc-link-search=native=/usr/lib
cargo:rustc-link-lib=ssl
cargo:rustc-link-lib=crypto
cargo:rustc-link-lib=z
TARGET = Some("x86_64-apple-darwin")
OPT_LEVEL = Some("3")
PROFILE = Some("release")
TARGET = Some("x86_64-apple-darwin")
debug=false opt-level=3
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
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" "-c" "-ffunction-sections" "-fdata-sections" "-m64" "-fPIC" "-o" "/Users/clinton/Projects/Eve/runtime/target/release/build/openssl-sys-e0bd245bf09b1a3f/out/src/openssl_shim.o" "src/openssl_shim.c"


command did not execute successfully, got: exit code: 1



--- stderr
src/openssl_shim.c:1:10: fatal error: 'openssl/hmac.h' file not found
#include <openssl/hmac.h>
         ^
1 error generated.
thread '<main>' panicked at 'explicit panic', /Users/clinton/.multirust/toolchains/nightly-2015-09-17/cargo/registry/src/github.com-0a35038f75765ae4/gcc-0.3.14/src/lib.rs:667
stack backtrace:
   1:        0x103130560 - sys::backtrace::tracing::imp::write::h2840f83d535a2071Y7s
   2:        0x10312f6c3 - panicking::on_panic::h087bd48712199c80wWw
   3:        0x103117582 - sys_common::unwind::begin_unwind_inner::h3614f013547b5d8fvas
   4:        0x10310d1d4 - sys_common::unwind::begin_unwind::h3454235707985699741
   5:        0x10310b2a6 - fail::hee240580605efbc3IVa
   6:        0x103110efd - run::ha3af0f21bda82509ASa
   7:        0x10310fb8f - Config::compile_object::h8d5066b35e843438ipa
   8:        0x10310b7ee - Config::compile::h526e6a8dc823d0235ka
   9:        0x1030fd99f - build_openssl_shim::h1d2215594f233aceBua
  10:        0x1030f8073 - main::h8ee66a42e050a7e5laa
  11:        0x103133d62 - sys_common::unwind::try::try_fn::h11609466537374562779
  12:        0x10312ed88 - __rust_try
  13:        0x103133beb - rt::lang_start::hf0f318bf9acb9103hUw
  14:        0x103103a19 - main

Looks like I'm missing openssl header files. Should they be included in the project somewhere? Should I be installing openssl some other way first via Homebrew?

@judy-zz
Copy link
Author

judy-zz commented Oct 13, 2015

Looks like it could be a duplicate of this issue:

sfackler/rust-openssl#255

@judy-zz
Copy link
Author

judy-zz commented Oct 13, 2015

I resolved it! As recommended near the bottom of that page, brew link --force openssl appears to fix it. I'm not sure why or how it works. Other than that, the installation process works beautifully. Maybe add a check to see if the right files are in place, and if not, recommend running that command to the end user? If it can't be fixed within Eve itself?

@cmontella
Copy link
Contributor

Thanks for the comments. Even though you resolved it yourself, it's good for us to see some real-world examples of installation issues users are facing. System configuration is tricky for us to solve with a build script, since we don't want to mess with people's environments. In the future we'll have a hosted version and binaries for each platform to ameliorate this kind of issue. In the meantime, I think it's a great idea to start a installation FAQ for people who run into already solved issues.

@NeoTeo
Copy link

NeoTeo commented Dec 15, 2015

Thanks for opening this issue. Although your solution didn't work for me, the link you included did point me to something that worked for me.

So, since El Cap 10.11 no longer uses openssl it doesn't include the headers which requires you to install it (in our case via Brew) separately.

So, in addition to installing openssl I also had to export the path to the headers using:
export OPENSSL_INCLUDE_DIR=/usr/local/Cellar/openssl/1.0.2d_1/include/
although pointing to a particular release version smells and should probably be
export OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include

@cmontella
Copy link
Contributor

Thanks for the help. I will update the installation FAQ with your tip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants