Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

System Setup

Matt Butrovich edited this page Sep 8, 2020 · 22 revisions

Supported Platforms

  • Ubuntu 18.04 (LTS)
  • macOS 10.14+

If you are not running natively on one of the above supported platforms:

  1. If you wish to do development on Terrier, the recommended approach is to use a VM running one of the supported OSes.
  2. If you merely wish to run Terrier, Docker may be used instead of a VM.
  3. If you are on Windows, CLion has support for WSL2. This requires your version of Windows to have Hyper-V support (at the time of writing, this means Windows Pro, Enterprise, or Education). You can obtain Windows Education from Carnegie Mellon. Older versions of CLion had support for WSL1, if you are able to find those. Remember that Docker remains an option.

Toolchain

  • C++17-enabled compiler (GCC 7.0+ or Clang 8.0+) -- note that AppleClang is currently not supported. Apple macOS users should override their C and C++ compilers to be the binaries bundled with LLVM (a dependency installed via Homebrew).
  • CMake 3.2+
  • LLVM 8.0+

IDE

We highly recommend using CLion for developing on the Terrier project. It has native support for CMake, clang-tidy, clang-format, GDB/LLDB, and Google Test, all of which we rely on for development. It will work out of the box, but see our wiki page about CLion for the best configuration settings for Terrier.

Ubuntu Setup

  1. Clone the Terrier repository:

    git clone --recursive https://github.com/cmu-db/terrier.git
  2. Install the package dependencies:

    cd terrier/script/installation
    sudo bash packages.sh
  3. Proceed to Building Terrier.

macOS Setup

  1. Clone the Terrier repository:

    git clone --recursive https://github.com/cmu-db/terrier.git
  2. Install the package dependencies:

    cd terrier/script/installation
    bash packages.sh

    If you encounter permissions issues, run brew doctor and follow the instructions.

  3. Define environment variables:

macOS requires some environment variables to be defined to build Terrier. You can define these in your shell if you only work at the command line, but it's generally better to set them with launchctl at login so all applications (read: CLion) see these environment variables. The easiest way to accomplish this is with Automator.

  • Launch Automator and create a new Application.
  • In the list of Actions, select Run Shell Script.
  • Define the script as follows, and then save your application anywhere you'd like:
launchctl setenv LLVM_DIR /usr/local/Cellar/llvm@8/8.0.1_3
launchctl setenv ASAN_OPTIONS detect_container_overflow=0
  • Go to System Preferences > Users & Groups > Login Items and add your newly created application to run at login. After logging into your system, the LLVM_DIR and ASAN_OPTIONS environment variables will now be defined for all launched applications.
  1. Proceed to Building Terrier.