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.48k stars 529 forks source link

Building fails on Windows VS2017 #716

Closed ghost closed 5 years ago

ghost commented 6 years ago

All library dependencies are satisfied, except that I needed to copy "z3.h" to src\api\c++ in z3 folder, otherwise compilation would have failed because of not seeing the file

Libraries versions:

These are the errors I'm getting when trying to compile triton.

Error   C2664   'std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &)': cannot convert argument 1 from 'triton::uint512' to 'std::initializer_list<_Elem>'    triton  C:\Users\delta\Desktop\opt\Triton\src\libtriton\ast\z3\tritonToZ3Ast.cpp    164 
Error   C2664   'std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string(const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &)': cannot convert argument 1 from 'triton::uint512' to 'std::initializer_list<_Elem>'    triton  C:\Users\delta\Desktop\opt\Triton\src\libtriton\ast\z3\tritonToZ3Ast.cpp    285 
Error   MSB6006 "cmd.exe" exited with code 1.   python-triton   C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets  171 

Additional errors when compiling "ALL_BUILD"

Error       test_ast_duplication (unittest.loader.ModuleImportFailure)  test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   
Error       test_ast_conversion (unittest.loader.ModuleImportFailure)   test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   
Error       test_arch (unittest.loader.ModuleImportFailure) test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   
Error       test_taint (unittest.loader.ModuleImportFailure)    test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   
Error       test_symbolic_variable (unittest.loader.ModuleImportFailure)    test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   
Error       test_symbolic (unittest.loader.ModuleImportFailure) test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   
Error       test_symbolic_expression (unittest.loader.ModuleImportFailure)  test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   
Error       test_immediate (unittest.loader.ModuleImportFailure)    test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   
Error       test_im_callback (unittest.loader.ModuleImportFailure)  test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   
Error       test_instruction (unittest.loader.ModuleImportFailure)  test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   
Error       test_memory (unittest.loader.ModuleImportFailure)   test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   
Error       test_only_symbolized_mode (unittest.loader.ModuleImportFailure) test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   
Error       test_only_tainted_mode (unittest.loader.ModuleImportFailure)    test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   
Error       test_path_constraint (unittest.loader.ModuleImportFailure)  test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   
Error       test_registers (unittest.loader.ModuleImportFailure)    test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   
Error       test_semantics (unittest.loader.ModuleImportFailure)    test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   
Error       test_simulation (unittest.loader.ModuleImportFailure)   test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   
Error       test_ast_simplification (unittest.loader.ModuleImportFailure)   test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   
Error       test_bitvector (unittest.loader.ModuleImportFailure)    test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   
Error       test_callback (unittest.loader.ModuleImportFailure) test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   
Error       test_concrete_value (unittest.loader.ModuleImportFailure)   test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   
Error       test_flags (unittest.loader.ModuleImportFailure)    test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   
Error       test_ast_eval (unittest.loader.ModuleImportFailure) test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   
Error       test_ast_reference (unittest.loader.ModuleImportFailure)    test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   
Error       test_ast_representation (unittest.loader.ModuleImportFailure)   test-python C:\Users\delta\Desktop\opt\Triton\build\CUSTOMBUILD 1   

Downloaded latest version of Triton from master branch

JonathanSalwan commented 5 years ago

Related to https://github.com/JonathanSalwan/Triton/issues/738#issuecomment-437091300?