This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Eosio build: 7 gigs of ram requirement and other fixes #2355
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
00e0e25
added centos linux condition to python test script
92b8ca9
Merge branch 'master' into eosio_build_centos
c620f0d
Centos: added network call response checking, boost version check and…
401df86
minor changes to darwin build script
cae71f1
changed memory requirements for darwin
57c476c
added MEM_MIN=8000 to eosio_build.sh
2b4302f
changed min ram requirements to 7 gigs
8078168
added calculation to centos build script
aa4ae92
Merge branch 'master' into eosio_build_centos
07675d8
Merge branch 'master' into eosio_build_centos
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,9 @@ | |
DISK_TOTAL=$(( $DISK_TOTAL_KB / 1048576 )) | ||
DISK_AVAIL=$(( $DISK_AVAIL_KB / 1048576 )) | ||
|
||
MEM_GIG=$(( (($MEM_MEG / 1000) / 2) )) | ||
JOBS=$(( ${MEM_GIG} > ${CPU_CORE} ? ${CPU_CORE} : ${MEM_GIG} )) | ||
|
||
printf "\n\tOS name: $OS_NAME\n" | ||
printf "\tOS Version: ${OS_VER}\n" | ||
printf "\tCPU speed: ${CPU_SPEED}Mhz\n" | ||
|
@@ -21,21 +24,21 @@ | |
printf "\tDisk space total: ${DISK_TOTAL%.*}G\n" | ||
printf "\tDisk space available: ${DISK_AVAIL%.*}G\n" | ||
|
||
if [ $MEM_MEG -lt 4000 ]; then | ||
echo "Your system must have 4 or more Gigabytes of physical memory installed." | ||
if [ $MEM_MEG -lt 7000 ]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 8 GB? |
||
echo "Your system must have 7 or more Gigabytes of physical memory installed." | ||
echo "exiting now." | ||
exit 1 | ||
fi | ||
|
||
if [ $OS_VER -lt 7 ]; then | ||
echo "You must be running Centos 7 or higher to install EOSIO." | ||
echo "exiting now" | ||
echo "exiting now." | ||
exit 1 | ||
fi | ||
|
||
if [ ${DISK_AVAIL%.*} -lt $DISK_MIN ]; then | ||
echo "You must have at least ${DISK_MIN}GB of available storage to install EOSIO." | ||
echo "exiting now" | ||
echo "exiting now." | ||
exit 1 | ||
fi | ||
printf "\n\tChecking Yum installation\n" | ||
|
@@ -102,14 +105,14 @@ | |
fi | ||
printf "\tCentos devtoolset-7 successfully enabled.\n" | ||
|
||
printf "\n\tEnabling Centos python3 installation.\n" | ||
source /opt/rh/python33/enable | ||
if [ $? -ne 0 ]; then | ||
printf "\n\tUnable to enable Centos python3 at this time.\n" | ||
printf "\n\tExiting now.\n" | ||
exit 1 | ||
fi | ||
printf "\tCentos python3 successfully enabled.\n" | ||
# printf "\n\tEnabling Centos python3 installation.\n" | ||
# source /opt/rh/python33/enable | ||
# if [ $? -ne 0 ]; then | ||
# printf "\n\tUnable to enable Centos python3 at this time.\n" | ||
# printf "\n\tExiting now.\n" | ||
# exit 1 | ||
# fi | ||
# printf "\tCentos python3 successfully enabled.\n" | ||
|
||
printf "\n\tUpdating YUM repository.\n" | ||
|
||
|
@@ -176,18 +179,23 @@ | |
printf "\tInstalling CMAKE\n" | ||
mkdir -p ${HOME}/opt/ 2>/dev/null | ||
cd ${HOME}/opt | ||
curl -L -O https://cmake.org/files/v3.10/cmake-3.10.2.tar.gz | ||
STATUS=$(curl -LO -w '%{http_code}' --connect-timeout 30 https://cmake.org/files/v3.10/cmake-3.10.2.tar.gz) | ||
if [ "${STATUS}" -ne 200 ]; then | ||
printf "\tUnable to download Boost libraries at this time.\n" | ||
printf "\tExiting now.\n\n" | ||
exit; | ||
fi | ||
tar xf cmake-3.10.2.tar.gz | ||
rm -f cmake-3.10.2.tar.gz | ||
ln -s cmake-3.10.2/ cmake | ||
ln -s ${HOME}/opt/cmake-3.10.2/ cmake | ||
cd cmake | ||
./bootstrap | ||
if [ $? -ne 0 ]; then | ||
printf "\tError running bootstrap for CMAKE.\n" | ||
printf "\tExiting now.\n\n" | ||
exit; | ||
fi | ||
make | ||
make -j${JOBS} | ||
if [ $? -ne 0 ]; then | ||
printf "\tError compiling CMAKE.\n" | ||
printf "\tExiting now.\n\n" | ||
|
@@ -198,36 +206,60 @@ | |
fi | ||
|
||
printf "\n\tChecking boost library installation.\n" | ||
if [ ! -d ${HOME}/opt/boost_1_66_0 ]; then | ||
printf "\tInstalling boost libraries\n" | ||
BVERSION=`cat "${BOOST_ROOT}/include/boost/version.hpp" 2>/dev/null | grep BOOST_LIB_VERSION \ | ||
| tail -1 | tr -s ' ' | cut -d\ -f3 | sed 's/[^0-9\._]//gI'` | ||
if [ "${BVERSION}" != "1_66" ]; then | ||
printf "\tRemoving existing boost libraries in ${HOME}/opt/boost* .\n" | ||
rm -rf ${HOME}/opt/boost* | ||
if [ $? -ne 0 ]; then | ||
printf "\n\tUnable to remove deprecated boost libraries at this time.\n" | ||
printf "\n\tExiting now.\n" | ||
exit 1 | ||
fi | ||
printf "\tInstalling boost libraries.\n" | ||
cd ${TEMP_DIR} | ||
curl -L https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.bz2 > boost_1.66.0.tar.bz2 | ||
tar xf boost_1.66.0.tar.bz2 | ||
cd boost_1_66_0/ | ||
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) | ||
if [ "${STATUS}" -ne 200 ]; then | ||
printf "\tUnable to download Boost libraries at this time.\n" | ||
printf "\tExiting now.\n\n" | ||
exit; | ||
fi | ||
tar xf ${TEMP_DIR}/boost_1_66_0.tar.bz2 | ||
rm -f ${TEMP_DIR}/boost_1_66_0.tar.bz2 | ||
cd ${TEMP_DIR}/boost_1_66_0/ | ||
./bootstrap.sh "--prefix=$BOOST_ROOT" | ||
if [ $? -ne 0 ]; then | ||
printf "\n\tInstallation of boost libraries failed. 0\n" | ||
printf "\n\tExiting now.\n" | ||
exit 1 | ||
fi | ||
./b2 install | ||
if [ $? -ne 0 ]; then | ||
printf "\n\tInstallation of boost libraries failed. 1\n" | ||
printf "\n\tExiting now.\n" | ||
exit 1 | ||
fi | ||
rm -rf ${TEMP_DIR}/boost_1_66_0/ | ||
rm -f ${TEMP_DIR}/boost_1.66.0.tar.bz2 | ||
else | ||
printf "\tBoost 1.66 found at ${HOME}/opt/boost_1_66_0\n" | ||
printf "\tBoost 1.66.0 found at ${HOME}/opt/boost_1_66_0.\n" | ||
fi | ||
|
||
printf "\n\tChecking MongoDB installation.\n" | ||
if [ ! -e ${MONGOD_CONF} ]; then | ||
printf "\n\tInstalling MongoDB 3.6.3.\n" | ||
cd ${HOME}/opt | ||
curl -OL https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-amazon-3.6.3.tgz | ||
if [ $? -ne 0 ]; then | ||
STATUS=$(curl -LO -w '%{http_code}' --connect-timeout 30 https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.6.3.tgz) | ||
if [ "${STATUS}" -ne 200 ]; then | ||
printf "\tUnable to download MongoDB at this time.\n" | ||
printf "\tExiting now.\n\n" | ||
exit; | ||
fi | ||
tar xf mongodb-linux-x86_64-amazon-3.6.3.tgz | ||
rm -f mongodb-linux-x86_64-amazon-3.6.3.tgz | ||
ln -s ${HOME}/opt/mongodb-linux-x86_64-amazon-3.6.3/ ${HOME}/opt/mongodb | ||
tar xf mongodb-linux-x86_64-3.6.3.tgz | ||
rm -f mongodb-linux-x86_64-3.6.3.tgz | ||
ln -s ${HOME}/opt/mongodb-linux-x86_64-3.6.3/ mongodb | ||
mkdir ${HOME}/opt/mongodb/data | ||
mkdir ${HOME}/opt/mongodb/log | ||
touch ${HOME}/opt/mongodb/log/mongod.log | ||
touch ${HOME}/opt/mongodb/log/mongodb.log | ||
|
||
tee > /dev/null ${MONGOD_CONF} <<mongodconf | ||
systemLog: | ||
|
@@ -250,8 +282,8 @@ mongodconf | |
if [ ! -e /usr/local/lib/libmongocxx-static.a ]; then | ||
printf "\n\tInstalling MongoDB C & C++ drivers.\n" | ||
cd ${TEMP_DIR} | ||
curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/1.9.3/mongo-c-driver-1.9.3.tar.gz | ||
if [ $? -ne 0 ]; then | ||
STATUS=$(curl -LO -w '%{http_code}' --connect-timeout 30 https://github.com/mongodb/mongo-c-driver/releases/download/1.9.3/mongo-c-driver-1.9.3.tar.gz) | ||
if [ "${STATUS}" -ne 200 ]; then | ||
rm -f ${TEMP_DIR}/mongo-c-driver-1.9.3.tar.gz 2>/dev/null | ||
printf "\tUnable to download MongoDB C driver at this time.\n" | ||
printf "\tExiting now.\n\n" | ||
|
@@ -266,7 +298,7 @@ mongodconf | |
printf "\tExiting now.\n\n" | ||
exit; | ||
fi | ||
make -j${CPU_CORE} | ||
make -j${JOBS} | ||
if [ $? -ne 0 ]; then | ||
printf "\tError compiling MongoDB C driver.\n" | ||
printf "\tExiting now.\n\n" | ||
|
@@ -295,7 +327,7 @@ mongodconf | |
printf "\tExiting now.\n\n" | ||
exit; | ||
fi | ||
sudo make -j${CPU_CORE} | ||
sudo make -j${JOBS} | ||
if [ $? -ne 0 ]; then | ||
printf "\tError compiling MongoDB C++ driver.\n" | ||
printf "\tExiting now.\n\n" | ||
|
@@ -318,6 +350,11 @@ mongodconf | |
printf "\tInstalling secp256k1-zkp (Cryptonomex branch)\n" | ||
cd ${TEMP_DIR} | ||
git clone https://github.com/cryptonomex/secp256k1-zkp.git | ||
if [ $? -ne 0 ]; then | ||
printf "\tUnable to clone repo secp256k1-zkp @ https://github.com/cryptonomex/secp256k1-zkp.git.\n" | ||
printf "\tExiting now.\n\n" | ||
exit; | ||
fi | ||
cd secp256k1-zkp | ||
./autogen.sh | ||
if [ $? -ne 0 ]; then | ||
|
@@ -338,35 +375,25 @@ mongodconf | |
printf "\tsecp256k1 found\n" | ||
fi | ||
|
||
printf "\n\tChecking binaryen installation.\n" | ||
if [ ! -d ${HOME}/opt/binaryen ]; then | ||
printf "\tInstalling binaryen v1.37.14:\n" | ||
cd ${TEMP_DIR} | ||
git clone https://github.com/EOSIO/binaryen | ||
cd binaryen | ||
git checkout eosio | ||
$CMAKE . && make | ||
if [ $? -ne 0 ]; then | ||
printf "\tError compiling binaryen.\n" | ||
printf "\tExiting now.\n\n" | ||
exit; | ||
fi | ||
mkdir -p ${HOME}/opt/binaryen/ 2>/dev/null | ||
mv ${TEMP_DIR}/binaryen/bin ${HOME}/opt/binaryen/ | ||
rm -rf ${TEMP_DIR}/binaryen | ||
else | ||
printf "\tBinaryen found at ${HOME}/opt/binaryen\n" | ||
fi | ||
|
||
printf "\n\tChecking LLVM with WASM support installation.\n" | ||
if [ ! -d ${HOME}/opt/wasm/bin ]; then | ||
printf "\tInstalling LLVM & WASM\n" | ||
cd ${TEMP_DIR} | ||
mkdir llvm-compiler 2>/dev/null | ||
cd llvm-compiler | ||
git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/llvm.git | ||
if [ $? -ne 0 ]; then | ||
printf "\tUnable to clone llvm repo @ https://github.com/llvm-mirror/llvm.git.\n" | ||
printf "\tExiting now.\n\n" | ||
exit; | ||
fi | ||
cd llvm/tools | ||
git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/clang.git | ||
if [ $? -ne 0 ]; then | ||
printf "\tUnable to clone clang repo @ https://github.com/llvm-mirror/clang.git.\n" | ||
printf "\tExiting now.\n\n" | ||
exit; | ||
fi | ||
cd .. | ||
mkdir build 2>/dev/null | ||
cd build | ||
|
@@ -378,7 +405,7 @@ mongodconf | |
printf "\tExiting now.\n\n" | ||
exit; | ||
fi | ||
make -j$(nproc) | ||
make -j${JOBS} | ||
if [ $? -ne 0 ]; then | ||
printf "\tError compiling LLVM and clang with EXPERIMENTAL WASM support.\n" | ||
printf "\tExiting now.\n\n" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,8 +23,8 @@ | |
printf "\tDisk space total: ${DISK_TOTAL}G\n" | ||
printf "\tDisk space available: ${DISK_AVAIL}G\n\n" | ||
|
||
if [ $MEM_GIG -lt 8 ]; then | ||
echo "Your system must have 8 or more Gigabytes of physical memory installed." | ||
if [ $MEM_GIG -lt 7 ]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 8 GB? |
||
echo "Your system must have 7 or more Gigabytes of physical memory installed." | ||
echo "Exiting now." | ||
exit 1 | ||
fi | ||
|
@@ -172,7 +172,7 @@ | |
brew install --force pkgconfig | ||
brew unlink pkgconfig && brew link --force pkgconfig | ||
STATUS=$(curl -LO -w '%{http_code}' --connect-timeout 30 https://github.com/mongodb/mongo-c-driver/releases/download/1.9.3/mongo-c-driver-1.9.3.tar.gz) | ||
if [ $STATUS -ne 200 ]; then | ||
if [ "${STATUS}" -ne 200 ]; then | ||
rm -f ${TEMP_DIR}/mongo-c-driver-1.9.3.tar.gz | ||
printf "\tUnable to download MongoDB C driver at this time.\n" | ||
printf "\tExiting now.\n\n" | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't we settle on 8 GB of RAM during the scrum today?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gleehokie We explicitly and unquestionably decided in the presence of all that the minimum requirements for physical RAM would be 8 Gigs.
However ... my dev servers only have been 7.8 gigs of ram installed!
[bhamilton@ip-10-160-13-251 eos]$ free -m
total used free shared buff/cache available
Mem: 7821 193 5838 40 1788 7170
Swap: 0 0 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please update Docker Requirement for 7GB?