From 0a541eafaf211c1c67c3a4ecbc737792996c6d22 Mon Sep 17 00:00:00 2001 From: Alessandro Gario <5714290+alessandrogario@users.noreply.github.com> Date: Thu, 1 Apr 2021 21:38:55 +0200 Subject: [PATCH] libs: Build against the correct anvill version (#745) --- .github/workflows/vcpkg_ci.yml | 6 ++++-- Dockerfile | 3 ++- README.md | 7 +++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/vcpkg_ci.yml b/.github/workflows/vcpkg_ci.yml index 12d497543..25ba96aff 100644 --- a/.github/workflows/vcpkg_ci.yml +++ b/.github/workflows/vcpkg_ci.yml @@ -50,7 +50,8 @@ jobs: shell: bash run: | # Change to master after testing - git clone --depth=1 --branch master https://github.com/lifting-bits/anvill.git + git clone --branch master https://github.com/lifting-bits/anvill.git + ( cd anvill && git checkout -b release_bc3183b bc3183b ) mkdir -p anvill/build && cd anvill/build cmake -DCMAKE_VERBOSE_MAKEFILE=ON .. cmake --build . --target install -- -j "$(nproc)" @@ -97,7 +98,8 @@ jobs: shell: bash run: | # Change to master after testing - git clone --depth=1 --branch master https://github.com/lifting-bits/anvill.git + git clone --branch master https://github.com/lifting-bits/anvill.git + ( cd anvill && git checkout -b release_bc3183b bc3183b ) mkdir -p anvill/build && cd anvill/build cmake -DCMAKE_VERBOSE_MAKEFILE=ON .. cmake --build . --target install -- -j "$(sysctl -n hw.logicalcpu)" diff --git a/Dockerfile b/Dockerfile index 5bff01984..f711d3825 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,7 +43,8 @@ RUN git clone --depth=1 --branch master https://github.com/lifting-bits/remill.g RUN cd remill && \ cmake --build remill-build --target install -- -j "$(nproc)" && \ cd ../ && \ - git clone --depth=1 --branch master https://github.com/lifting-bits/anvill.git && \ + git clone --branch master https://github.com/lifting-bits/anvill.git && \ + ( cd anvill && git checkout -b release_bc3183b bc3183b ) && \ mkdir -p anvill/build && cd anvill/build && \ cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=${LIBRARIES} -Dremill_DIR=${LIBRARIES}/lib/cmake/remill -DVCPKG_ROOT=/tmp/vcpkg_ubuntu-${UBUNTU_VERSION}_llvm-${LLVM_VERSION}_${ARCH} .. && \ cmake --build . --target install -- -j "$(nproc)" diff --git a/README.md b/README.md index bc2188c66..7cc0521b7 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Why would anyone translate binaries *back* to bitcode? | [Git](https://git-scm.com/) | Latest | | [CMake](https://cmake.org/) | 3.2+ | | [Remill](https://github.com/lifting-bits/remill) | Latest | -| [Anvill](https://github.com/lifting-bits/anvill) | Latest | +| [Anvill](https://github.com/lifting-bits/anvill) | bc3183b | | [Python](https://www.python.org/) | 3.8 | | [Python Package Index](https://pypi.python.org/pypi) | Latest | | [python-protobuf](https://pypi.python.org/pypi/protobuf) | 3.2.0 | @@ -188,9 +188,12 @@ source bin/activate ```shell git clone --depth 1 --single-branch --branch master https://github.com/lifting-bits/remill.git -git clone --depth 1 --single-branch --branch master https://github.com/lifting-bits/anvill.git git clone --depth 1 --single-branch --branch master https://github.com/lifting-bits/mcsema.git +# Get a compatible anvill version +git clone --branch master https://github.com/lifting-bits/anvill.git +( cd anvill && git checkout -b release_bc3183b bc3183b ) + export CC="$(which clang)" export CXX="$(which clang++)"