cd ~/src
git clone [email protected]:trailofbits/cxx-common.git
The repository path is where all the dependencies will be installed. By default,
we use /opt/trailofbits/libraries
. The only requirements on the repository path
is that it be writeable, and that it points to a folder named libraries
.
NOTE: The naming of this environment variable is significant.
export TRAILOFBITS_LIBRARIES=/opt/trailofbits/libraries
The next step installs a modern version of CMake for bootstrapping the rest of the process.
cd cxx-common
python ./pkgman.py --repository_path=${TRAILOFBITS_LIBRARIES} --packages=cmake
export PATH="${TRAILOFBITS_LIBRARIES}/cmake/bin:${PATH}"
Now we build the remaining dependencies. We specify LLVM version 900
to mean 9.0.0
.
We also specify that we'll be excluding libc++ from the build.
python ./pkgman.py \
--llvm_version=900 \
--repository_path=${TRAILOFBITS_LIBRARIES} \
--packages=llvm,capstone,google,xed \
--exclude_libcxx
cd ~/src
git clone [email protected]:lifting-bits/remill.git
For example, Anvill:
cd remill/tools
git clone [email protected]:lifting-bits/anvill.git
cd ~/build
mkdir remill-build
cd remill-build
${TRAILOFBITS_LIBRARIES}/cmake/bin/cmake \
-DCMAKE_BC_COMPILER=${TRAILOFBITS_LIBRARIES}/llvm/bin/clang++ \
-DCMAKE_VERBOSE_MAKEFILE=True \
~/src/remill
make -j8
If you're using macOS, then also supply the following argument to CMake: -DCMAKE_OSX_SYSROOT=$(xcrun -sdk macosx --show-sdk-path)
.
Hi, pgoodman
When installing CMake with
pkgman.py
, there were some problem shown below.I tried
gcc-7
orgcc-8
, but it didn't help.