compilation issues #336

Closed
labba opened this Issue Feb 9, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@labba

labba commented Feb 9, 2016

hi,
i have tried to install on unbuntu 15.10 latest Klee by taking the Dockerfile from the docker image and transformed it to an installation file.

the problem is that after it does all the needed installation and getting to the "make" it later fail with the folowing issue:

llvm[2]: Building Release+Asserts Archive Library libkleeCore.a
make[2]: Leaving directory '/home/toor/klee/klee_build/klee/lib/Core'
make[1]: Leaving directory '/home/toor/klee/klee_build/klee/lib'
make[1]: Entering directory '/home/toor/klee/klee_build/klee/tools'
make[2]: Entering directory '/home/toor/klee/klee_build/klee/tools/klee'
llvm[2]: Compiling Debug.cpp for Release+Asserts build
llvm[2]: Compiling main.cpp for Release+Asserts build
llvm[2]: Linking Release+Asserts executable klee (without symbols)
/home/toor/klee/klee_build/klee/tools/klee/Release+Asserts/main.o: In function `KleeHandler::openOutputFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/toor/klee/klee_src/tools/klee/main.cpp:380: undefined reference to`llvm::raw_fd_ostream::raw_fd_ostream(char const_, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, llvm::sys::fs::OpenFlags)'
/home/toor/klee/klee_build/klee/tools/klee/Release+Asserts/main.o: In function `KleeHandler::getRunTimeLibraryPath[abi:cxx11](char const*)':
/home/toor/klee/klee_src/tools/klee/main.cpp:585: undefined reference to`llvm::sys::fs::getMainExecutable[abi:cxx11](char const*, void*)'
/home/toor/klee/klee_build/klee/tools/klee/Release+Asserts/main.o: In function `KleeHandler::getOutFiles(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)':
/home/toor/klee/klee_src/tools/klee/main.cpp:569: undefined reference to`llvm::error_code::message[abi:cxx11]() const'
/home/toor/klee/klee_build/klee/tools/klee/Release+Asserts/main.o: In function `KleeHandler::KleeHandler(int, char__)':
/home/toor/klee/klee_src/tools/klee/main.cpp:286: undefined reference to `llvm::error_code::message[abi:cxx11]() const'
/home/toor/klee/klee_build/klee/tools/klee/Release+Asserts/main.o: In function`llvm::cl::opt<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, false, llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::~opt()':
/usr/lib/llvm-3.4/build/include/llvm/Support/CommandLine.h:1149: undefined reference to `vtable for llvm::cl::opt<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, false, llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >'
/home/toor/klee/klee_build/klee/tools/klee/Release+Asserts/main.o: In function`llvm::cl::OptionValue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::OptionValue()':
/usr/lib/llvm-3.4/build/include/llvm/Support/CommandLine.h:454: undefined reference to `vtable for llvm::cl::OptionValue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
/home/toor/klee/klee_build/klee/tools/klee/Release+Asserts/main.o: In function`llvm::cl::opt<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, false, llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::opt<llvm::cl::desc, llvm::cl::FormattingFlags, llvm::cl::initializer<char [2]> >(llvm::cl::desc const&, llvm::cl::FormattingFlags const&, llvm::cl::initializer<char [2]> const&)':
/usr/lib/llvm-3.4/build/include/llvm/Support/CommandLine.h:1218: undefined reference to `vtable for llvm::cl::opt<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, false, llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >'
/home/toor/klee/klee_build/klee/tools/klee/Release+Asserts/main.o: In function`llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::parser()':
/usr/lib/llvm-3.4/build/include/llvm/Support/CommandLine.h:905: undefined reference to `vtable for llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
/home/toor/klee/klee_build/klee/tools/klee/Release+Asserts/main.o: In function`llvm::cl::OptionValue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::OptionValue()':
/usr/lib/llvm-3.4/build/include/llvm/Support/CommandLine.h:454: undefined reference to `vtable for llvm::cl::OptionValue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
/home/toor/klee/klee_build/klee/tools/klee/Release+Asserts/main.o: In function`llvm::cl::opt<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, false, llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::opt<char [12], llvm::cl::desc, llvm::cl::initializer<char [5]> >(char const (&) [12], llvm::cl::desc const&, llvm::cl::initializer<char [5]> const&)':
/usr/lib/llvm-3.4/build/include/llvm/Support/CommandLine.h:1218: undefined reference to `vtable for llvm::cl::opt<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, false, llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >'
/home/toor/klee/klee_build/klee/tools/klee/Release+Asserts/main.o: In function`llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::parser()':
/usr/lib/llvm-3.4/build/include/llvm/Support/CommandLine.h:905: undefined reference to `vtable for llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
/home/toor/klee/klee_build/klee/tools/klee/Release+Asserts/main.o: In function`llvm::cl::OptionValue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::OptionValue()':
/usr/lib/llvm-3.4/build/include/llvm/Support/CommandLine.h:454: undefined reference to `vtable for llvm::cl::OptionValue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
/home/toor/klee/klee_build/klee/tools/klee/Release+Asserts/main.o: In function`llvm::cl::opt<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, false, llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::opt<char [8], llvm::cl::desc>(char const (&) [8], llvm::cl::desc const&)':
/usr/lib/llvm-3.4/build/include/llvm/Support/CommandLine.h:1210: undefined reference to `vtable for llvm::cl::opt<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, false, llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >'
/home/toor/klee/klee_build/klee/tools/klee/Release+Asserts/main.o: In function`llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::parser()':
/usr/lib/llvm-3.4/build/include/llvm/Support/CommandLine.h:905: undefined reference to `vtable for llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
/home/toor/klee/klee_build/klee/tools/klee/Release+Asserts/main.o: In function`llvm::cl::OptionValue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::OptionValue()':
/usr/lib/llvm-3.4/build/include/llvm/Support/CommandLine.h:454: undefined reference to `vtable for llvm::cl::OptionValue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
/home/toor/klee/klee_build/klee/tools/klee/Release+Asserts/main.o: In function`llvm::cl::opt<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, false, llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::opt<char [11], llvm::cl::desc, llvm::cl::initializer<char [1]> >(char const (&) [11], llvm::cl::desc const&, llvm::cl::initializer<char [1]> const&)':
/usr/lib/llvm-3.4/build/include/llvm/Support/CommandLine.h:1218: undefined reference to `vtable for llvm::cl::opt<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, false, llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >'
/home/toor/klee/klee_build/klee/tools/klee/Release+Asserts/main.o: In function`llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::parser()':
/usr/lib/llvm-3.4/build/include/llvm/Support/CommandLine.h:905: undefined reference to `vtable for llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
/usr/lib/llvm-3.4/build/include/llvm/Support/CommandLine.h:905: undefined reference to`vtable for llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
/home/toor/klee/klee_build/klee/tools/klee/Release+Asserts/main.o: In function `llvm::cl::OptionValue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::OptionValue()':
/usr/lib/llvm-3.4/build/include/llvm/Support/CommandLine.h:454: undefined reference to`vtable for llvm::cl::OptionValue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
/home/toor/klee/klee_build/klee/tools/klee/Release+Asserts/main.o: In function `llvm::cl::opt<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, false, llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::opt<char [12], llvm::cl::desc, llvm::cl::value_desc>(char const (&) [12], llvm::cl::desc const&, llvm::cl::value_desc const&)':
/usr/lib/llvm-3.4/build/include/llvm/Support/CommandLine.h:1218: undefined reference to`vtable for llvm::cl::opt<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, false, llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >'
/home/toor/klee/klee_build/klee/tools/klee/Release+Asserts/main.o: In function `main':
/home/toor/klee/klee_src/tools/klee/main.cpp:1225: undefined reference to`llvm::getLazyBitcodeModule(llvm::MemoryBuffer_, llvm::LLVMContext&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >_)'
/home/toor/klee/klee_src/tools/klee/main.cpp:1228: undefined reference to `llvm::Module::MaterializeAllPermanently(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >_)'
/home/toor/klee/klee_src/tools/klee/main.cpp:1222: undefined reference to `llvm::error_code::message[abi:cxx11]() const'
/home/toor/klee/klee_build/klee/tools/klee/Release+Asserts/main.o: In function`llvm::cl::opt<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, false, llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::~opt()':
/usr/lib/llvm-3.4/build/include/llvm/Support/CommandLine.h:1149: undefined reference to `vtable for llvm::cl::opt<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, false, llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >'
/home/toor/klee/klee_build/klee/Release+Asserts/lib/libkleeCore.a(Executor.o): In function`klee::Executor::terminateStateEarly(klee::ExecutionState&, llvm::Twine const&)':
/home/toor/klee/klee_src/lib/Core/Executor.cpp:2658: undefined reference to `llvm::Twine::str[abi:cxx11]() const'
/home/toor/klee/klee_build/klee/Release+Asserts/lib/libkleeCore.a(Executor.o): In function`klee::Executor::terminateStateOnError(klee::ExecutionState&, llvm::Twine const&, char const_, llvm::Twine const&)':
/home/toor/klee/klee_src/lib/Core/Executor.cpp:2716: undefined reference to `llvm::Twine::str[abi:cxx11]() const'
/home/toor/klee/klee_src/lib/Core/Executor.cpp:2742: undefined reference to`llvm::Twine::str[abi:cxx11]() const'
/home/toor/klee/klee_build/klee/Release+Asserts/lib/libkleeCore.a(ExternalDispatcher.o): In function `klee::ExternalDispatcher::ExternalDispatcher()':
/home/toor/klee/klee_src/lib/Core/ExternalDispatcher.cpp:92: undefined reference to`llvm::ExecutionEngine::createJIT(llvm::Module_, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >_, llvm::JITMemoryManager_, llvm::CodeGenOpt::Level, bool, llvm::Reloc::Model, llvm::CodeModel::Model)'
/home/toor/klee/klee_build/klee/Release+Asserts/lib/libkleeCore.a(ExternalDispatcher.o): In function `llvm::sys::DynamicLibrary::LoadLibraryPermanently(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)':
/usr/lib/llvm-3.4/build/include/llvm/Support/DynamicLibrary.h:77: undefined reference to`llvm::sys::DynamicLibrary::getPermanentLibrary(char const_, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >_)'
/home/toor/klee/klee_build/klee/Release+Asserts/lib/libkleeModule.a(KModule.o): In function `llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::parser()':
/usr/lib/llvm-3.4/build/include/llvm/Support/CommandLine.h:905: undefined reference to`vtable for llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
/home/toor/klee/klee_build/klee/Release+Asserts/lib/libkleeModule.a(LowerSwitch.o):(.data.rel.ro._ZTVN4klee15LowerSwitchPassE[_ZTVN4klee15LowerSwitchPassE]+0x40): undefined reference to `llvm::FunctionPass::createPrinterPass(llvm::raw_ostream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/home/toor/klee/klee_build/klee/Release+Asserts/lib/libkleeModule.a(ModuleUtil.o): In function`klee::linkWithLibrary(llvm::Module_, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/toor/klee/klee_src/lib/Module/ModuleUtil.cpp:400: undefined reference to `llvm::error_code::message[abi:cxx11]() const'
/home/toor/klee/klee_src/lib/Module/ModuleUtil.cpp:386: undefined reference to`llvm::ParseBitcodeFile(llvm::MemoryBuffer_, llvm::LLVMContext&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >_)'
/home/toor/klee/klee_src/lib/Module/ModuleUtil.cpp:389: undefined reference to `llvm::Linker::LinkModules(llvm::Module_, llvm::Module_, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >_)'
/home/toor/klee/klee_src/lib/Module/ModuleUtil.cpp:243: undefined reference to `llvm::error_code::message[abi:cxx11]() const'
/home/toor/klee/klee_src/lib/Module/ModuleUtil.cpp:251: undefined reference to`llvm::ParseBitcodeFile(llvm::MemoryBuffer_, llvm::LLVMContext&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >_)'
/home/toor/klee/klee_src/lib/Module/ModuleUtil.cpp:320: undefined reference to `llvm::Linker::LinkModules(llvm::Module*, llvm::Module*, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/home/toor/klee/klee_src/lib/Module/ModuleUtil.cpp:277: undefined reference to`llvm::error_code::message[abi:cxx11]() const'
/home/toor/klee/klee_build/klee/Release+Asserts/lib/libkleeModule.a(Optimize.o): In function `llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::parser(llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > const&)':
/usr/lib/llvm-3.4/build/include/llvm/Support/CommandLine.h:905: undefined reference to`vtable for llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
/home/toor/klee/klee_build/klee/Release+Asserts/lib/libkleeModule.a(Optimize.o): In function `void llvm::cl::opt_storage<llvm::PluginLoader, false, true>::setValue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)':
/usr/lib/llvm-3.4/build/include/llvm/Support/CommandLine.h:1101: undefined reference to`llvm::PluginLoader::operator=(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/toor/klee/klee_build/klee/Release+Asserts/lib/libkleeModule.a(Optimize.o): In function `llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::parser()':
/usr/lib/llvm-3.4/build/include/llvm/Support/CommandLine.h:905: undefined reference to`vtable for llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
/home/toor/klee/klee_build/klee/Release+Asserts/lib/libkleeModule.a(PhiCleaner.o):(.data.rel.ro._ZTVN4klee14PhiCleanerPassE[_ZTVN4klee14PhiCleanerPassE]+0x40): undefined reference to `llvm::FunctionPass::createPrinterPass(llvm::raw_ostream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/home/toor/klee/klee_build/klee/Release+Asserts/lib/libkleeModule.a(RaiseAsm.o): In function`klee::RaiseAsmPass::runOnModule(llvm::Module&)':
/home/toor/klee/klee_src/lib/Module/RaiseAsm.cpp:64: undefined reference to `llvm::sys::getDefaultTargetTriple[abi:cxx11]()'
/home/toor/klee/klee_src/lib/Module/RaiseAsm.cpp:68: undefined reference to`llvm::TargetRegistry::lookupTarget(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
/home/toor/klee/klee_build/klee/Release+Asserts/lib/libkleeModule.a(RaiseAsm.o):(.data.rel.ro._ZTVN4klee12RaiseAsmPassE[_ZTVN4klee12RaiseAsmPassE]+0x40): undefined reference to `llvm::ModulePass::createPrinterPass(llvm::raw_ostream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/home/toor/klee/klee_build/klee/Release+Asserts/lib/libkleeModule.a(Checks.o):(.data.rel.ro._ZTVN4klee12DivCheckPassE[_ZTVN4klee12DivCheckPassE]+0x40): undefined reference to`llvm::ModulePass::createPrinterPass(llvm::raw_ostream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/home/toor/klee/klee_build/klee/Release+Asserts/lib/libkleeModule.a(Checks.o):(.data.rel.ro._ZTVN4klee18OvershiftCheckPassE[_ZTVN4klee18OvershiftCheckPassE]+0x40): undefined reference to `llvm::ModulePass::createPrinterPass(llvm::raw_ostream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/home/toor/klee/klee_build/klee/Release+Asserts/lib/libkleeModule.a(IntrinsicCleaner.o):(.data.rel.ro._ZTVN4klee20IntrinsicCleanerPassE[_ZTVN4klee20IntrinsicCleanerPassE]+0x40): undefined reference to`llvm::ModulePass::createPrinterPass(llvm::raw_ostream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/home/toor/klee/klee_build/klee/Release+Asserts/lib/libkleaverSolver.a(QueryLoggingSolver.o): In function `QueryLoggingSolver::QueryLoggingSolver(klee::Solver*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)':
/home/toor/klee/klee_src/lib/Solver/QueryLoggingSolver.cpp:37: undefined reference to`llvm::raw_fd_ostream::raw_fd_ostream(char const_, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, llvm::sys::fs::OpenFlags)'
/home/toor/klee/klee_build/klee/Release+Asserts/lib/libkleaverExpr.a(Expr.o): In function `klee::ConstantExpr::toString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int) const':
/home/toor/klee/klee_src/lib/Expr/Expr.cpp:351: undefined reference to`llvm::APInt::toString[abi:cxx11](unsigned int, bool) const'
collect2: error: ld returned 1 exit status
/home/toor/klee/klee_src/Makefile.rules:1389: recipe for target '/home/toor/klee/klee_build/klee/Release+Asserts/bin/klee' failed
make[2]: *_\* [/home/toor/klee/klee_build/klee/Release+Asserts/bin/klee] Error 1
make[2]: Leaving directory '/home/toor/klee/klee_build/klee/tools/klee'
/home/toor/klee/klee_src/Makefile.rules:806: recipe for target 'klee/.makeall' failed
make[1]: **\* [klee/.makeall] Error 2
make[1]: Leaving directory '/home/toor/klee/klee_build/klee/tools'
/home/toor/klee/klee_src/Makefile.rules:747: recipe for target 'all' failed
make: **\* [all] Error 1

Here is my installation file that i have generated based on the docker:

# !/bin/bash -x

if [ "$EUID" -ne 0 ]
  then echo "Please run as root"
  exit
fi

export  LLVM_VERSION=3.4 
export  STP_VERSION=master 
export  DISABLE_ASSERTIONS=0 
export  ENABLE_OPTIMIZED=1 
export  KLEE_UCLIBC=klee_uclibc_v1.0.0 
export  KLEE_SRC=/home/$SUDO_USER/klee/klee_src 
export  COVERAGE=0 
export  BUILD_DIR=/home/$SUDO_USER/klee/klee_build
export  BASE_DIR=/home/$SUDO_USER/klee

sudo apt-get update 
sudo    apt-get -y --no-install-recommends install clang-${LLVM_VERSION} llvm-${LLVM_VERSION} llvm-${LLVM_VERSION}-dev llvm-${LLVM_VERSION}-runtime llvm libcap-dev git subversion cmake make libboost-program-options-dev python3 python3-dev python3-pip perl flex bison libncurses-dev zlib1g-dev patch wget unzip binutils
sudo pip3 install -U lit tabulate
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 50

mkdir ${BASE_DIR}
mkdir ${KLEE_SRC}
git clone https://github.com/klee/klee.git ${KLEE_SRC}
mkdir -p ${BUILD_DIR}

cd ${BUILD_DIR} 
mkdir stp 
cd stp 
${KLEE_SRC}/.travis/stp.sh

cd ${BUILD_DIR} 
mkdir testing-utils 
cd testing-utils
${KLEE_SRC}/.travis/testing-utils.sh

sudo mkdir -p /usr/lib/llvm-${LLVM_VERSION}/build/Release/bin 
sudo ln -s /usr/bin/llvm-config /usr/lib/llvm-${LLVM_VERSION}/build/Release/bin/llvm-config 
sudo ln -s /usr/bin/llvm-dis /usr/lib/llvm-${LLVM_VERSION}/build/Release/bin/llvm-dis 
sudo ln -s /usr/bin/llvm-as /usr/lib/llvm-${LLVM_VERSION}/build/Release/bin/llvm-as  
sudo ln -s /usr/bin/llvm-link /usr/lib/llvm-${LLVM_VERSION}/build/Release/bin/llvm-link 
sudo ln -s /usr/bin/llvm-ar /usr/lib/llvm-${LLVM_VERSION}/build/Release/bin/llvm-ar 
sudo ln -s /usr/bin/opt /usr/lib/llvm-${LLVM_VERSION}/build/Release/bin/opt 
sudo ln -s /usr/bin/lli /usr/lib/llvm-${LLVM_VERSION}/build/Release/bin/lli  
sudo mkdir -p /usr/lib/llvm-${LLVM_VERSION}/build/include 
sudo ln -s /usr/include/llvm-${LLVM_VERSION}/llvm /usr/lib/llvm-${LLVM_VERSION}/build/include/llvm 
sudo ln -s /usr/include/llvm-c-${LLVM_VERSION}/llvm-c /usr/lib/llvm-${LLVM_VERSION}/build/include/llvm-c 
for static_lib in /usr/lib/llvm-${LLVM_VERSION}/lib/*.a ; do sudo ln -s ${static_lib} /usr/lib/`basename ${static_lib}`; done

cd ${KLEE_SRC}/tools
for tool in FileCheck not; do 
    svn export http://llvm.org/svn/llvm-project/llvm/branches/release_34/utils/${tool} ${tool} ; 
    sed -i 's/^USEDLIBS.*$/LINK_COMPONENTS = support/' ${tool}/Makefile; 
    done 
sed -i '0,/^PARALLEL_DIRS/a PARALLEL_DIRS += FileCheck not' Makefile

sudo ln -s /usr/bin/clang /usr/bin/clang-${LLVM_VERSION} 
sudo ln -s /usr/bin/clang++ /usr/bin/clang++-${LLVM_VERSION}

cd ${BUILD_DIR} 
${KLEE_SRC}/.travis/klee.sh

echo 'export PATH=$PATH:'${BUILD_DIR}'/klee/Release+Asserts/bin' >> /home/$SUDO_USER/klee/.bashrc

i hope we could make it an effort for all and make this type of file like i have tried ...

@labba labba changed the title from complilation issues to compilation issues Feb 9, 2016

@delcypher

This comment has been minimized.

Show comment
Hide comment
@delcypher

delcypher Feb 9, 2016

Contributor

Your issue is that you're trying to link binaries where the ABI used by libstdc++ is different. Here LLVM looks like it was built with a different ABI.

See

https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html

You either need to build LLVM from source or tell KLEE's build system to pass -D_GLIBCXX_USE_CXX11_ABI=0 when building (when configuring set environment variable

CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" /path/to/configure <flags>
Contributor

delcypher commented Feb 9, 2016

Your issue is that you're trying to link binaries where the ABI used by libstdc++ is different. Here LLVM looks like it was built with a different ABI.

See

https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html

You either need to build LLVM from source or tell KLEE's build system to pass -D_GLIBCXX_USE_CXX11_ABI=0 when building (when configuring set environment variable

CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" /path/to/configure <flags>

@delcypher delcypher closed this Feb 9, 2016

@labba

This comment has been minimized.

Show comment
Hide comment
@labba

labba Feb 9, 2016

ok i have solved it by adding lines that will remove my ubuntu 15 gcc and g++ and install the gcc and g++ 4.8 . this solved the issue and this will successfully install klee native!

Thanks!

labba commented Feb 9, 2016

ok i have solved it by adding lines that will remove my ubuntu 15 gcc and g++ and install the gcc and g++ 4.8 . this solved the issue and this will successfully install klee native!

Thanks!

@gfursin gfursin referenced this issue in SamAinsworth/reproduce-cgo2017-paper Nov 28, 2016

Closed

Strange problem with plugin on ARM64 #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment