Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #3434 from pacificcode/eosio_build_centos
Browse files Browse the repository at this point in the history
CentOS: Boost version 1.67
  • Loading branch information
Greg Lee committed May 25, 2018
2 parents e528e5f + 26ff925 commit 00c7869
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 22 deletions.
7 changes: 1 addition & 6 deletions eosio_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@
export LLVM_DIR=${HOME}/opt/wasm/lib/cmake/llvm
export CMAKE=${HOME}/opt/cmake/bin/cmake
export PATH=${HOME}/opt/mongodb/bin:$PATH
export BOOST_ROOT="${HOME}/opt/boost_1_67_0"
;;
"CentOS Linux")
FILE="${PWD}/scripts/eosio_build_centos.sh"
Expand All @@ -153,45 +152,41 @@
export LLVM_DIR=${HOME}/opt/wasm/lib/cmake/llvm
export CMAKE=${HOME}/opt/cmake/bin/cmake
export PATH=${HOME}/opt/mongodb/bin:$PATH
export BOOST_ROOT="${HOME}/opt/boost_1_66_0"
;;
"elementary OS")
FILE="${PWD}/scripts/eosio_build_ubuntu.sh"
CXX_COMPILER=clang++-4.0
C_COMPILER=clang-4.0
MONGOD_CONF=${HOME}/opt/mongodb/mongod.conf
export PATH=${HOME}/opt/mongodb/bin:$PATH
export BOOST_ROOT="${HOME}/opt/boost_1_67_0"
;;
"Fedora")
FILE="${PWD}/scripts/eosio_build_fedora.sh"
CXX_COMPILER=g++
C_COMPILER=gcc
MONGOD_CONF=/etc/mongod.conf
export LLVM_DIR=${HOME}/opt/wasm/lib/cmake/llvm
export BOOST_ROOT="${HOME}/opt/boost_1_67_0"
;;
"Linux Mint")
FILE="${PWD}/scripts/eosio_build_ubuntu.sh"
CXX_COMPILER=clang++-4.0
C_COMPILER=clang-4.0
MONGOD_CONF=${HOME}/opt/mongodb/mongod.conf
export PATH=${HOME}/opt/mongodb/bin:$PATH
export BOOST_ROOT="${HOME}/opt/boost_1_67_0"
;;
"Ubuntu")
FILE="${PWD}/scripts/eosio_build_ubuntu.sh"
CXX_COMPILER=clang++-4.0
C_COMPILER=clang-4.0
MONGOD_CONF=${HOME}/opt/mongodb/mongod.conf
export PATH=${HOME}/opt/mongodb/bin:$PATH
export BOOST_ROOT="${HOME}/opt/boost_1_67_0"
;;
*)
printf "\\n\\tUnsupported Linux Distribution. Exiting now.\\n\\n"
exit 1
esac

export BOOST_ROOT="${HOME}/opt/boost_1_67_0"
OPENSSL_ROOT_DIR=/usr/include/openssl
WASM_ROOT="${HOME}/opt/wasm"
fi
Expand Down
33 changes: 17 additions & 16 deletions scripts/eosio_build_centos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@

printf "\\n\\tYUM repository successfully updated.\\n\\n"

