Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2d809b32aa1a
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 380dfa10d826
Choose a head ref
  • 9 commits
  • 1 file changed
  • 2 contributors

Commits on Apr 10, 2020

  1. Add zfp to install_deps.sh

    Alex Wang committed Apr 10, 2020
    Copy the full SHA
    2820779 View commit details
  2. Fix zfp.h include

    zfp.h is located at include/zfp.h, not include/zfp/zfp.h.
    Alex Wang committed Apr 10, 2020
    Copy the full SHA
    3c8dad0 View commit details
  3. Use zfp fork instead of LLNL's repo

    Alex Wang committed Apr 10, 2020
    Copy the full SHA
    ba56718 View commit details
  4. Don't unconditionally delete the zfp build dir

    Try to avoid unnecessary recompiles on subsequent runs of
    install_deps.sh
    Alex Wang committed Apr 10, 2020
    Copy the full SHA
    7601ac7 View commit details
  5. Revert "Fix zfp.h include"

    This reverts commit 3c8dad0.
    
    The #include was correct. zfp/zfp.h was added in Principia's fork of
    zfp, so fixing the clone solves the problem.
    Alex Wang committed Apr 10, 2020
    Copy the full SHA
    53d3588 View commit details
  6. Disable building ZFP with OpenMP

    Match flags used in build pipeline
    Alex Wang committed Apr 10, 2020
    Copy the full SHA
    b67cba5 View commit details

Commits on Apr 12, 2020

  1. Update install_deps.sh

    Rewrite to work with principia_make.sh in dependency repositories.
    General structure given by egg at [0].
    
    [0]: #2523 (review)
    Alex Wang committed Apr 12, 2020
    Copy the full SHA
    2b44279 View commit details
  2. Add some comments.

    eggrobin authored Apr 12, 2020
    Copy the full SHA
    381d4e2 View commit details
  3. Merge pull request #2523 from ts826848/zfp-on-macOS

    Update install_deps.sh to use principia_make.sh from dependencies
    eggrobin authored Apr 12, 2020
    Copy the full SHA
    380dfa1 View commit details
Showing with 60 additions and 84 deletions.
  1. +60 −84 install_deps.sh
144 changes: 60 additions & 84 deletions install_deps.sh
Original file line number Diff line number Diff line change
@@ -6,89 +6,73 @@ echo "Required runtime dependencies: libc++1"

#sudo apt-get install clang git unzip wget libc++-dev binutils make automake libtool curl cmake subversion

BASE_FLAGS="-fPIC -O3 -g -DNDEBUG"
# determine platform for bitness

PLATFORM=$(uname -s)
if [ "$PLATFORM" == "Darwin" ]; then
C_FLAGS="$BASE_FLAGS -mmacosx-version-min=10.11 -arch x86_64"
elif [ "$PLATFORM" == "Linux" ]; then
BITNESS=$(uname -m)
if [ "$BITNESS" == "x86_64" ]; then
C_FLAGS="$BASE_FLAGS -m64"
else
C_FLAGS="$BASE_FLAGS -m32"
fi
else
C_FLAGS="$BASE_FLAGS"
fi

LD_FLAGS="$C_FLAGS -stdlib=libc++"
CXX_FLAGS="-std=c++14 $LD_FLAGS"

mkdir -p deps
cd deps
pushd deps

if [ ! -d "protobuf" ]; then
git clone "https://github.com/mockingbirdnest/protobuf"
fi
pushd protobuf
git checkout master
git pull
./autogen.sh
if [ "$PLATFORM" == "Linux" ]; then
./autogen.sh # Really definitely needs to run twice on Ubuntu for some reason.
fi
./configure CC=clang CXX=clang++ CXXFLAGS="$CXX_FLAGS" LDFLAGS="$LD_FLAGS" LIBS="-lc++ -lc++abi"
make -j8
popd
for repo in protobuf glog googletest gipfeli abseil-cpp compatibility benchmark zfp; do
if [ ! -d "$repo" ]; then
git clone "https://github.com/mockingbirdnest/$repo.git"
fi
pushd "$repo"
git checkout master
git pull

# Azure pipelines define this variable for us.
AGENT_OS=$(uname -s)

if [ ! -d "glog" ]; then
git clone "https://github.com/mockingbirdnest/glog"
fi
pushd glog
git checkout master
git pull
./autogen.sh
./configure CC=clang CXX=clang++ CFLAGS="$C_FLAGS" CXXFLAGS="$CXX_FLAGS" LDFLAGS="$LD_FLAGS" LIBS="-lc++ -lc++abi"
make -j8
popd
# Pipeline variables.
# Any changes made to the variables defined in this section must be reflected
# in the variable group
# https://dev.azure.com/mockingbirdnest/Principia/_library?itemType=VariableGroups&view=VariableGroupView&variableGroupId=1&path=Principia
# and vice-versa.
# Note that the Principia Makefile doesn't get these variables; flags are duplicated
# there.
PRINCIPIA_C_FLAGS="-fPIC -O3 -g -DNDEBUG"
PRINCIPIA_CXX_FLAGS="-std=c++17"
PRINCIPIA_LD_FLAGS="-stdlib=libc++"
# NOTE(egg): We need Clang 8, and therefore we use Xcode 11. The libc++ provided by
# Xcode 11 has the <filesystem> header, however its symbols are marked unavailable
# unless macosx-version-min is at least 10.15 (Catalina). Since we do not want to
# require that version yet (quousque tandem?), we cannot use the libc++ filesystem.
# Instead we inject our own (https://github.com/mockingbirdnest/Compatibility), and we
# prevent libc++ from defining and relying on its own, by setting _LIBCPP_STD_VER.
# However, if we set that to 14, we would be missing void_t and the variable templates
# from <type_traits>, which are C++17 additions on which we heavily rely.
# Luckily, the <type_traits> definitions are gated on _LIBCPP_STD_VER > 14, while the
# <filesystem> usage is gated on _LIBCPP_STD_VER >= 17. We can therefore get the
# former without the latter by setting _LIBCPP_STD_VER to 16 ∈ ]14, 17[.
PRINCIPIA_MACOS_CXX_FLAGS="-D_LIBCPP_STD_VER=16"
PRINCIPIA_MACOS_VERSION_MIN="10.12"
# End pipeline variables.

# googlemock/googletest don't need to be compiled
if [ ! -d "googletest" ]; then
git clone "https://github.com/mockingbirdnest/googletest"
fi
pushd googletest
git checkout master
git pull
popd
# Task group Make.
# Any changes to this section must be reflected in the script for the task group Make,
# https://dev.azure.com/mockingbirdnest/Principia/_taskgroup/7ac7ecad-ff96-4796-9870-36aa93f5bacf,
# and vice-versa.
if [ -f ./principia_variable_overrides.sh ]; then
. ./principia_variable_overrides.sh
fi

if [ ! -d "gipfeli" ]; then
git clone "https://github.com/mockingbirdnest/gipfeli"
fi
pushd gipfeli
git checkout master
git pull
make
popd
if [ "${AGENT_OS?}" == "Darwin" ]; then
C_FLAGS="${PRINCIPIA_C_FLAGS?} -mmacosx-version-min=${PRINCIPIA_MACOS_VERSION_MIN?} -arch x86_64"
CXX_FLAGS="${PRINCIPIA_CXX_FLAGS?} ${PRINCIPIA_MACOS_CXX_FLAGS?}"
elif [ "${AGENT_OS?}" == "Linux" ]; then
C_FLAGS="${PRINCIPIA_C_FLAGS?} -m64"
CXX_FLAGS="${PRINCIPIA_CXX_FLAGS?}"
else
C_FLAGS="${PRINCIPIA_C_FLAGS?}"
CXX_FLAGS="${PRINCIPIA_CXX_FLAGS?}"
fi
LD_FLAGS="${C_FLAGS?} ${PRINCIPIA_LD_FLAGS?}"
CXX_FLAGS="${CXX_FLAGS?} ${LD_FLAGS?}"

if [ ! -d "abseil-cpp" ]; then
git clone "https://github.com/mockingbirdnest/abseil-cpp"
fi
pushd abseil-cpp
git checkout master
git pull
cmake -DCMAKE_C_COMPILER:FILEPATH=`which clang` -DCMAKE_CXX_COMPILER:FILEPATH=`which clang++` -DCMAKE_C_FLAGS="${C_FLAGS}" -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DCMAKE_LD_FLAGS="${LD_FLAGS}" -DBUILD_TESTING=OFF
make -j8
popd
if [ -f ./principia_make.sh ]; then
. ./principia_make.sh
fi
# End task group Make.

if [ ! -d "compatibility" ]; then
git clone "https://github.com/mockingbirdnest/compatibility"
fi
pushd compatibility
git checkout master
git pull
popd
popd
done

if [ ! -d "Optional" ]; then
mkdir Optional
@@ -98,12 +82,4 @@ curl "https://raw.githubusercontent.com/llvm-mirror/libcxx/52f9ca28a39aa02a2e78f
touch __undef_macros
popd

if [ ! -d "benchmark" ]; then
git clone "https://github.com/mockingbirdnest/benchmark"
fi
pushd benchmark
git checkout master
git pull
cmake -DCMAKE_C_COMPILER:FILEPATH=`which clang` -DCMAKE_CXX_COMPILER:FILEPATH=`which clang++` -DCMAKE_C_FLAGS="${C_FLAGS}" -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DCMAKE_LD_FLAGS="${LD_FLAGS}" -DBENCHMARK_ENABLE_GTEST_TESTS=OFF
make -j8
popd