Arondight / profile

My GNU/Linux Profiles
MIT License
24 stars 6 forks source link

YCM 可能无法使用color_coded 下载的libclang #4

Closed Arondight closed 8 years ago

Arondight commented 8 years ago

color_coded 使用了3.6 版本的clang

系统clang 版本为3.8。

使用系统clang 编译成功,编译方法为:

./install.py --clang-completer --system-libclang --system-boost

使用color_coded 下载的clang 编译出错,编译方法为:

cd ~/.vim/bundle/YouCompleteMe/build
cmake -G "Unix Makefiles" -DPATH_TO_LLVM_ROOT=$(find ~/.vim/bundle/color_coded/build -maxdepth 1 -type d -name 'clang*') . ~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp
make -j4

编译出错的log 如下:

[ 76%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/TranslationUnit.cpp.o
/root/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/ClangCompleter/TranslationUnit.cpp: In function 'unsigned int YouCompleteMe::{anonymous}::EditingOptions()':
/root/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/ClangCompleter/TranslationUnit.cpp:42:10: error: 'CXTranslationUnit_CreatePreambleOnFirstParse' was not declared in this scope
          CXTranslationUnit_CreatePreambleOnFirstParse |
          ^
/root/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/ClangCompleter/TranslationUnit.cpp: In constructor 'YouCompleteMe::TranslationUnit::TranslationUnit(const string&, const std::vector<UnsavedFile>&, const std::vector<std::__cxx11::basic_string<char> >&, CXIndex)':
/root/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/ClangCompleter/TranslationUnit.cpp:103:51: error: 'clang_parseTranslationUnit2FullArgv' was not declared in this scope
                          &clang_translation_unit_ );
                                                   ^
ycm/CMakeFiles/ycm_core.dir/build.make:278: recipe for target 'ycm/CMakeFiles/ycm_core.dir/ClangCompleter/TranslationUnit.cpp.o' failed
make[2]: *** [ycm/CMakeFiles/ycm_core.dir/ClangCompleter/TranslationUnit.cpp.o] Error 1
CMakeFiles/Makefile2:142: recipe for target 'ycm/CMakeFiles/ycm_core.dir/all' failed
make[1]: *** [ycm/CMakeFiles/ycm_core.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Arondight commented 8 years ago

Ref color_coded #69

Arondight commented 8 years ago

验证了一下,YCM 不支持3.7 以下版本的clang。

Arondight commented 8 years ago

现在YCM 使用自己下载的clang,可以正确make,但是会增加下载量。

Arondight commented 8 years ago

color_coded 已经更新clang 到3.8,现在可以公用一套clang,但是好像color_coded 出了一点问题,解决后需要重新设置下YCM 配置过程,墙内下个clang 太尼玛慢了。

Ref #5