13

(Using 19.10 fully uptodate)

I am using cmake to build emacs irony server

Cmake is further loading a llvm cmake file;

/usr/lib/llvm-8/lib/cmake/clang/ClangTargets.cmake

and this tests for existence of file

/usr/lib/llvm-8/lib/libclangBasic.a

This is the same for llvm-9 package. So my conclusion is that the packaging of llvm dev is broken and has been broken for sometime, I have seen other people report this broken package as well.

Other than downloading llvm/clang and building is there a workaround.

Additionally, can you fix the package going forward?

2 Answers 2

21

If anyone is interested i found the solution to my own problem!

Stupidly I was missing a further clang-dev package install. I had convinced myself there was a problem with my install as i had seen the identical issue talk about on the Web.

3
  • 17
    It's libclang-dev or libclang-9-dev in my case. Apr 8, 2020 at 4:26
  • This solved the problem in my case!
    – 71GA
    Jan 7, 2023 at 20:29
  • Might also need a CMake flag like -DCMAKE_PREFIX_PATH=/usr/lib/llvm-17 to let it find a specific version.
    – rustyx
    Apr 13 at 9:39
0

A couple of years later, the problem keeps reappearing: if several versions of Clang or LLVM are installed on a system, CMake will search for libclangBasic.a in the wrong place.

Obvious solution: purge all outdated Clang and LLVM packages.

If feasible, don't manually install any packages with version number in their names. Only use generic packages like llvm-dev, libclang-dev.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .