googleprojectzero / winafl

A fork of AFL for fuzzing Windows binaries
Apache License 2.0
2.36k stars 533 forks source link

Compilation failed #411

Closed z1r00 closed 1 year ago

z1r00 commented 1 year ago

I want to build winafl, but Compilation failed

winafl and DynamoRIO are in the same directory

cmake DynamoRIO

PS D:\dynamorio\build64> cmake -G"Visual Studio 17 2022" -A x64 ..
-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.19043.
-- The C compiler identification is MSVC 19.36.32537.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is MSVC 19.36.32537.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Version number: 9.93.19549
-- Found assembler: D:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/ml64.exe
-- Found message compiler: D:/Windows Kits/10/bin/10.0.22000.0/x64/mc.exe
-- Found Perl: D:/Strawberry/perl/bin/perl.exe (found version "5.32.1")
-- Performing Test cxx17_available
-- Performing Test cxx17_available - Failed
-- Targeting subsystem 5.02
-- PT related libraries only supported on Linux x86_64
-- For dbghelp, choosing among:
-- Looking for MFC
-- Looking for MFC - not found
-- MFC not found: disabling DRstats
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.11")
-- Performing Test implicit_fallthrough_avail
-- Performing Test implicit_fallthrough_avail - Failed
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
CMake Warning at CMakeLists.txt:1863 (message):
  doxygen not found: documentation will NOT be built

*** NOT building documentation *** (must re-enable BUILD_DOCS manually if fix up the component paths)
-- WARNING: vera++ not found: disabling code style checks
-- WARNING: Could not find Qt 5: DrGUI will NOT be built
--   Point CMake variable Qt5Widgets_DIR at the Qt5WidgetsConfig.cmake directory
-- Configuring done
-- Generating done
-- Build files have been written to: D:/dynamorio/build64
PS D:\dynamorio\build64> cmake --build . --config RelWithDebInfo
MSBuild version 17.6.3+07e294721 for .NET Framework

  Generating ../events.h
  MC: Compiling D:/dynamorio/core/win32/events.mc
............................
.....................

cmake winafl

PS D:\winafl\build64> cmake -G"Visual Studio 17 2022" -A x64 .. -DDynamoRIO_DIR=D:\dynamorio\build64\bin64\cmake
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.
  CMake that the project does not need compatibility with older versions.

-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.19043.
  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

  "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:153 (message):
  DynamoRIO package required to build

-- Configuring incomplete, errors occurred!
See also "D:/winafl/build64/CMakeFiles/CMakeOutput.log".

I want to ask what's wrong

ifratric commented 1 year ago

Can you verify that the directory D:\dynamorio\build64\bin64\cmake exists and that it contains DynamoRIOConfig.cmake

z1r00 commented 1 year ago

I searched in /bin64, but did not find cmake how do i do it

z1r00 commented 1 year ago

I find it. D:\dynamorio\build64\cmake And winafl also compiled successfully Think you!