MaskRay / ccls

C/C++/ObjC language server supporting cross references, hierarchies, completion and semantic highlighting
Apache License 2.0
3.72k stars 254 forks source link

The imported target "clangBasic" references the file,but this file does not exist. #924

Closed Re-restart closed 1 year ago

Re-restart commented 1 year ago

My error is as follows:

CMake Error at /usr/lib/llvm-14/lib/cmake/clang/ClangTargets.cmake:750 (message):
  The imported target "clangBasic" references the file

     "/usr/lib/llvm-14/lib/libclangBasic.a"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/usr/lib/llvm-14/lib/cmake/clang/ClangTargets.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /usr/lib/cmake/clang-14/ClangConfig.cmake:19 (include)
  CMakeLists.txt:72 (find_package)
MaskRay commented 1 year ago

ccls/CMakeLists.txt correctly refers to CLANG_LINK_CLANG_DYLIB. If it is off, libclangBasic.a will be needed. Your system needs to provide /usr/lib/llvm-14/lib/libclangBasic.a