7
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

macOSでemacs irony-serverがコンパイルできない時の対処法

Posted at

自分のためにメモ

ironyはインストール後に自律的にローカルで動かすサーバをコンパイルしようとするが,macOS sierra, high sierraだと Could NOT find LibClang (missing: LIBCLANG_LIBRARY LIBCLANG_INCLUDE_DIR) というようなエラーが出てコンパイルがコケるのでwork aroundな対処法.

ironyはELPAでインストールしているものとする.

homebrewでllvmをインストールする

$ brew install llvm

これはXcodeのllvmとは別に必要

以下のコマンドを実行

$ cd $HOME/.emacs.d/elpa/irony-*/server
$ rm -fr CMakeCache.txt CMakeFiles/
$ mkdir -p build && cd build
$ cmake \
   -DLIBCLANG_INCLUDE_DIR\=/usr/local/opt/llvm/include/ \
   -DLIBCLANG_LIBRARY\=/usr/local/opt/llvm/lib/libclang.dylib \
   -DCMAKE_INSTALL_PREFIX\=$HOME/.emacs.d/irony/ ..
$ cmake --build . --use-stderr --config Release --target install
7
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?