
macOS Mojave 10.14에서 YouCompleteMe를 설치할 때 발생하는 문제를 해결하는 방법
2022-10-03 last update
6 minutes reading YouCompleteMe macos Mojave Vim개요
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