mcsema
mcsema copied to clipboard
What's the code meaning in step2 of "Getting and building the code"
I'd lilke to get it on ubuntu 18.04 by Native Build, but I'm not sure code in step2 which is
git clone --depth 1 --single-branch --branch master https://github.com/lifting-bits/remill.git
..........
${TRAILOFBITS_LIBRARIES}/cmake/bin/cmake ../mcsema
make
make_install
popd
Is it a shell script? If I put it into a shell file,it can not be executed because there are syntax errors. And I can not execute command "make install" or "sudo make install" in folder "mcsema-ve" because there is not make file. I am confused about it,Could anyone give me some explanation about how to understand and implement codes in step2
Another I want to konw step2 of building by docker, is it means I need to get ida pro and push into docker? I haven't learned docker and not sure about usage of docker
I would appreciate it if anyone could help me. Thanks as a beginner
same issue here.. what i did is git clone then change make_install to make install (that way not needing the functions) replace the popd pushd with cd commands how ever i still met other issues after
Hello! I'm sorry you are encountering issues with building McSema.
We are in the process of changing how dependencies are fetched to hopefully make things easier for native building.
That being said, could I ask you to try this new process?
If you are using Ubuntu 18.04, it should be easy since you can download pre-compiled dependencies. We'll have to start by building both remill
and anvill
from source again.
# Make sure we are able to unzip the downloaded dependency bundle
apt-get install -y xz-utils
# Clone, build, and reinstall remill
# (or update your copy to latest commits on `master`)
git clone https://github.com/lifting-bits/remill.git
cd remill
# You can specify `--prefix` to choose where to install
# Note: You might have to create the `prefix` directory if it doesn't exist
./scripts/build.sh --llvm-version 10 --prefix /opt/trailofbits
cmake --build remill-build --target install -- -j "$(nproc)"
# Clone, build, and reinstall anvill
# (or update your copy to latest commits on `master`)
git clone https://github.com/lifting-bits/anvill.git
mkdir -p anvill/build && cd anvill/build
# Make sure the path for `remill_DIR` contains `remillConfig.cmake` file
cmake -DCMAKE_INSTALL_PREFIX=/opt/trailofbits -Dremill_DIR=/opt/trailofbits/lib/cmake/remill ..
cmake --build . --target install
Now we can build McSema
# Clone and build mcsema
# (or update your copy to latest commits on `master`)
git clone https://github.com/lifting-bits/mcsema.git
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/opt/trailofbits -Dremill_DIR=/opt/trailofbits/lib/cmake/remill -Dremill_DIR=/opt/trailofbits/lib/cmake/anvill ..
cmake --build .
The remill_DIR
and anvill_DIR
are only required if you are installing those tools to a directory that CMake cannot find itself. If you install remill and anvill to a system path (like /usr/local
), then remill_DIR
and anvill_DIR
are not required.
We plan to update the README with better instructions soon.
Let me know if you have any other questions or you cannot get this to work! Thank you for being patient.