Thanks a lot for the project. Next to closed-source FUDGE: Fuzz Driver Generation at Scale, this seems to be the only project for creating Fuzzing Drivers out of a library today. However, the build instructions seem a bit unclear and in reversed order to me. I try to provide a step-by-step solution. Please correct me where I'm wrong.
Clone Fuzzgen
git clone https://github.com/HexHive/FuzzGen
Build LLVM-6.0.0 (Taken from #19 and modified)
git clone https://github.com/llvm/llvm-project
cd llvm-project
git checkout llvmorg-6.0.0
cp -r FuzzGen/src/preprocessor/ llvm-project/clang/tools/fuzzgen/ (The Readme said $LLVM_SRC/tools/clang/tools but there is no tools directory in llvm-project/)
- Open
llvm-project/clang/tools/CMakeLists.txt and add add_clang_subdirectory(fuzzgen) (anywhere in the code or preferably at the end?)
mkdir build
cd build
cmake -DLLVM_ENABLE_PROJECTS=clang -DLLVM_PARALLEL_LINK_JOBS=1 -DLLVM_USE_LINKER=gold -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ../llvm (setting parallel link jobs to 1 and using the gold linker are optional but supposedly easier for the RAM and shouldn't use as much swap memory)
cmake --build . (may take several hours to complete - 5-6 h in my case; setting the build type to Release should speed up the process a bit, though)
Build FuzzGen (Taken from the Readme and modified)
(1. FuzzGen has already been cloned beforehand)
2. sudo apt-get install libboost-all-dev
3. export LLVM_DIR=/llvm-project/build (not really optional, right?; targeting other versions will fail later on; is it necessary to specify the exact build directory, that had been created while building LLVM-6.0.0?)
4. cd FuzzGen
5. mkdir build
6. cd build
7. cmake ..
8. make -j$(nproc)
Is adjusting the MACROS in src/compose.h even necessary when only planning to work with the Debian-mode?
Thanks a lot for the project. Next to closed-source FUDGE: Fuzz Driver Generation at Scale, this seems to be the only project for creating Fuzzing Drivers out of a library today. However, the build instructions seem a bit unclear and in reversed order to me. I try to provide a step-by-step solution. Please correct me where I'm wrong.
Clone Fuzzgen
git clone https://github.com/HexHive/FuzzGenBuild LLVM-6.0.0 (Taken from #19 and modified)
git clone https://github.com/llvm/llvm-projectcd llvm-projectgit checkout llvmorg-6.0.0cp -r FuzzGen/src/preprocessor/ llvm-project/clang/tools/fuzzgen/(The Readme said$LLVM_SRC/tools/clang/toolsbut there is no tools directory inllvm-project/)llvm-project/clang/tools/CMakeLists.txtand addadd_clang_subdirectory(fuzzgen)(anywhere in the code or preferably at the end?)mkdir buildcd buildcmake -DLLVM_ENABLE_PROJECTS=clang -DLLVM_PARALLEL_LINK_JOBS=1 -DLLVM_USE_LINKER=gold -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ../llvm(setting parallel link jobs to 1 and using the gold linker are optional but supposedly easier for the RAM and shouldn't use as much swap memory)cmake --build .(may take several hours to complete - 5-6 h in my case; setting the build type to Release should speed up the process a bit, though)Build FuzzGen (Taken from the Readme and modified)
(1. FuzzGen has already been cloned beforehand)
2.
sudo apt-get install libboost-all-dev3.
export LLVM_DIR=/llvm-project/build(not really optional, right?; targeting other versions will fail later on; is it necessary to specify the exact build directory, that had been created while building LLVM-6.0.0?)4.
cd FuzzGen5.
mkdir build6.
cd build7.
cmake ..8.
make -j$(nproc)Is adjusting the MACROS in
src/compose.heven necessary when only planning to work with the Debian-mode?