0
0

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 3 years have passed since last update.

macOS Mojave 10.14 で YouCompleteMe のインストール時に起きる問題の解消方法

Posted at

概要

vimって極めればvscode並のIDEになるんじゃないの? - @ulwluを参考にVimをカスタマイズしていたところ YouCompleteMe でいくつか問題があったためまとめます。

YouCompleteMe インストール

現在のvimrcはこれ→ dotfiles/dotfiles/.vimrc

にはYouCompleteMeが記載されていなかったため個別で入れてみました。

「macos YouCompleteMe install」で検索すると ChengLong/InstructionsForYCM-Mac.md を見つけて次のように実行しました。

$ brew install cmake
$ cd ~/.vim/bundle
$ git clone https://github.com/Valloric/YouCompleteMe.git
$ mkdir YouCompleteMe/ycmbuild
$ cd YouCompleteMe
$ git submodule update --init --recursive
$ cd ycmbuild
$ cmake -G "Unix Makefiles" . ~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/
$ make ycm_core

fatal error: 'filesystem' file not found

最後の make ycm_core で次のようなエラーが出ました。

$ make ycm_core
Scanning dependencies of target ycm_core
[  6%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Candidate.cpp.o
[ 12%] Building CXX object ycm/CMakeFiles/ycm_core.dir/CandidateRepository.cpp.o
In file included from /Users/gremito/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/CandidateRepository.cpp:19:
/Users/gremito/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/Utils.h:23:10: fatal error: 'filesystem' file not found
# include <filesystem>
         ^~~~~~~~~~~~
1 error generated.
make[3]: *** [ycm/CMakeFiles/ycm_core.dir/CandidateRepository.cpp.o] Error 1
make[2]: *** [ycm/CMakeFiles/ycm_core.dir/all] Error 2
make[1]: *** [ycm/CMakeFiles/ycm_core.dir/rule] Error 2
make: *** [ycm_core] Error 2

older ycmd

ググったところ osx 10.14.6 install latest version failure #3805 を見つけて次のように最新バージョンでは macOS 10.15 以上でないと使えないと言われていました。

We've moved to C++17 and are using std::filesystem, which is only available since macOS 10.15. For macOS 10.14, either check out an older YCM commit, or use an older ycmd commit.

2021/02/23 19:42 のコメントで解決しました。

$ cd /path/to/YouCompleteMe
$ git fetch origin
$ git checkout legacy-c++11
$ git submodule update --init --recursive
$ ./install.py

 

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?