Skip to content

Instantly share code, notes, and snippets.

@neonphog
Created March 28, 2019 23:19
Show Gist options
  • Select an option

  • Save neonphog/ba8daa307f78152b8f98c283d7adf810 to your computer and use it in GitHub Desktop.

Select an option

Save neonphog/ba8daa307f78152b8f98c283d7adf810 to your computer and use it in GitHub Desktop.
build holochain with static openssl
#!/bin/bash
# -- sane bash errors -- #
set -Eeuo pipefail
# -- download and build openssl -- #
curl -L -O https://github.com/openssl/openssl/archive/OpenSSL_1_1_1b.tar.gz
tar xf OpenSSL_1_1_1b.tar.gz
__ssl_dir="$(pwd)/openssl-OpenSSL_1_1_1b"
(cd "${__ssl_dir}" && ./config && make -j8)
# -- download holochain -- #
curl -L -O https://github.com/holochain/holochain-rust/archive/v0.0.8-alpha.tar.gz
tar xf v0.0.8-alpha.tar.gz
__hc_dir="$(pwd)/holochain-rust-0.0.8-alpha"
# -- build hc utility -- #
(cd "${__hc_dir}" && \
OPENSSL_STATIC="1" \
OPENSSL_LIB_DIR="${__ssl_dir}" \
OPENSSL_INCLUDE_DIR="${__ssl_dir}/include" \
cargo build --release -p hc)
cp "${__hc_dir}/target/release/hc" .
# -- build holochain conductor -- #
(cd "${__hc_dir}/conductor" && \
OPENSSL_STATIC="1" \
OPENSSL_LIB_DIR="${__ssl_dir}" \
OPENSSL_INCLUDE_DIR="${__ssl_dir}/include" \
cargo build --release -p holochain)
cp "${__hc_dir}/target/release/holochain" .
ldd hc holochain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment