Skip to content

Clarification on Build Instructions #20

@Juvojic

Description

@Juvojic

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

  1. git clone https://github.com/HexHive/FuzzGen

Build LLVM-6.0.0 (Taken from #19 and modified)

  1. git clone https://github.com/llvm/llvm-project
  2. cd llvm-project
  3. git checkout llvmorg-6.0.0
  4. 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/)
  5. Open llvm-project/clang/tools/CMakeLists.txt and add add_clang_subdirectory(fuzzgen) (anywhere in the code or preferably at the end?)
  6. mkdir build
  7. cd build
  8. 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)
  9. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions