winafl icon indicating copy to clipboard operation
winafl copied to clipboard

Problem Compiling

Open jeffreyroberts opened this issue 6 years ago • 4 comments

I can't get past the first part here...


** Visual Studio 2017 Developer Command Prompt v15.9.6 ** Copyright (c) 2017 Microsoft Corporation


[vcvarsall.bat] Environment initialized for: 'x64'

c:\Users\jeffr\Projects\Fuzzing\winafl\build64>cmake -G"Visual Studio 15 2017 Win64" .. -DDynamoRIO_DIR=........\Downloads\DynamoRIO-Windows-7.0.0-RC1\DynamoRIO-Windows-7.0.0-RC1\cmake -DINTELPT=1 CMake Warning (dev) at CMakeLists.txt:15 (add_subdirectory): The source directory

C:/Users/jeffr/Projects/Fuzzing/winafl/third_party/processor-trace

does not contain a CMakeLists.txt file.

CMake does not support this case but it used to work accidentally and is being allowed for compatibility.

Policy CMP0014 is not set: Input directories must have CMakeLists.txt. Run "cmake --help-policy CMP0014" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning at CMakeLists.txt:149 (find_package): By not providing "FindDynamoRIO.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "DynamoRIO", but CMake did not find one.

Could not find a package configuration file provided by "DynamoRIO" with any of the following names:

DynamoRIOConfig.cmake
dynamorio-config.cmake

Add the installation prefix of "DynamoRIO" to CMAKE_PREFIX_PATH or set "DynamoRIO_DIR" to a directory containing one of the above files. If "DynamoRIO" provides a separate development package or SDK, be sure it has been installed.

CMake Error at CMakeLists.txt:151 (message): DynamoRIO package required to build

-- Configuring incomplete, errors occurred! See also "C:/Users/jeffr/Projects/Fuzzing/winafl/build64/CMakeFiles/CMakeOutput.log".

c:\Users\jeffr\Projects\Fuzzing\winafl\build64>

jeffreyroberts avatar Mar 19 '19 13:03 jeffreyroberts

I am a big fan of AFL for linux, figured I would give it a try for windows =]

jeffreyroberts avatar Mar 19 '19 13:03 jeffreyroberts

Hey, I see two problems here

  • You need to pull the third-party submodules with e.g. git submodule update --init --recursive in order to build with the Intel PT support (as it depends on third-party libraries)
  • The path to DynamoRIO seems incorrect. Note that you need to provide a relative path from the directory containing the WinAFL sources

Note also that WinAFL includes prebuilt binaries in bin32/bin64 folders. :-)

ifratric avatar Mar 19 '19 13:03 ifratric

Gracias!

jeffreyroberts avatar Mar 19 '19 13:03 jeffreyroberts

1- Don't use the repo from github, just download dynamorio from official website and unzip it. 2- open x64 native tools command prompt and type : - git init - git submodule update --init --recursive - cmake -G"Visual Studio 15 2017 Win64" .. -DDynamoRIO_DIR=........\Downloads\DynamoRIO-Windows-7.0.0-RC1\DynamoRIO-Windows-7.0.0-RC1\cmake

AnassZbair avatar Aug 17 '22 11:08 AnassZbair