hi,
I tried the compilation again on SUSE linux. Because I used ccls in my own ubuntu very smoothly and like it very much.
with command like below:
export LD_LIBRARY_PATH=/home/xxx/git/clang+llvm-9.0.0-x86_64-linux-sles11.3/lib:/home/ezhonke/software/GCC_75/lib:$LD_LIBRARY_PATH
export PATH=/home/xxx/git/clang+llvm-9.0.0-x86_64-linux-sles11.3/bin:/home/ezhonke/software/GCC_75/bin:$PATH
/home/xxx/software/cmake-3.16.4-Linux-x86_64/bin/cmake -H. -BRelease -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/home/ezhonke/git/clang+llvm-9.0.0-x86_64-linux-sles11.3
– The CXX compiler identification is GNU 7.5.0
– Check for working CXX compiler: /home/ezhonke/software/GCC_75/bin/c++
– Check for working CXX compiler: /home/ezhonke/software/GCC_75/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Looking for C++ include pthread.h
– Looking for C++ include pthread.h - found
– Performing Test CMAKE_HAVE_LIBC_PTHREAD
– Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
– Check if compiler accepts -pthread
– Check if compiler accepts -pthread - yes
– Found Threads: TRUE
fatal: No names found, cannot describe anything.
– Configuring done
– Generating done
– Build files have been written to: /home/xxx/git/ccls/Release
cmake --build Release
Now it can compile, but link failure:
[ 2%] Linking CXX executable ccls
/usr/bin/ld: CMakeFiles/ccls.dir/src/indexer.cc.o: in function `ccls::(anonymous namespace)::IndexDataConsumer::getUsr(clang::Decl const*, ccls::(anonymous namespace)::IndexParam::DeclInfo**) const':
indexer.cc:(.text+0x3282): undefined reference to `clang::DeclarationName::getAsString[abi:cxx11]() const'
/usr/bin/ld: CMakeFiles/ccls.dir/src/indexer.cc.o: in function `ccls::(anonymous namespace)::IndexFrontendAction::CreateASTConsumer(clang::CompilerInstance&, llvm::StringRef)':
indexer.cc:(.text+0x3daa): undefined reference to `clang::MultiplexConsumer::MultiplexConsumer(std::vector<std::unique_ptr<clang::ASTConsumer, std::default_delete<clang::ASTConsumer> >, std::allocator<std::unique_ptr<clang::ASTConsumer, std::default_delete<clang::ASTConsumer> > > >)'
/usr/bin/ld: CMakeFiles/ccls.dir/src/indexer.cc.o: in function `ccls::(anonymous namespace)::IndexPPCallbacks::MacroDefined(clang::Token const&, clang::MacroDirective const*)':
indexer.cc:(.text+0x51a0): undefined reference to `llvm::Twine::str[abi:cxx11]() const'
/usr/bin/ld: indexer.cc:(.text+0x5207): undefined reference to `llvm::Twine::str[abi:cxx11]() const'
/usr/bin/ld: CMakeFiles/ccls.dir/src/indexer.cc.o: in function `ccls::(anonymous namespace)::IndexDataConsumer::handleDeclOccurence(clang::Decl const*, unsigned int, llvm::ArrayRef<clang::index::SymbolRelation>, clang::SourceLocation, clang::index::IndexDataConsumer::ASTNodeInfo)':
indexer.cc:(.text+0x6b91): undefined reference to `llvm::Twine::str[abi:cxx11]() const'
/usr/bin/ld: indexer.cc:(.text+0x86a7): undefined reference to `llvm::Twine::str[abi:cxx11]() const'
/usr/bin/ld: indexer.cc:(.text+0x8ae5): undefined reference to `llvm::Twine::str[abi:cxx11]() const'
Do I need to set some env_variables? It seems that lots of clang source missing.