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

ARROW-68: Better error handling for not fully setup systems #27

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cpp/setup_build_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

SOURCE_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)

./thirdparty/download_thirdparty.sh
./thirdparty/build_thirdparty.sh
./thirdparty/download_thirdparty.sh || { echo "download_thirdparty.sh failed" ; return; }
./thirdparty/build_thirdparty.sh || { echo "build_thirdparty.sh failed" ; return; }
source thirdparty/versions.sh

export GTEST_HOME=$SOURCE_DIR/thirdparty/$GTEST_BASEDIR
Expand Down
9 changes: 6 additions & 3 deletions cpp/thirdparty/build_thirdparty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,21 @@ ln -sf lib "$PREFIX/lib64"
# use the compiled tools
export PATH=$PREFIX/bin:$PATH

type cmake >/dev/null 2>&1 || { echo >&2 "cmake not installed. Aborting."; exit 1; }
type make >/dev/null 2>&1 || { echo >&2 "make not installed. Aborting."; exit 1; }

# build googletest
GOOGLETEST_ERROR="failed for googletest!"
if [ -n "$F_ALL" -o -n "$F_GTEST" ]; then
cd $TP_DIR/$GTEST_BASEDIR

if [[ "$OSTYPE" == "darwin"* ]]; then
CXXFLAGS=-fPIC cmake -DCMAKE_CXX_FLAGS="-std=c++11 -stdlib=libc++ -DGTEST_USE_OWN_TR1_TUPLE=1 -Wno-unused-value -Wno-ignored-attributes"
CXXFLAGS=-fPIC cmake -DCMAKE_CXX_FLAGS="-std=c++11 -stdlib=libc++ -DGTEST_USE_OWN_TR1_TUPLE=1 -Wno-unused-value -Wno-ignored-attributes" || { echo "cmake $GOOGLETEST_ERROR" ; exit 1; }
else
CXXFLAGS=-fPIC cmake .
CXXFLAGS=-fPIC cmake . || { echo "cmake $GOOGLETEST_ERROR"; exit 1; }
fi

make VERBOSE=1
make VERBOSE=1 || { echo "Make $GOOGLETEST_ERROR" ; exit 1; }
fi

echo "---------------------"
Expand Down
1 change: 1 addition & 0 deletions cpp/thirdparty/download_thirdparty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ TP_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
source $TP_DIR/versions.sh

download_extract_and_cleanup() {
type curl >/dev/null 2>&1 || { echo >&2 "curl not installed. Aborting."; exit 1; }
filename=$TP_DIR/$(basename "$1")
curl -#LC - "$1" -o $filename
tar xzf $filename -C $TP_DIR
Expand Down