Quantcast

Compile Clang 4.0 from source using LLVM_CONFIG

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Compile Clang 4.0 from source using LLVM_CONFIG

Martin J. O'Riordan via cfe-dev

I'm trying to compile clang from source without compiling all the llvm stack
but using a prebuild one and using LLVM_CONFIG to point to it.
I have llvm from http://releases.llvm.org/4.0.0/clang+llvm-4.0.0-debina8.tar.xz 
and the clang source from http://releases.llvm.org/4.0.0/cfe-4.0.0.src.tar.xz

After unpacking everything I ran:

cmake -DLLVM_CONFIG=$PWD/../clang+llvm/bin/llvm-config ../clang-src
make -j8


The compilation process goes fine until the liking for clang itself.
Following the error that I got.
Do I miss something?

../../lib/libclangCodeGen.a(BackendUtil.cpp.o): In function `(anonymous namespace)::EmitAssemblyHelper::EmitAssemblyWithNewPassManager(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >)':
BackendUtil.cpp:(.text._ZN12_GLOBAL__N_118EmitAssemblyHelper30EmitAssemblyWithNewPassManagerEN5clang13BackendActionESt10unique_ptrIN4llvm17raw_pwrite_streamESt14default_deleteIS5_EE+0x12f): undefined reference to `llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>::AnalysisManager(bool)'
BackendUtil.cpp:(.text._ZN12_GLOBAL__N_118EmitAssemblyHelper30EmitAssemblyWithNewPassManagerEN5clang13BackendActionESt10unique_ptrIN4llvm17raw_pwrite_streamESt14default_deleteIS5_EE+0x143): undefined reference to `llvm::AnalysisManager<llvm::Function>::AnalysisManager(bool)'
BackendUtil.cpp:(.text._ZN12_GLOBAL__N_118EmitAssemblyHelper30EmitAssemblyWithNewPassManagerEN5clang13BackendActionESt10unique_ptrIN4llvm17raw_pwrite_streamESt14default_deleteIS5_EE+0x157): undefined reference to `llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>::AnalysisManager(bool)'
BackendUtil.cpp:(.text._ZN12_GLOBAL__N_118EmitAssemblyHelper30EmitAssemblyWithNewPassManagerEN5clang13BackendActionESt10unique_ptrIN4llvm17raw_pwrite_streamESt14default_deleteIS5_EE+0x16b): undefined reference to `llvm::AnalysisManager<llvm::Module>::AnalysisManager(bool)'
BackendUtil.cpp:(.text._ZN12_GLOBAL__N_118EmitAssemblyHelper30EmitAssemblyWithNewPassManagerEN5clang13BackendActionESt10unique_ptrIN4llvm17raw_pwrite_streamESt14default_deleteIS5_EE+0x1ab): undefined reference to `llvm::PassBuilder::registerModuleAnalyses(llvm::AnalysisManager<llvm::Module>&)'
BackendUtil.cpp:(.text._ZN12_GLOBAL__N_118EmitAssemblyHelper30EmitAssemblyWithNewPassManagerEN5clang13BackendActionESt10unique_ptrIN4llvm17raw_pwrite_streamESt14default_deleteIS5_EE+0x1c4): undefined reference to `llvm::PassBuilder::registerCGSCCAnalyses(llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&)'
BackendUtil.cpp:(.text._ZN12_GLOBAL__N_118EmitAssemblyHelper30EmitAssemblyWithNewPassManagerEN5clang13BackendActionESt10unique_ptrIN4llvm17raw_pwrite_streamESt14default_deleteIS5_EE+0x1dd): undefined reference to `llvm::PassBuilder::registerFunctionAnalyses(llvm::AnalysisManager<llvm::Function>&)'
BackendUtil.cpp:(.text._ZN12_GLOBAL__N_118EmitAssemblyHelper30EmitAssemblyWithNewPassManagerEN5clang13BackendActionESt10unique_ptrIN4llvm17raw_pwrite_streamESt14default_deleteIS5_EE+0x1f6): undefined reference to `llvm::PassBuilder::registerLoopAnalyses(llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>&)'
BackendUtil.cpp:(.text._ZN12_GLOBAL__N_118EmitAssemblyHelper30EmitAssemblyWithNewPassManagerEN5clang13BackendActionESt10unique_ptrIN4llvm17raw_pwrite_streamESt14default_deleteIS5_EE+0x224): undefined reference to `llvm::PassBuilder::crossRegisterProxies(llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>&, llvm::AnalysisManager<llvm::Function>&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::AnalysisManager<llvm::Module>&)'
BackendUtil.cpp:(.text._ZN12_GLOBAL__N_118EmitAssemblyHelper30EmitAssemblyWithNewPassManagerEN5clang13BackendActionESt10unique_ptrIN4llvm17raw_pwrite_streamESt14default_deleteIS5_EE+0x238): undefined reference to `llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module<> >>::PassManager(bool)'
BackendUtil.cpp:(.text._ZN12_GLOBAL__N_118EmitAssemblyHelper30EmitAssemblyWithNewPassManagerEN5clang13BackendActionESt10unique_ptrIN4llvm17raw_pwrite_streamESt14default_deleteIS5_EE+0x2d1): undefined reference to `llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module<> >>::operator=(llvm::AnalysisManager<llvm::Module<> >&&)'
BackendUtil.cpp:(.text._ZN12_GLOBAL__N_118EmitAssemblyHelper30EmitAssemblyWithNewPassManagerEN5clang13BackendActionESt10unique_ptrIN4llvm17raw_pwrite_streamESt14default_deleteIS5_EE+0x553): undefined reference to `llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module<> >>::run(llvm::Module&, llvm::Module<>&)'
../../lib/libclangCodeGen.a(BackendUtil.cpp.o): In function `llvm::TargetLibraryAnalysis::Result& llvm::AnalysisManager<llvm::Function>::getResult<llvm::TargetLibraryAnalysis>(llvm::Function&)':
BackendUtil.cpp:(.text._ZN4llvm15AnalysisManagerINS_8FunctionEIEE9getResultINS_21TargetLibraryAnalysisEEERNT_6ResultERS1_[_ZN4llvm15AnalysisManagerINS_8FunctionEIEE9getResultINS_21TargetLibraryAnalysisEEERNT_6ResultERS1_]+0x6f): undefined reference to `llvm::AnalysisManager<llvm::Function>::getResultImpl(llvm::AnalysisKey*, llvm::Function&)'
../../lib/libclangCodeGen.a(BackendUtil.cpp.o): In function `llvm::detail::PassModel<llvm::Module, llvm::PrintModulePass, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module<> >>::run(llvm::Module&, llvm::Module<>&)':
BackendUtil.cpp:(.text._ZN4llvm6detail9PassModelINS_6ModuleENS_15PrintModulePassENS_17PreservedAnalysesENS_15AnalysisManagerIS2_IEEEIEE3runERS2_RS6_[_ZN4llvm6detail9PassModelINS_6ModuleENS_15PrintModulePassENS_17PreservedAnalysesENS_15AnalysisManagerIS2_IEEEIEE3runERS2_RS6_]+0x30): undefined reference to `llvm::PrintModulePass::run(llvm::Module&, llvm::AnalysisManager<llvm::Module<> >&)'
../../lib/libclangCodeGen.a(BackendUtil.cpp.o): In function `llvm::detail::PassModel<llvm::Module, llvm::BitcodeWriterPass, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module<> >>::run(llvm::Module&, llvm::Module<>&)':
BackendUtil.cpp:(.text._ZN4llvm6detail9PassModelINS_6ModuleENS_17BitcodeWriterPassENS_17PreservedAnalysesENS_15AnalysisManagerIS2_IEEEIEE3runERS2_RS6_[_ZN4llvm6detail9PassModelINS_6ModuleENS_17BitcodeWriterPassENS_17PreservedAnalysesENS_15AnalysisManagerIS2_IEEEIEE3runERS2_RS6_]+0x30): undefined reference to `llvm::BitcodeWriterPass::run(llvm::Module&, llvm::AnalysisManager<llvm::Module<> >&)'
../../lib/libclangCodeGen.a(BackendUtil.cpp.o): In function `llvm::detail::PassModel<llvm::Module, llvm::AlwaysInlinerPass, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module<> >>::run(llvm::Module&, llvm::Module<>&)':
BackendUtil.cpp:(.text._ZN4llvm6detail9PassModelINS_6ModuleENS_17AlwaysInlinerPassENS_17PreservedAnalysesENS_15AnalysisManagerIS2_IEEEIEE3runERS2_RS6_[_ZN4llvm6detail9PassModelINS_6ModuleENS_17AlwaysInlinerPassENS_17PreservedAnalysesENS_15AnalysisManagerIS2_IEEEIEE3runERS2_RS6_]+0x30): undefined reference to `llvm::AlwaysInlinerPass::run(llvm::Module&, llvm::AnalysisManager<llvm::Module<> >&)'
../../lib/libclangCodeGen.a(BackendUtil.cpp.o): In function `llvm::detail::AnalysisResultModel<llvm::Function, llvm::AAManager, llvm::AAResults, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function<> >::Invalidator, true>::invalidate(llvm::Function&, llvm::PreservedAnalyses const&, llvm::AnalysisManager<llvm::Function<> >&)':
BackendUtil.cpp:(.text._ZN4llvm6detail19AnalysisResultModelINS_8FunctionENS_9AAManagerENS_9AAResultsENS_17PreservedAnalysesENS_15AnalysisManagerIS2_IEE11InvalidatorELb1EE10invalidateERS2_RKS5_RS8_[_ZN4llvm6detail19AnalysisResultModelINS_8FunctionENS_9AAManagerENS_9AAResultsENS_17PreservedAnalysesENS_15AnalysisManagerIS2_IEE11InvalidatorELb1EE10invalidateERS2_RKS5_RS8_]+0x30): undefined reference to `llvm::AAResults::invalidate(llvm::Function&, llvm::PreservedAnalyses const&, llvm::AnalysisManager<llvm::Function<> >::Invalidator&)'
collect2: error: ld returned 1 exit status


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Loading...