diff --git a/fetch_resource.sh b/fetch_resource.sh index 895596f..89ebe58 100755 --- a/fetch_resource.sh +++ b/fetch_resource.sh @@ -47,7 +47,7 @@ pushd "$DOWNLOAD_DIR" echo -e "${GREEN}downloading resources into $DOWNLOAD_DIR${NC}" # google test -fetch https://github.com/google/googletest/archive/refs/tags/release-1.10.0.tar.gz googletest-release-1.10.0.tar.gz +fetch https://github.com/google/googletest/archive/refs/tags/release-1.11.0.tar.gz googletest-release-1.11.0.tar.gz # zlib fetch https://github.com/madler/zlib/archive/v1.2.11.tar.gz zlib-1.2.11.tar.gz diff --git a/pack_all.sh b/pack_all.sh index 995d40c..32cb9ea 100755 --- a/pack_all.sh +++ b/pack_all.sh @@ -37,6 +37,10 @@ unpack_and_install boost unpack_and_install llvm unpack_and_install libother +# needs a soft link lib64->lib for Mac OS +pushd "$INSTALL_DIR" +ln -s lib lib64 +popd tar czf "$INSTALL_DIR.tar.gz" "$INSTALL_DIR" mkdir -p "$SRC_DIR" diff --git a/pack_boost.sh b/pack_boost.sh index 487fd27..47caae8 100755 --- a/pack_boost.sh +++ b/pack_boost.sh @@ -34,15 +34,16 @@ if [[ "${ARCH}" == "Mac" ]]; then else ./bootstrap.sh fi -./b2 link=static cxxflags=-fPIC cflags=-fPIC release install --prefix="$DEPS_PREFIX" +./b2 link=static cxxflags=-fPIC cflags=-fPIC release install --prefix="$DEPS_PREFIX" --with-regex --with-filesystem --with-date_time # TODO popd tar xzf common-1.0.0.tar.gz pushd common-1.0.0 if [[ "${ARCH}" == "Mac" ]]; then - sed -i '' 's/^#include /#include /' src/logging.cc - sed -i '' 's/syscall(__NR_gettid)/syscall(SYS_gettid)/' src/logging.cc + # 'syscall' is deprecated: first deprecated in OS X 10.12 + sed -i '' 's/^#include /#include /' src/logging.cc + sed -i '' 's/thread_id = syscall(__NR_gettid)/pthread_threadid_np(0, \&thread_id)/' src/logging.cc fi make -j"$(nproc)" INCLUDE_PATH="-Iinclude -I$DEPS_PREFIX/include" PREFIX="$DEPS_PREFIX" install diff --git a/pack_other.sh b/pack_other.sh index 8811090..5243245 100755 --- a/pack_other.sh +++ b/pack_other.sh @@ -51,9 +51,9 @@ pushd "$DEPS_SOURCE" if [ ! -f gtest_succ ]; then echo "installing gtest ...." - tar xzf googletest-release-1.10.0.tar.gz + tar xzf googletest-release-1.11.0.tar.gz - pushd googletest-release-1.10.0 + pushd googletest-release-1.11.0 cmake -H. -Bbuild -DCMAKE_INSTALL_PREFIX="$DEPS_PREFIX" -DCMAKE_CXX_FLAGS=-fPIC cmake --build build -- -j"$(nproc)" cmake --build build --target install @@ -153,16 +153,16 @@ else touch unwind_succ fi -if [ -f "gperf_tool" ]; then - echo "gperf_tool exist" +if [ -f "gperf_succ" ]; then + echo "gperf_succ exist" else tar zxf gperftools-2.5.tar.gz pushd gperftools-2.5 - ./configure --enable-cpu-profiler --enable-heap-checker --enable-heap-profiler --enable-static --prefix="$DEPS_PREFIX" + ./configure --enable-cpu-profiler --enable-heap-checker --enable-heap-profiler --prefix="$DEPS_PREFIX" --enable-shared=no make "-j$(nproc)" make install popd - touch gperf_tool + touch gperf_succ fi if [ -f "leveldb_succ" ]; then @@ -183,11 +183,11 @@ if [ -f "openssl_succ" ]; then else unzip OpenSSL_1_1_0.zip pushd openssl-OpenSSL_1_1_0 - # On MACOS, sed must use `-i extension` for saving backups with the specified extension. + # On Mac OS, sed must use `-i extension` for saving backups with the specified extension. # But we can give a zero-length extension, no backup will be saved. sed -i'' -e 's#qw/glob#qw/:glob#' Configure sed -i'' -e 's#qw/glob#qw/:glob#' test/build.info - ./config --prefix="$DEPS_PREFIX" --openssldir="$DEPS_PREFIX" + ./config --prefix="$DEPS_PREFIX" --openssldir="$DEPS_PREFIX" no-shared make "-j$(nproc)" make install rm -rf "$DEPS_PREFIX"/lib/libssl.so* @@ -290,11 +290,11 @@ fi tar -zxf apache-zookeeper-3.4.14.tar.gz pushd zookeeper-3.4.14/zookeeper-client/zookeeper-client-c if [[ "$ARCH" == "Mac" ]]; then - CC="clang" CFLAGS="$CFLAGS" ./configure --prefix="$DEPS_PREFIX" + CC="clang" CFLAGS="$CFLAGS" ./configure --prefix="$DEPS_PREFIX" --enable-shared=no else autoreconf -if # see https://issues.apache.org/jira/browse/ZOOKEEPER-3293 - CFLAGS="$CFLAGS -Wno-error=format-overflow=" ./configure --prefix="$DEPS_PREFIX" + CFLAGS="$CFLAGS -Wno-error=format-overflow=" ./configure --prefix="$DEPS_PREFIX" --enable-shared=no fi make -j"$(nproc)"