hasherezade / tiny_tracer

A Pin Tool for tracing API calls etc
1.25k stars 138 forks source link

Build Error on VS 2022: "CL.exe" exited with code -1073740791 #59

Closed WildByDesign closed 3 weeks ago

WildByDesign commented 1 month ago

Visual Studio 2022 (17.10.3) 64-bit Windows 11 24H2 (Build 26100.1000) Platform tools: upgraded to v143 Windows SDK: 10.0.22621.0

I have tried every possible variation that I can think of, but cannot build tiny-tracer 32-bit or 64-bit binaries in Release or Debug.

Also, it fails with the same code with the current code (as of today) in master and also the 2.7.1 release sources.

Error: Error MSB6006 "CL.exe" exited with code -1073740791. TinyTracer C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets 755

Thank you for your time.

xorhex commented 1 month ago

Visual Studio 2022 (17.10.3) 64-bit Windows 10 Platform tools: upgraded to v143 Windows SDK: 10.0.22621.0

Same here: 1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(755,5): error MSB6006: "CL.exe" exited with code -1073740791.

<CL Condition="'%(ClCompile.PrecompiledHeader)' != 'Create' and '%(ClCompile.CompileAs)'!='CppModule' and '%(ClCompile.CompilerIteration)' == '' and @(ClCompile) != '' and '$(MultiProcCL)' != 'true'"
hasherezade commented 1 month ago

hi! thank you for reporting, I will look into it

hasherezade commented 1 month ago

This is not something TinyTracer specific, I see the same problem occurs when trying to build MyPinTool from the original Pin package (using VS 2022):

my_tool_err

I had no problems building in VS 2019 though... I will try to find out why it happens, and let you know.

hasherezade commented 1 month ago

I know it is annoying, so I came up with a workaround to this problem. From now, you can download the ready-made builds of TinyTracer from AppVeyor server!

Click the AppVeyor button on the README: Build status then select the plaftorm, and then go to the "Artifacts" tab. WARNING: check the "Console" output to see what version of Pin is required to use them

WildByDesign commented 1 month ago

@hasherezade Thank you very much. I wasn't able to test it before and now I can. I appreciate it.

I'm not sure if the issue should be closed with this workaround or not. It's totally up to you.

hasherezade commented 1 month ago

@WildByDesign - the mentioned problem is still not solved, so I will keep the issue open. Not sure if I can fix it though, it should rather be fixed on the Pin side. The new Visual Studio seems to not like their header files.

HongThatCong commented 1 month ago

VS 2022 change a option in linker

x64bugreport commented 1 month ago

I know this question. Let me answer it by removing fp:strict from all command lines in the C++ option.

hasherezade commented 3 weeks ago

thank you @x64bugreport, it worked!