mcsema_rt builds are broken on Windows
There are multiple problems with both x86 and x64 builds, and I don't know how to deal with them all.
First of all, x86 build:
- It seems that C++ standard set in
mcsema/Arch/X86/Runtime/CMakeLists.txt,gnu++11, is wrong. I triedc++17but finallyc++14worked. - In the same place, option
-fPICis not supported by Clang on Windows. I don't know if it is necessary on other platforms or not, on Windows deleting it fixed the problem. - I had some weird problem in the STL itself: some obscure file
...\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include\yvals_core.hwas complaining that my Clang version is less than 9, although it was 9.0.0. I worked it out but commenting out this#errorline.
After performing these fixes I got a successful x86 build. Since I only tested it on Windows, and I am not sure about these fixes, and I don't know how to fix 3 in mcsema itself, I didn't make a PR.
x64 build:
I didn't need it, so I didn't try to solve the error(s). The only one shown to me right now is remill\tools\mcsema\mcsema\Arch\X86\Runtime\print_PE_64_windows.cpp(68,43): error : use of undeclared identifier 'RegState', which blocks the build.
I have latest Visual Studio 2019. I didn't manage to work with it though, so I also downloaded latest Build Tools for Visual Studio 2019. Source code version is also latest (e626fb86).
Thank for the tips! We have not had much time to dedicate to Windows builds but I do hope to get them running with modern LLVMs again.