未验证 提交 e2c4c50b 编写于 作者: K Kevin Heifner 提交者: GitHub

Merge pull request #1797 from pacificcode/eosio_build_darwin_bulletproof

Eosio build darwin libtool conflict addressed
......@@ -63,28 +63,28 @@
case $OS_NAME in
"Amazon Linux AMI")
FILE=${WORK_DIR}/scripts/eosio_build_amazon.sh
export CMAKE=${HOME}/opt/cmake/bin/cmake
CXX_COMPILER=g++
C_COMPILER=gcc
export LLVM_DIR=${HOME}/opt/wasm/lib/cmake/llvm
MONGOD_CONF=${HOME}/opt/mongodb/mongod.conf
export LLVM_DIR=${HOME}/opt/wasm/lib/cmake/llvm
export CMAKE=${HOME}/opt/cmake/bin/cmake
export PATH=${HOME}/opt/mongodb/bin:$PATH
;;
"CentOS Linux")
FILE=${WORK_DIR}/scripts/eosio_build_centos.sh
export CMAKE=${HOME}/opt/cmake/bin/cmake
CXX_COMPILER=g++
C_COMPILER=gcc
export LLVM_DIR=${HOME}/opt/wasm/lib/cmake/llvm
MONGOD_CONF=${HOME}/opt/mongodb/mongod.conf
export LLVM_DIR=${HOME}/opt/wasm/lib/cmake/llvm
export CMAKE=${HOME}/opt/cmake/bin/cmake
export PATH=${HOME}/opt/mongodb/bin:$PATH
;;
"Fedora")
FILE=${WORK_DIR}/scripts/eosio_build_fedora.sh
CXX_COMPILER=g++
C_COMPILER=gcc
export LLVM_DIR=${HOME}/opt/wasm/lib/cmake/llvm
MONGOD_CONF=/etc/mongod.conf
export LLVM_DIR=${HOME}/opt/wasm/lib/cmake/llvm
;;
"Linux Mint")
FILE=${WORK_DIR}/scripts/eosio_build_ubuntu.sh
......@@ -107,21 +107,20 @@
export OPENSSL_ROOT_DIR=/usr/include/openssl
export OPENSSL_LIBRARIES=/usr/include/openssl
export WASM_ROOT=${HOME}/opt/wasm
. $FILE
fi
if [ $ARCH == "Darwin" ]; then
OPENSSL_ROOT_DIR=/usr/local/opt/openssl
OPENSSL_LIBRARIES=/usr/local/opt/openssl/lib
export WASM_ROOT=/usr/local/wasm
FILE=${WORK_DIR}/scripts/eosio_build_darwin.sh
CXX_COMPILER=clang++
C_COMPILER=clang
MONGOD_CONF=/usr/local/etc/mongod.conf
. scripts/eosio_build_darwin.sh
OPENSSL_ROOT_DIR=/usr/local/opt/openssl
OPENSSL_LIBRARIES=/usr/local/opt/openssl/lib
export WASM_ROOT=/usr/local/wasm
fi
. $FILE
printf "\n\n>>>>>>>> ALL dependencies sucessfully found or installed . Installing EOS.IO\n\n"
COMPILE_EOS=1
......@@ -146,7 +145,7 @@
exit -1
fi
make -j${CPU_CORE} VERBOSE=0
make -j${CPU_CORE}
if [ $? -ne 0 ]; then
printf "\n\t>>>>>>>>>>>>>>>>>>>> MAKE building EOSIO has exited with the above error.\n\n"
......@@ -171,8 +170,6 @@
printf "\n\tMongoDB is running PID=${MONGODB_PID}.\n"
fi
make test
if [ "x${EOSIO_BUILD_PACKAGE}" != "x" ]; then
# Build eos.io package
$CMAKE -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_COMPILER=${CXX_COMPILER} \
......
......@@ -41,132 +41,108 @@
exit 1
fi
process_dep()
{
printf "\tChecking XCode installation\n"
XCODESELECT=$(which xcode-select)
if [ $? -ne 0 ]; then
printf "\n\tXCode must be installed in order to proceed.\n\n"
printf "\texiting now.\n"
exit 1
fi
printf "\tChecking XCode installation\n"
XCODESELECT=$(which xcode-select)
if [ $? -ne 0 ]; then
printf "\n\tXCode must be installed in order to proceed.\n\n"
printf "\texiting now.\n"
exit 1
fi
printf "\tXCode installation found.\n\n"
printf "\tChecking Ruby installation\n"
RUBY=$(which ruby)
if [ $? -ne 0 ]; then
printf "\nRuby must be installed in order to proceed.\n\n"
printf "\texiting now.\n"
exit 1
fi
printf "\tXCode installation found.\n\n"
printf "\tRuby installation found.\n\n"
printf "\tChecking Home Brew installation\n"
BREW=$(which brew)
if [ $? -ne 0 ]; then
printf "\tHomebrew must be installed to compile EOS.IO\n\n"
printf "\tDo you wish to install Home Brew?\n"
select yn in "Yes" "No"; do
case $yn in
[Yy]* )
$XCODESELECT --install 2>/dev/null;
$RUBY -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
if [ $? -ne 0 ]; then
echo "Unable to install homebrew at this time. Exiting now."
exit 0;
fi
break;;
[Nn]* ) echo "User aborted homebrew installation. Exiting now.";
exit;;
* ) echo "Please enter 1 for yes or 2 for no.";;
esac
done
fi
printf "\tChecking Ruby installation\n"
RUBY=$(which ruby)
if [ $? -ne 0 ]; then
printf "\nRuby must be installed in order to proceed.\n\n"
printf "\texiting now.\n"
exit 1
fi
printf "\tHome Brew installation found.\n\n"
DCOUNT=0
COUNT=1
PERMISSION_GETTEXT=0
DISPLAY=""
DEP=""
printf "\tRuby installation found.\n\n"
printf "\tChecking dependencies.\n"
for line in `cat ${WORK_DIR}/scripts/eosio_build_dep`; do
pkg=$( echo "${line}" | cut -d',' -f1 )
printf "\tChecking $pkg ... "
BIN=$(which $pkg)
if [ $? -eq 0 ]; then
if [ $pkg == "libtool" ] && [ $BIN == /usr/bin/libtool ]; then
donothing=true
else
printf "\t$pkg found\n"
continue
fi
fi
LIB=$( ls -l /usr/local/lib/lib${pkg}* 2>/dev/null | wc -l)
if [ ${LIB} -ne 0 ]; then
printf "\t$pkg found\n"
continue
else
let DCOUNT++
if [ $pkg = "mongod" ]; then
pkg="mongodb"
fi
if [ $pkg = "LLVM" ]; then
pkg="llvm@4"
printf "\tChecking Home Brew installation\n"
BREW=$(which brew)
if [ $? -ne 0 ]; then
printf "\tHomebrew must be installed to compile EOS.IO\n\n"
printf "\tDo you wish to install Home Brew?\n"
select yn in "Yes" "No"; do
case $yn in
[Yy]* )
$XCODESELECT --install 2>/dev/null;
$RUBY -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
if [ $? -ne 0 ]; then
echo "Unable to install homebrew at this time. Exiting now."
exit 0;
fi
break;;
[Nn]* ) echo "User aborted homebrew installation. Exiting now.";
exit;;
* ) echo "Please enter 1 for yes or 2 for no.";;
esac
done
fi
# if [ $pkg = "openssl" ]; then
# pkg="openssl@1.0"
# fi
printf "\tHome Brew installation found.\n\n"
DCOUNT=0
COUNT=1
PERMISSION_GETTEXT=0
DISPLAY=""
DEP=""
if [ $pkg = "gettext" ]; then
PERMISSION_GETTEXT=1
fi
DEP=$DEP" ${pkg} "
DISPLAY="${DISPLAY}${COUNT}. ${pkg}\n\t"
printf "\tPackage ${pkg} ${bldred}NOT${txtrst} found.\n"
let COUNT++
printf "\tChecking dependencies.\n"
var_ifs=${IFS}
IFS=','
while read -r name tester testee brewname uri
do
printf "\tChecking $name ... "
if [ ${tester} ${testee} ]; then
printf '\t\t %s found\n' "$name"
continue
fi
# resolve conflict with homebrew glibtool and apples install of libtool
if [ ${testee} == "/usr/local/bin/glibtool" ]; then
if [ ${tester} "/usr/local/bin/libtool" ]; then
printf '\t\t %s found\n' "$name"
continue
fi
done
if [ $DCOUNT -ne 0 ]; then
printf "\n\tThe following dependencies are required to install EOSIO.\n"
printf "\n\t$DISPLAY\n\n"
echo "Do you wish to install these packages?"
select yn in "Yes" "No"; do
case $yn in
[Yy]* )
if [ $PERMISSION_GETTEXT -eq 1 ]; then
sudo chown -R $(whoami) /usr/local/share
fi
$XCODESELECT --install 2>/dev/null;
printf "\tUpdating Home Brew.\n"
brew update
printf "\tInstalling Dependencies.\n"
brew install --force $DEP
brew unlink $DEP && brew link --force $DEP
break;;
[Nn]* ) echo "User aborting installation of required dependencies, Exiting now."; exit;;
* ) echo "Please type 1 for yes or 2 for no.";;
esac
done
else
printf "\n\tNo required Home Brew dependencies to install.\n"
fi
return 0
}
process_dep
let DCOUNT++
if [ $brewname = "gettext" ]; then
PERMISSION_GETTEXT=1
fi
DEP=$DEP"${brewname} "
DISPLAY="${DISPLAY}${COUNT}. ${name}\n\t"
printf "\t\t ${name} ${bldred}NOT${txtrst} found.\n"
let COUNT++
done < scripts/eosio_build_dep
IFS=${var_ifs}
if [ $DCOUNT -ne 0 ]; then
printf "\n\tThe following dependencies are required to install EOSIO.\n"
printf "\n\t$DISPLAY\n\n"
echo "Do you wish to install these packages?"
select yn in "Yes" "No"; do
case $yn in
[Yy]* )
if [ $PERMISSION_GETTEXT -eq 1 ]; then
sudo chown -R $(whoami) /usr/local/share
fi
$XCODESELECT --install 2>/dev/null;
printf "\tUpdating Home Brew.\n"
brew update
printf "\tInstalling Dependencies.\n"
brew install --force $DEP
brew unlink $DEP && brew link --force $DEP
break;;
[Nn]* ) echo "User aborting installation of required dependencies, Exiting now."; exit;;
* ) echo "Please type 1 for yes or 2 for no.";;
esac
done
else
printf "\n\tNo required Home Brew dependencies to install.\n"
fi
printf "\n\tChecking for MongoDB C++ driver\n"
# install libmongocxx.dylib
if [ ! -e /usr/local/lib/libmongocxx.dylib ]; then
......@@ -284,4 +260,4 @@
sudo rm -rf ${TEMP_DIR}/wasm-compiler
else
printf "\tWASM found at /usr/local/wasm/bin/\n"
fi
fi
\ No newline at end of file
automake,http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
libtool,http://gnu.askapache.com/libtool/libtool-2.4.6.tar.gz
openssl,https://www.openssl.org/source/openssl-1.0.2n.tar.gz
LLVM,http://releases.llvm.org/5.0.1/llvm-5.0.1.src.tar.xz
wget,https://ftp.gnu.org/gnu/wget/wget-1.19.2.tar.gz
cmake,https://cmake.org/files/v3.10/cmake-3.10.1-Darwin-x86_64.tar.gz
boost,https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz
gmp,https://ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.bz2
gettext,https://ftp.gnu.org/pub/gnu/gettext/gettext-latest.tar.gz
mongod,https://fastdl.mongodb.org/osx/mongodb-osx-ssl-x86_64-3.6.3.tgz
\ No newline at end of file
automake,-x,/usr/local/bin/automake,automake,http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
Libtool,-x,/usr/local/bin/glibtool,libtool,http://gnu.askapache.com/libtool/libtool-2.4.6.tar.gz
OpenSSL,-f,/usr/local/opt/openssl/lib/libssl.a,openssl,https://www.openssl.org/source/openssl-1.0.2n.tar.gz
llvm,-x,/usr/local/opt/llvm@4/bin/clang-4.0,llvm@4,http://releases.llvm.org/5.0.1/llvm-5.0.1.src.tar.xz
wget,-x,/usr/local/bin/wget,wget,https://ftp.gnu.org/gnu/wget/wget-1.19.2.tar.gz
CMake,-x,/usr/local/bin/cmake,cmake,https://cmake.org/files/v3.10/cmake-3.10.1-Darwin-x86_64.tar.gz
Boost,-f,/usr/local/opt/boost/include/boost/version.hpp,boost,https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz
GMP,-f,/usr/local/opt/gmp/include/gmpxx.h,gmp,https://ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.bz2
gettext,-x,/usr/local/opt/gettext/bin/gettext,gettext,https://ftp.gnu.org/pub/gnu/gettext/gettext-latest.tar.gz
MongoDB,-x,/usr/local/opt/mongodb/bin/mongod,mongodb,https://fastdl.mongodb.org/osx/mongodb-osx-ssl-x86_64-3.6.3.tgz
Doxygen,-x,/usr/local/bin/doxygen,doxygen,http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.14.src.tar.gz
Graphviz,-x,/usr/local/bin/dot,graphviz,https://graphviz.gitlab.io/pub/graphviz/stable/SOURCES/graphviz.tar.gz
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册