Sarcasm / irony-mode

A C/C++ minor mode for Emacs powered by libclang
GNU General Public License v3.0
901 stars 98 forks source link

Sarcasm / irony-mode: Unable to build Irony Server #561

Closed aluva closed 4 years ago

aluva commented 4 years ago

Using Debian 10 and GNU Emacs 26.1:

(1) Upgraded from Debian 9 to 10 (2) Installed llvm-10 and clang-10 (3) Removed llvm-7 and clang-7 (4) Installed elpa-irony (5) Removed /tmp/build-irony-server-1.4.0 (6) M-x irony-install-server FAILED:

cmake -DCMAKE_INSTALL_PREFIX\=/home/me/.emacs.d/irony/  /home/me/.emacs.d/elpa/irony-20200130.849/server && cmake --build . --use-stderr --config Release --target install

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

     "/usr/lib/llvm-10/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-10/lib/cmake/clang/ClangTargets.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /usr/lib/cmake/clang-10/ClangConfig.cmake:19 (include)
  src/CMakeLists.txt:4 (find_package)

-- Configuring incomplete, errors occurred!
See also "/tmp/build-irony-server-1.4.0/CMakeFiles/CMakeOutput.log".

Compilation exited abnormally with code 1 at Thu Apr 16 17:34:45
rosslannen commented 4 years ago

libclangBasic.a is provided by the libclang-10-dev package. Try installing that.

aluva commented 4 years ago

libclangBasic.a is provided by the libclang-10-dev package. Try installing that.

Hello Ross: It solved the issue, and compiled! Thank you very much , and I deeply appreciate your help. Shall I close the issue now?

rosslannen commented 4 years ago

@aluva You are welcome. And unless you had any other issues I think closing it would be the right thing, considering it was a libclang installation issue and not a problem with irony-mode itself.

You might also want to mention you found a solution in the reddit post, that is how I found this issue.

aluva commented 4 years ago

@aluva You are welcome. And unless you had any other issues I think closing it would be the right thing, considering it was a libclang installation issue and not a problem with irony-mode itself.

You might also want to mention you found a solution in the reddit post, that is how I found this issue.

Thank you very much Ross. I mentioned it in reddit also.

Maverobot commented 3 years ago

Just in case it is useful for anyone, dpkg -S ${file_path} finds the package which installs the given file. For example,

dpkg -S /usr/lib/llvm-10/lib/libclangBasic.a

# Output:
# libclang-10-dev: /usr/lib/llvm-10/lib/libclangBasic.a