Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error after recent commits #17

Closed
deXetrous opened this issue Nov 11, 2018 · 1 comment
Closed

Build error after recent commits #17

deXetrous opened this issue Nov 11, 2018 · 1 comment

Comments

@deXetrous
Copy link

I tried to build llvm/mctoll, but it failed with the following error:

[100%] Building CXX object tools/llvm-mctoll/CMakeFiles/llvm-mctoll.dir/llvm-mctoll.cpp.o
/home/harshit/Documents/BinaryObfuscation/new_llvm-mctoll/src/llvm/tools/llvm-mctoll/llvm-mctoll.cpp: In function ‘void DisassembleObject(const llvm::object::ObjectFile*, bool)’:
/home/harshit/Documents/BinaryObfuscation/new_llvm-mctoll/src/llvm/tools/llvm-mctoll/llvm-mctoll.cpp:1105:74: error: invalid conversion from ‘std::unique_ptr<llvm::TargetMachine>::pointer {aka llvm::TargetMachine*}’ to ‘const llvm::LLVMTargetMachine*’ [-fpermissive]
   MachineModuleInfo *machineModuleInfo = new MachineModuleInfo(Target.get());
                                                                ~~~~~~~~~~^~
In file included from /home/harshit/Documents/BinaryObfuscation/new_llvm-mctoll/src/llvm/tools/llvm-mctoll/ModuleRaiser.h:18:0,
                 from /home/harshit/Documents/BinaryObfuscation/new_llvm-mctoll/src/llvm/tools/llvm-mctoll/MachineInstructionRaiser.h:20,
                 from /home/harshit/Documents/BinaryObfuscation/new_llvm-mctoll/src/llvm/tools/llvm-mctoll/MachineFunctionRaiser.h:19,
                 from /home/harshit/Documents/BinaryObfuscation/new_llvm-mctoll/src/llvm/tools/llvm-mctoll/llvm-mctoll.cpp:14:
/home/harshit/Documents/BinaryObfuscation/new_llvm-mctoll/src/llvm/include/llvm/CodeGen/MachineModuleInfo.h:148:12: note:   initializing argument 1 of ‘llvm::MachineModuleInfo::MachineModuleInfo(const llvm::LLVMTargetMachine*)’
   explicit MachineModuleInfo(const LLVMTargetMachine *TM = nullptr);
            ^~~~~~~~~~~~~~~~~
tools/llvm-mctoll/CMakeFiles/llvm-mctoll.dir/build.make:62: recipe for target 'tools/llvm-mctoll/CMakeFiles/llvm-mctoll.dir/llvm-mctoll.cpp.o' failed
make[3]: *** [tools/llvm-mctoll/CMakeFiles/llvm-mctoll.dir/llvm-mctoll.cpp.o] Error 1
CMakeFiles/Makefile2:62164: recipe for target 'tools/llvm-mctoll/CMakeFiles/llvm-mctoll.dir/all' failed
make[2]: *** [tools/llvm-mctoll/CMakeFiles/llvm-mctoll.dir/all] Error 2
CMakeFiles/Makefile2:62176: recipe for target 'tools/llvm-mctoll/CMakeFiles/llvm-mctoll.dir/rule' failed
make[1]: *** [tools/llvm-mctoll/CMakeFiles/llvm-mctoll.dir/rule] Error 2
Makefile:14681: recipe for target 'llvm-mctoll' failed
make: *** [llvm-mctoll] Error 2

Earlier it used to build fine.
I think there might be an issue while adding support to raise idiv with register source operand in X86MachineInstructionRaiser.cpp.
Thanks,
Harshit

@bharadwajy
Copy link
Contributor

This is the consequence of a recent upstream change in LLVM. Corresponding change pushed.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants