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

mvn package fails at llvmaop for rv monitor #8

Open
devturnip opened this issue May 19, 2020 · 1 comment
Open

mvn package fails at llvmaop for rv monitor #8

devturnip opened this issue May 19, 2020 · 1 comment

Comments

@devturnip
Copy link

devturnip commented May 19, 2020

image

Following the error, I tried to run make in the folder specified by rv-monitor-master/llvmaop/target/antrun/build-main.xml
<exec failonerror="true" dir="/Users/tony/Downloads/rv-monitor-master/llvmaop/target" executable="make"></exec>

which gives me the following error:
➜ target make [ 50%] Linking CXX shared module LLVMAOP.dylib Undefined symbols for architecture x86_64: "llvm::Pass::print(llvm::raw_ostream&, llvm::Module const*) const", referenced from: vtable for (anonymous namespace)::AOP in AOP.cpp.o "llvm::ModulePass::assignPassManager(llvm::PMStack&, llvm::PassManagerType)", referenced from: vtable for (anonymous namespace)::AOP in AOP.cpp.o "llvm::Pass::preparePassManager(llvm::PMStack&)", referenced from: vtable for (anonymous namespace)::AOP in AOP.cpp.o "llvm::ModulePass::getPotentialPassManagerType() const", referenced from: vtable for (anonymous namespace)::AOP in AOP.cpp.o "llvm::Pass::getAnalysisUsage(llvm::AnalysisUsage&) const", referenced from: vtable for (anonymous namespace)::AOP in AOP.cpp.o "llvm::Pass::getAdjustedAnalysisPointer(void const*)", referenced from: vtable for (anonymous namespace)::AOP in AOP.cpp.o "llvm::Pass::getAsImmutablePass()", referenced from: vtable for (anonymous namespace)::AOP in AOP.cpp.o "llvm::Pass::getAsPMDataManager()", referenced from: vtable for (anonymous namespace)::AOP in AOP.cpp.o "llvm::Pass::dumpPassStructure(unsigned int)", referenced from: vtable for (anonymous namespace)::AOP in AOP.cpp.o "llvm::PassRegistry::getPassRegistry()", referenced from: llvm::RegisterPass<(anonymous namespace)::AOP>::RegisterPass(llvm::StringRef, llvm::StringRef, bool, bool) in AOP.cpp.o "llvm::PassManagerBuilder::addGlobalExtension(llvm::PassManagerBuilder::ExtensionPointTy, std::__1::function<void (llvm::PassManagerBuilder const&, llvm::legacy::PassManagerBase&)>)", referenced from: llvm::RegisterStandardPasses::RegisterStandardPasses(llvm::PassManagerBuilder::ExtensionPointTy, std::__1::function<void (llvm::PassManagerBuilder const&, llvm::legacy::PassManagerBase&)>) in AOP.cpp.o "llvm::User::getDescriptor()", referenced from: llvm::OperandBundleUser<llvm::CallInst, llvm::Use*>::bundle_op_info_begin() in AOP.cpp.o llvm::OperandBundleUser<llvm::CallInst, llvm::Use*>::bundle_op_info_end() in AOP.cpp.o "llvm::Pass::getPassName() const", referenced from: vtable for (anonymous namespace)::AOP in AOP.cpp.o "llvm::Instruction::Instruction(llvm::Type*, unsigned int, llvm::Use*, unsigned int, llvm::BasicBlock*)", referenced from: llvm::CallInst::CallInst(llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, llvm::Twine const&, llvm::BasicBlock*) in AOP.cpp.o "llvm::FunctionType::get(llvm::Type*, llvm::ArrayRef<llvm::Type*>, bool)", referenced from: (anonymous namespace)::AOP::getHookFunction(llvm::Module&, llvm::FunctionType*, char const*, (anonymous namespace)::ReturnType) in AOP.cpp.o "vtable for llvm::Pass", referenced from: llvm::Pass::Pass(llvm::PassKind, char&) in AOP.cpp.o NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. "llvm::User::operator new(unsigned long, unsigned int)", referenced from: llvm::CallInst::Create(llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::Twine const&, llvm::BasicBlock*) in AOP.cpp.o "llvm::llvm_unreachable_internal(char const*, char const*, unsigned int)", referenced from: llvm::User::operator delete(void*, unsigned int) in AOP.cpp.o "llvm::Instruction::Instruction(llvm::Type*, unsigned int, llvm::Use*, unsigned int, llvm::Instruction*)", referenced from: llvm::CallInst::CallInst(llvm::FunctionType*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, llvm::Twine const&, llvm::Instruction*) in AOP.cpp.o "llvm::Module::getFunction(llvm::StringRef) const", referenced from: (anonymous namespace)::AOP::hookBeforeExecute(llvm::Module&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in AOP.cpp.o "llvm::raw_ostream::write(char const*, unsigned long)", referenced from: llvm::raw_ostream::operator<<(llvm::StringRef) in AOP.cpp.o llvm::raw_ostream::operator<<(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in AOP.cpp.o "llvm::User::operator new(unsigned long, unsigned int, unsigned int)", referenced from: llvm::CallInst::Create(llvm::FunctionType*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, llvm::Twine const&, llvm::Instruction*) in AOP.cpp.o "llvm::Function::BuildLazyArguments() const", referenced from: llvm::Function::CheckLazyArguments() const in AOP.cpp.o "llvm::Module::getOrInsertFunction(llvm::StringRef, llvm::FunctionType*)", referenced from: (anonymous namespace)::AOP::hookBeforeExecute(llvm::Module&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in AOP.cpp.o (anonymous namespace)::AOP::getHookFunction(llvm::Module&, llvm::FunctionType*, char const*, (anonymous namespace)::ReturnType) in AOP.cpp.o "llvm::Type::getVoidTy(llvm::LLVMContext&)", referenced from: (anonymous namespace)::AOP::getHookFunction(llvm::Module&, llvm::FunctionType*, char const*, (anonymous namespace)::ReturnType) in AOP.cpp.o "llvm::ReplaceInstWithInst(llvm::SymbolTableList<llvm::Instruction>&, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void>, false, false>&, llvm::Instruction*)", referenced from: (anonymous namespace)::AOP::replaceCallPoint(llvm::Module&, (anonymous namespace)::CallInstInstrPoint*) in AOP.cpp.o "vtable for llvm::ModulePass", referenced from: llvm::ModulePass::ModulePass(char&) in AOP.cpp.o NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. "llvm::isCurrentDebugType(char const*)", referenced from: (anonymous namespace)::loadPass(llvm::PassManagerBuilder const&, llvm::legacy::PassManagerBase&) in AOP.cpp.o (anonymous namespace)::AOP::runOnModule(llvm::Module&) in AOP.cpp.o (anonymous namespace)::AOP::instrumentCallPoint(llvm::Module&, (anonymous namespace)::CallInstInstrPoint*) in AOP.cpp.o (anonymous namespace)::AOP::replaceCallPoint(llvm::Module&, (anonymous namespace)::CallInstInstrPoint*) in AOP.cpp.o "typeinfo for llvm::ModulePass", referenced from: typeinfo for (anonymous namespace)::AOP in AOP.cpp.o "llvm::Value::getName() const", referenced from: (anonymous namespace)::AOP::runOnModule(llvm::Module&) in AOP.cpp.o (anonymous namespace)::AOP::instrumentCallPoint(llvm::Module&, (anonymous namespace)::CallInstInstrPoint*) in AOP.cpp.o (anonymous namespace)::AOP::replaceCallPoint(llvm::Module&, (anonymous namespace)::CallInstInstrPoint*) in AOP.cpp.o "llvm::errs()", referenced from: (anonymous namespace)::AOP::fail(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in AOP.cpp.o "llvm::ModulePass::createPrinterPass(llvm::raw_ostream&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const", referenced from: vtable for (anonymous namespace)::AOP in AOP.cpp.o "llvm::CallInst::init(llvm::FunctionType*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, llvm::Twine const&)", referenced from: llvm::CallInst::CallInst(llvm::FunctionType*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, llvm::Twine const&, llvm::Instruction*) in AOP.cpp.o llvm::CallInst::init(llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, llvm::Twine const&) in AOP.cpp.o "llvm::Instruction::~Instruction()", referenced from: llvm::CallInst::CallInst(llvm::FunctionType*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, llvm::Twine const&, llvm::Instruction*) in AOP.cpp.o llvm::CallInst::CallInst(llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, llvm::Twine const&, llvm::BasicBlock*) in AOP.cpp.o "llvm::DebugFlag", referenced from: (anonymous namespace)::loadPass(llvm::PassManagerBuilder const&, llvm::legacy::PassManagerBase&) in AOP.cpp.o (anonymous namespace)::AOP::runOnModule(llvm::Module&) in AOP.cpp.o (anonymous namespace)::AOP::instrumentCallPoint(llvm::Module&, (anonymous namespace)::CallInstInstrPoint*) in AOP.cpp.o (anonymous namespace)::AOP::replaceCallPoint(llvm::Module&, (anonymous namespace)::CallInstInstrPoint*) in AOP.cpp.o "llvm::ModulePass::~ModulePass()", referenced from: (anonymous namespace)::AOP::AOP() in AOP.cpp.o (anonymous namespace)::AOP::~AOP() in AOP.cpp.o "llvm::Pass::releaseMemory()", referenced from: vtable for (anonymous namespace)::AOP in AOP.cpp.o "llvm::Pass::verifyAnalysis() const", referenced from: vtable for (anonymous namespace)::AOP in AOP.cpp.o "llvm::PassRegistry::registerPass(llvm::PassInfo const&, bool)", referenced from: llvm::RegisterPass<(anonymous namespace)::AOP>::RegisterPass(llvm::StringRef, llvm::StringRef, bool, bool) in AOP.cpp.o "llvm::dbgs()", referenced from: (anonymous namespace)::loadPass(llvm::PassManagerBuilder const&, llvm::legacy::PassManagerBase&) in AOP.cpp.o (anonymous namespace)::AOP::runOnModule(llvm::Module&) in AOP.cpp.o (anonymous namespace)::AOP::instrumentCallPoint(llvm::Module&, (anonymous namespace)::CallInstInstrPoint*) in AOP.cpp.o (anonymous namespace)::AOP::replaceCallPoint(llvm::Module&, (anonymous namespace)::CallInstInstrPoint*) in AOP.cpp.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [lib/LLVMAOP.dylib] Error 1 make[1]: *** [lib/CMakeFiles/LLVMAOP.dir/all] Error 2 make: *** [all] Error 2

Using:
JDK java version "1.8.0_251"
LLVM Version 6.0.1
cmake version 3.17.2
MacOS Catalina 10.15.4
AspectJ Compiler 1.9.5

@devturnip
Copy link
Author

devturnip commented May 19, 2020

Screenshot 2020-05-19 at 11 52 26 PM

FWIW, testing on a virtualbox ubuntu 16.04 LTS with JDK 8 / LLVM 6 / cmake 3.5.1, I am able to successfully run mvn package which gives me the tools in target/release/rv-monitor/bin

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