Closed sr-tream closed 4 years ago
Which version of LLVM need for building? With LLVM 9 it fail:
make[1]: Entering directory '/home/sr_team/Projects/FakePDB/src_pdbgen/build' make[2]: Entering directory '/home/sr_team/Projects/FakePDB/src_pdbgen/build' Scanning dependencies of target pdbgen_common make[2]: Leaving directory '/home/sr_team/Projects/FakePDB/src_pdbgen/build' make[2]: Entering directory '/home/sr_team/Projects/FakePDB/src_pdbgen/build' [ 12%] Building CXX object CMakeFiles/pdbgen_common.dir/pefile.cpp.o [ 25%] Building CXX object CMakeFiles/pdbgen_common.dir/pdbcreator.cpp.o /home/sr_team/Projects/FakePDB/src_pdbgen/pefile.cpp: In member function 'uint32_t PeFile::GetImageSize()': /home/sr_team/Projects/FakePDB/src_pdbgen/pefile.cpp:118:38: error: no matching function for call to 'llvm::object::COFFObjectFile::getPE32Header()' 118 | auto* pe32 = _obj->getPE32Header(); | ^ In file included from /home/sr_team/Projects/FakePDB/src_pdbgen/pefile.h:26, from /home/sr_team/Projects/FakePDB/src_pdbgen/pefile.cpp:17: /usr/include/llvm/Object/COFF.h:975:19: note: candidate: 'std::error_code llvm::object::COFFObjectFile::getPE32Header(const llvm::object::pe32_header*&) const' 975 | std::error_code getPE32Header(const pe32_header *&Res) const; | ^~~~~~~~~~~~~ /usr/include/llvm/Object/COFF.h:975:19: note: candidate expects 1 argument, 0 provided /home/sr_team/Projects/FakePDB/src_pdbgen/pefile.cpp:123:46: error: no matching function for call to 'llvm::object::COFFObjectFile::getPE32PlusHeader()' 123 | auto* pe32plus = _obj->getPE32PlusHeader(); | ^ In file included from /home/sr_team/Projects/FakePDB/src_pdbgen/pefile.h:26, from /home/sr_team/Projects/FakePDB/src_pdbgen/pefile.cpp:17: /usr/include/llvm/Object/COFF.h:976:19: note: candidate: 'std::error_code llvm::object::COFFObjectFile::getPE32PlusHeader(const llvm::object::pe32plus_header*&) const' 976 | std::error_code getPE32PlusHeader(const pe32plus_header *&Res) const; | ^~~~~~~~~~~~~~~~~ /usr/include/llvm/Object/COFF.h:976:19: note: candidate expects 1 argument, 0 provided make[2]: *** [CMakeFiles/pdbgen_common.dir/build.make:63: CMakeFiles/pdbgen_common.dir/pefile.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... /home/sr_team/Projects/FakePDB/src_pdbgen/pdbcreator.cpp: In member function 'bool PdbCreator::Commit(std::filesystem::__cxx11::path&)': /home/sr_team/Projects/FakePDB/src_pdbgen/pdbcreator.cpp:108:81: error: taking address of rvalue [-fpermissive] 108 | if (_pdbBuilder.commit(path.string(), &_pdbBuilder.getInfoBuilder().getGuid())) { | ^ make[2]: *** [CMakeFiles/pdbgen_common.dir/build.make:89: CMakeFiles/pdbgen_common.dir/pdbcreator.cpp.o] Error 1 make[2]: Leaving directory '/home/sr_team/Projects/FakePDB/src_pdbgen/build' make[1]: *** [CMakeFiles/Makefile2:81: CMakeFiles/pdbgen_common.dir/all] Error 2 make[1]: Leaving directory '/home/sr_team/Projects/FakePDB/src_pdbgen/build' make: *** [Makefile:84: all] Error 2
FWIW it builds fine with LLVM 10.
LLVM 10 required, LLVM git preferable.
Added info into readme.
Which version of LLVM need for building? With LLVM 9 it fail: