Build Instructions

Joseph Noir edited this page May 30, 2018 · 4 revisions

VAST needs a recent compiler that supports C++17. Most systems do not come with a recent GCC or Clang out of the box. We had success with the following steps.

macOS

Clang

Even though macOS ships with Clang, it is not recent enough. Homebrew makes it easy to install LLVM 7:

brew install llvm

Then, make sure to build VAST with the new compiler:

export CXX=/usr/local/opt/llvm/bin/clang++
export LDFLAGS=$(/usr/local/opt/llvm/bin/llvm-config --ldflags)
./configure

GCC

Install GCC via Homebrew:

brew install gcc

Then select g++ via the CXX environment variable for the build setup:

export CXX=g++-7
./configure 

Linux

Clang

  • Build LLVM and Clang manually with the following script
#!/bin/bash

CLANG_HOME=/opt/src/clang # clang build dir
VERSION=tags/RELEASE_600/final  # version to use, default was trunk

cd $CLANG_HOME
svn co http://llvm.org/svn/llvm-project/llvm/$VERSION llvm

cd $CLANG_HOME/llvm/tools
svn co http://llvm.org/svn/llvm-project/cfe/$VERSION clang

cd $CLANG_HOME/llvm/tools/clang/tools
svn co http://llvm.org/svn/llvm-project/clang-tools-extra/$VERSION extra

cd $CLANG_HOME/llvm/tools
svn co http://llvm.org/svn/llvm-project/lld/$VERSION lld
svn co http://llvm.org/svn/llvm-project/polly/$VERSION polly

cd $CLANG_HOME/llvm/projects
svn co http://llvm.org/svn/llvm-project/compiler-rt/$VERSION compiler-rt
svn co http://llvm.org/svn/llvm-project/libcxx/$VERSION libcxx
svn co http://llvm.org/svn/llvm-project/libcxxabi/$VERSION libcxxabi
svn co http://llvm.org/svn/llvm-project/test-suite/$VERSION test-suite

cd $CLANG_HOME
mkdir build
cd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ../llvm
make -j 24
make install
  • Build VAST with that clang compiler installed to /usr/local/ (note the extra argument -lc++abi to LDFLAGS):

    export CXX=/usr/local/bin/clang++
    export LDFLAGS="$(/usr/local/bin/llvm-config --ldflags) -lc++abi"
    ./configure
    
  • Remember to build CAF in the same way, otherwise linking VAST fails

GCC

TODO

FreeBSD

TODO

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.