DEP_ARRAY=( git autoconf automake bzip2 libtool ocaml.x86_64 doxygen graphviz-devel.x86_64 libicu-devel.x86_64 \
bzip2-devel.x86_64 openssl-devel.x86_64 gmp-devel.x86_64 python-devel.x86_64 gettext-devel.x86_64)
DEP_ARRAY=( git autoconf automake bzip2 libtool ocaml.x86_64 doxygen graphviz-devel.x86_64 \
libicu-devel.x86_64 bzip2.x86_64 bzip2-devel.x86_64 openssl-devel.x86_64 gmp-devel.x86_64 \
python-devel.x86_64 gettext-devel.x86_64)
COUNT=1
DISPLAY=""
DEP=""
Expand Down Expand Up @@ -300,9 +301,9 @@
printf "\\n\\tChecking boost library installation.\\n"
BVERSION=$( grep "#define BOOST_VERSION" "${BOOST_ROOT}/include/boost/version.hpp" 2>/dev/null \
| tail -1 | tr -s ' ' | cut -d\ -f3)
if [ "${BVERSION}" != "106600" ]; then
if [ "${BVERSION}" != "106700" ]; then
printf "\\tRemoving existing boost libraries in %s/opt/boost* .\\n" "${HOME}"
if ! rm -rf "${HOME}/opt/boost*"
if ! rm -rf "${HOME}"/opt/boost*
then
printf "\\n\\tUnable to remove deprecated boost libraries at %s/opt/boost*.\\n" "${HOME}"
printf "\\n\\tExiting now.\\n\\n"
Expand All @@ -315,27 +316,27 @@
printf "\\n\\tExiting now.\\n\\n"
exit 1;
fi
STATUS=$(curl -LO -w '%{http_code}' --connect-timeout 30 https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.bz2)
STATUS=$(curl -LO -w '%{http_code}' --connect-timeout 30 https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.tar.bz2)
if [ "${STATUS}" -ne 200 ]; then
printf "\\tUnable to download Boost libraries at this time.\\n"
printf "\\n\\tExiting now.\\n\\n"
exit 1;
fi
if ! tar xf "${TEMP_DIR}/boost_1_66_0.tar.bz2"
if ! tar xf "${TEMP_DIR}/boost_1_67_0.tar.bz2"
then
printf "\\n\\tUnable to unarchive file %s/boost_1_66_0.tar.bz2.\\n" "${TEMP_DIR}"
printf "\\n\\tUnable to unarchive file %s/boost_1_67_0.tar.bz2.\\n" "${TEMP_DIR}"
printf "\\n\\tExiting now.\\n\\n"
exit 1;
fi
if ! rm -f "${TEMP_DIR}/boost_1_66_0.tar.bz2"
if ! rm -f "${TEMP_DIR}/boost_1_67_0.tar.bz2"
then
printf "\\n\\tUnable to remove file %s/boost_1_66_0.tar.bz2.\\n" "${TEMP_DIR}"
printf "\\n\\tUnable to remove file %s/boost_1_67_0.tar.bz2.\\n" "${TEMP_DIR}"
printf "\\n\\tExiting now.\\n\\n"
exit 1;
fi
if ! cd "${TEMP_DIR}/boost_1_66_0/"
if ! cd "${TEMP_DIR}/boost_1_67_0/"
then
printf "\\n\\tUnable to enter directory %s/boost_1_66_0.\\n" "${TEMP_DIR}"
printf "\\n\\tUnable to enter directory %s/boost_1_67_0.\\n" "${TEMP_DIR}"
printf "\\n\\tExiting now.\\n\\n"
exit 1;
fi
Expand All @@ -345,21 +346,21 @@
printf "\\n\\tExiting now.\\n\\n"
exit 1;
fi
if ! ./b2 install
if ! "${TEMP_DIR}"/boost_1_67_0/b2 -j2 install
then
printf "\\n\\tInstallation of boost libraries failed with the above error. 1\\n"
printf "\\n\\tExiting now.\\n\\n"
exit 1;
fi
if ! rm -rf "${TEMP_DIR}/boost_1_66_0/"
if ! rm -rf "${TEMP_DIR}/boost_1_67_0/"
then
printf "\\n\\tUnable to remove directory %s/boost_1_66_0.\\n" "${TEMP_DIR}"
printf "\\n\\tUnable to remove directory %s/boost_1_67_0.\\n" "${TEMP_DIR}"
printf "\\n\\tExiting now.\\n\\n"
exit 1;
fi
printf "\\tBoost 1.66.0 successfully installed @ %s/opt/boost_1_66_0.\\n\\n" "${HOME}"
printf "\\tBoost 1.67.0 successfully installed @ %s/opt/boost_1_67_0.\\n\\n" "${HOME}"
else
printf "\\tBoost 1.66.0 found at %s/opt/boost_1_66_0.\\n\\n" "${HOME}"
printf "\\tBoost 1.67.0 found at %s/opt/boost_1_67_0.\\n\\n" "${HOME}"
fi

printf "\\n\\tChecking MongoDB installation.\\n"
Expand Down

0 comments on commit 00c7869

Please sign in to comment.