googleprojectzero / TinyInst

A lightweight dynamic instrumentation library
Apache License 2.0
1.18k stars 119 forks source link

Cannot build xed during build TinyInst #58

Closed hihijskim closed 2 years ago

hihijskim commented 2 years ago

Hi, I'm trying to use TinyInst but I'm facing some difficulties from building the source code. I have followed exactly what the README said like below.

**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.10.2
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

vagrant@DESKTOP-7DO7OTF C:\>cd C:\TinyInst

vagrant@DESKTOP-7DO7OTF C:\TinyInst>mkdir build

vagrant@DESKTOP-7DO7OTF C:\TinyInst>cd build

vagrant@DESKTOP-7DO7OTF C:\TinyInst\build>cmake -G "Visual Studio 16 2019" -A x64 ..
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.18363.
-- The C compiler identification is MSVC 19.29.30038.1
-- The CXX compiler identification is MSVC 19.29.30038.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe
 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.e
xe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Python3: C:/Windows/System32/python/tools/python.exe (found version "3.10.2") found components: Interpreter
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.18363.
-- Configuring done
-- Generating done
-- Build files have been written to: C:/TinyInst/build

vagrant@DESKTOP-7DO7OTF C:\TinyInst\build>cmake --build . --config Release
Microsoft (R) Build Engine version 16.10.2+857e5a733 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

  Checking Build System
  Building Xed
  The system cannot find the path specified.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Cus 
tom build for 'C:\TinyInst\build\CMakeFiles\d623550a654711f162cf5eb62c1c0424\xed.lib.rule;C:\TinyInst\build\CMakeFiles\b3b27b0698457947805aaed 
472b42b2c\xed.rule;C:\TinyInst\third_party\CMakeLists.txt' exited with code 3. [C:\TinyInst\build\third_party\xed.vcxproj]

As you can see from the log, It seems like the makefile is using invalid path while building xed.

FYI, CMake found a valid Python3 and the path is also valid. (as the log says) The python package has been installed by nuget.

Any help?

ifratric commented 2 years ago

Which Windows version are you building on?

Have you also dowloaded submodules (which includes Xed) together with TinyInst? If not, run git submodule update --init --recursive from TinyInst directory.

hihijskim commented 2 years ago

Hi @ifratric , Thanks for the reply. I'm using 1909 Build 18363.418 and submodules are cloned. I think it was the problem with python and its path since I've installed the python by nuget. After I reinstall python with official installer, everything works fine. Thank you.

ifratric commented 2 years ago

I'm glad you solved it!