Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M-x irony-install-server fails #573

Open
gavinhughes opened this issue Nov 13, 2020 · 6 comments
Open

M-x irony-install-server fails #573

gavinhughes opened this issue Nov 13, 2020 · 6 comments

Comments

@gavinhughes
Copy link

Attempting to install the irony server through M-x irony-install-server returns the following:

-*- mode: compilation; default-directory: "/var/folders/zq/7w9sl6hd41q3zczmbsym_fx00000gp/T/build-irony-server-1.4.0/" -*-
Compilation started at Fri Nov 13 16:59:32

cmake -DCMAKE_INSTALL_PREFIX\=/Users/gavinhughes/.emacs.d/.local/etc/irony-server/  /Users/gavinhughes/.emacs.d/.local/straight/build-27.0.50/irony/server && cmake --build . --use-stderr --config Release --target install
CMake Warning at src/CMakeLists.txt:4 (find_package):
  By not providing "FindClang.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Clang", but
  CMake did not find one.

  Could not find a package configuration file provided by "Clang" with any of
  the following names:

    ClangConfig.cmake
    clang-config.cmake

  Add the installation prefix of "Clang" to CMAKE_PREFIX_PATH or set
  "Clang_DIR" to a directory containing one of the above files.  If "Clang"
  provides a separate development package or SDK, be sure it has been
  installed.


CMake Error at /usr/local/Cellar/cmake/3.17.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
  Could NOT find LibClang (missing: LIBCLANG_LIBRARY LIBCLANG_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.17.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
  cmake/modules/FindLibClang.cmake:94 (find_package_handle_standard_args)
  src/CMakeLists.txt:28 (find_package)


-- Configuring incomplete, errors occurred!
See also "/private/var/folders/zq/7w9sl6hd41q3zczmbsym_fx00000gp/T/build-irony-server-1.4.0/CMakeFiles/CMakeOutput.log".
See also "/private/var/folders/zq/7w9sl6hd41q3zczmbsym_fx00000gp/T/build-irony-server-1.4.0/CMakeFiles/CMakeError.log".

Compilation exited abnormally with code 1 at Fri Nov 13 16:59:33

Searched for the following files but none are present on my system:

FindClang.cmake
ClangConfig.cmake
clang-config.cmake
@309631
Copy link

309631 commented Mar 7, 2022

I have same problem, did you menage to solve it?

@309631
Copy link

309631 commented Mar 7, 2022

-- mode: compilation; default-directory: "/tmp/build-irony-server-1.5.0/" --
Compilation started at Mon Mar 7 15:28:36

cmake -DCMAKE_INSTALL_PREFIX=/home/uuu/.emacs.d/irony/ /home/uuu/.emacs.d/elpa/irony-20220110.849/server && cmake --build . --use-stderr --config Release --target install
CMake Warning at src/CMakeLists.txt:4 (find_package):
By not providing "FindClang.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Clang", but
CMake did not find one.

Could not find a package configuration file provided by "Clang" with any of
the following names:

ClangConfig.cmake
clang-config.cmake

Add the installation prefix of "Clang" to CMAKE_PREFIX_PATH or set
"Clang_DIR" to a directory containing one of the above files. If "Clang"
provides a separate development package or SDK, be sure it has been
installed.

CMake Error at /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
Could NOT find LibClang (missing: LIBCLANG_LIBRARY LIBCLANG_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE)
cmake/modules/FindLibClang.cmake:94 (find_package_handle_standard_args)
src/CMakeLists.txt:28 (find_package)

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

Compilation exited abnormally with code 1 at Mon Mar 7 15:28:36

@309631
Copy link

309631 commented Mar 7, 2022

I have found a solution - I have install clangd

@m-aXimilian
Copy link

m-aXimilian commented Mar 17, 2022

I had the same problem on Fedora 35.
Installing

  • clang-devel-13.0.0 and
  • llvm-devel-13.0.0

(additionally to cmake, clang, and llvm) solved it for me.

@rnikander
Copy link

Fails for me on macOS. I downloaded a binary release of clang 15. It would be nice to have some instruction on how to point this build at that directory.

@sfc-gh-randerson
Copy link

On MacOS, using homebrew, I ended up doing setting all of these environment variables:

export PATH=/opt/homebrew/opt/llvm/bin:$PATH
export LDFLAGS=-L/opt/homebrew/opt/llvm/lib
export CPPFLAGS=-I/opt/homebrew/opt/llvm/include
export LIBRARY_PATH=/opt/homebrew/opt/llvm/lib/

and then manually running the cmake commands outside of emacs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants