JonathanSalwan / Triton

Triton is a dynamic binary analysis library. Build your own program analysis tools, automate your reverse engineering, perform software verification or just emulate code.
https://triton-library.github.io
Apache License 2.0
3.39k stars 524 forks source link

[friendly reminder] LLVM version > 16 wont work when building triton #1340

Closed vxcall closed 9 hours ago

vxcall commented 2 days ago

problem and proposal

When i built with latest LLVM, this error showed up saying llvm/Transforms/IPO/PassManagerBuilder.h is not found.

C:\Users\pseuxide\works\Triton\src\libtriton\includes\triton\tritonToLLVM.hpp(24,10): error C1083: Cannot open include
file: 'llvm/Transforms/IPO/PassManagerBuilder.h': No such file or directory [C:\Users\pseuxide\works\Triton\build\src\l
ibtriton\triton.vcxproj]

indeed, seems llvm deleted the header file any versions later than 16. so I think the LLVM has to be below 16 when building triton.

So README's under Install section should be

* llvm          (optional)   >= 12
↓
* llvm          (optional)   12 <= llvm <= 16 # this might look odd?

anyways, so I thought it would be better to have some warning or annotation about it for noobs like me!

out of scope, but

Even without this problem, building triton on Windows is pretty complicated for beginners. Having more step by step document in readme would be helpful. It was too complicated so I made it by myself for me tho.

vxcall commented 2 days ago

Also may I ask which dll file do I have to put in python's site-package folder for triton to use LLVM feature?

JonathanSalwan commented 4 hours ago

I'm not really experienced compiling things on Windows. Regarding LLVM on Windows I suggest pinging @mrexodia who has great experience on this stuff :)