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 Nov 14, 2019 · 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. CLion's Full Remote Mode allows you to have CLion running on your native OS, but compiling, executing and debugging will happen on Docker (or any remote ssh-accessible Linux host). // TODO(wanshenl) <-- ping me if you need to fight Docker to do this

Toolchain

  • C++17-enabled compiler (GCC 7.0+ or Apple Clang 10.0+)
  • 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. Command Line Tools: Download Command Line Tools for your system from Apple (login required). The latest confirmed working version is Command Line Tools for Xcode 9.4.

  2. Clone the Terrier repository:

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

    cd terrier/script/installation
    bash packages.sh

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

  4. 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_1
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.