gpt4 book ai didi

vim - YouCompleteMe 安装 CalledProcessError

转载 作者:行者123 更新时间:2023-12-04 21:18:05 27 4
gpt4 key购买 nike

我已经通过 brew 安装了 Cmake 并查看了错误跟踪器和其他有这个问题的人,但我没有找到任何有我问题的人。这是输出中的错误:

Linking CXX shared library /Users/danni/.vim/bundle/YouCompleteMe/third_party/ycmd/ycm_core.so
ld: warning: ignoring file ../clang+llvm-3.7.0-x86_64-linux-gnu-ubuntu-14.04/lib/libclang.so.3.7, file was built for unsupported file format ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ) which is not the architecture being linked (x86_64): ../clang+llvm-3.7.0-x86_64-linux-gnu-ubuntu-14.04/lib/libclang.so.3.7
Undefined symbols for architecture x86_64:
"_clang_Comment_getKind", referenced from:
YouCompleteMe::DocumentationData::DocumentationData(CXCursor const&) in Documentation.cpp.obj
"_clang_CompilationDatabase_dispose", referenced from:
YouCompleteMe::CompilationDatabase::~CompilationDatabase() in CompilationDatabase.cpp.obj
YouCompleteMe::CompilationDatabase::~CompilationDatabase() in CompilationDatabase.cpp.obj
"_clang_CompilationDatabase_fromDirectory", referenced from:
YouCompleteMe::CompilationDatabase::CompilationDatabase(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in CompilationDatabase.cpp.obj
"_clang_CompilationDatabase_getCompileCommands", referenced from:
YouCompleteMe::CompilationDatabase::GetCompilationInfoForFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in CompilationDatabase.cpp.obj
"_clang_CompileCommand_getArg", referenced from:
YouCompleteMe::CompilationDatabase::GetCompilationInfoForFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in CompilationDatabase.cpp.obj
"_clang_CompileCommand_getDirectory", referenced from:
YouCompleteMe::CompilationDatabase::GetCompilationInfoForFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in CompilationDatabase.cpp.obj
"_clang_CompileCommand_getNumArgs", referenced from:
YouCompleteMe::CompilationDatabase::GetCompilationInfoForFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in CompilationDatabase.cpp.obj
"_clang_CompileCommands_dispose", referenced from:
YouCompleteMe::CompilationDatabase::GetCompilationInfoForFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in CompilationDatabase.cpp.obj
"_clang_CompileCommands_getCommand", referenced from:
YouCompleteMe::CompilationDatabase::GetCompilationInfoForFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in CompilationDatabase.cpp.obj
"_clang_CompileCommands_getSize", referenced from:
YouCompleteMe::CompilationDatabase::GetCompilationInfoForFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in CompilationDatabase.cpp.obj
"_clang_Cursor_getBriefCommentText", referenced from:
YouCompleteMe::DocumentationData::DocumentationData(CXCursor const&) in Documentation.cpp.obj
"_clang_Cursor_getParsedComment", referenced from:
YouCompleteMe::DocumentationData::DocumentationData(CXCursor const&) in Documentation.cpp.obj
"_clang_Cursor_getRawCommentText", referenced from:
YouCompleteMe::DocumentationData::DocumentationData(CXCursor const&) in Documentation.cpp.obj
"_clang_Cursor_isNull", referenced from:
YouCompleteMe::CursorIsValid(CXCursor) in ClangUtils.cpp.obj
"_clang_FullComment_getAsXML", referenced from:
YouCompleteMe::DocumentationData::DocumentationData(CXCursor const&) in Documentation.cpp.obj
"_clang_codeCompleteAt", referenced from:
YouCompleteMe::TranslationUnit::CandidatesForLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&) in TranslationUnit.cpp.obj
"_clang_createIndex", referenced from:
YouCompleteMe::ClangCompleter::ClangCompleter() in ClangCompleter.cpp.obj
YouCompleteMe::ClangCompleter::ClangCompleter() in ClangCompleter.cpp.obj
"_clang_defaultCodeCompleteOptions", referenced from:
YouCompleteMe::TranslationUnit::CandidatesForLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&) in TranslationUnit.cpp.obj
"_clang_defaultDiagnosticDisplayOptions", referenced from:
YouCompleteMe::(anonymous namespace)::FullDiagnosticText(void*) in ClangHelpers.cpp.obj
"_clang_defaultEditingTranslationUnitOptions", referenced from:
YouCompleteMe::TranslationUnit::TranslationUnit(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, void*) in TranslationUnit.cpp.obj
"_clang_defaultReparseOptions", referenced from:
YouCompleteMe::TranslationUnit::TranslationUnit(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, void*) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::Reparse(std::__1::vector<CXUnsavedFile, std::__1::allocator<CXUnsavedFile> >&) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::Reparse(std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&) in TranslationUnit.cpp.obj
"_clang_disposeCodeCompleteResults", referenced from:
YouCompleteMe::TranslationUnit::CandidatesForLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&) in TranslationUnit.cpp.obj
"_clang_disposeDiagnostic", referenced from:
YouCompleteMe::TranslationUnit::UpdateLatestDiagnostics() in TranslationUnit.cpp.obj
"_clang_disposeIndex", referenced from:
YouCompleteMe::ClangCompleter::~ClangCompleter() in ClangCompleter.cpp.obj
YouCompleteMe::ClangCompleter::~ClangCompleter() in ClangCompleter.cpp.obj
"_clang_disposeString", referenced from:
YouCompleteMe::CXStringToString(CXString) in ClangUtils.cpp.obj
"_clang_disposeTokens", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
"_clang_disposeTranslationUnit", referenced from:
YouCompleteMe::TranslationUnit::Destroy() in TranslationUnit.cpp.obj
"_clang_equalTypes", referenced from:
YouCompleteMe::TranslationUnit::GetTypeAtLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
"_clang_formatDiagnostic", referenced from:
YouCompleteMe::(anonymous namespace)::FullDiagnosticText(void*) in ClangHelpers.cpp.obj
"_clang_getCString", referenced from:
YouCompleteMe::CXStringToString(CXString) in ClangUtils.cpp.obj
"_clang_getCanonicalCursor", referenced from:
YouCompleteMe::TranslationUnit::GetDeclarationLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetDocsForLocationInFile(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
"_clang_getCanonicalType", referenced from:
YouCompleteMe::TranslationUnit::GetTypeAtLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
"_clang_getChildDiagnostics", referenced from:
YouCompleteMe::(anonymous namespace)::FullDiagnosticText(void*) in ClangHelpers.cpp.obj
"_clang_getClangVersion", referenced from:
YouCompleteMe::ClangVersion() in ClangUtils.cpp.obj
"_clang_getCompletionAvailability", referenced from:
YouCompleteMe::ToCompletionDataVector(CXCodeCompleteResults*) in ClangHelpers.cpp.obj
"_clang_getCompletionBriefComment", referenced from:
YouCompleteMe::CompletionData::CompletionData(CXCompletionResult const&) in CompletionData.cpp.obj
"_clang_getCompletionChunkCompletionString", referenced from:
YouCompleteMe::(anonymous namespace)::OptionalChunkToString(void*, unsigned int) in CompletionData.cpp.obj
"_clang_getCompletionChunkKind", referenced from:
YouCompleteMe::CompletionData::ExtractDataFromChunk(void*, unsigned int, bool&, bool&, bool&) in CompletionData.cpp.obj
YouCompleteMe::(anonymous namespace)::OptionalChunkToString(void*, unsigned int) in CompletionData.cpp.obj
"_clang_getCompletionChunkText", referenced from:
YouCompleteMe::CompletionData::ExtractDataFromChunk(void*, unsigned int, bool&, bool&, bool&) in CompletionData.cpp.obj
YouCompleteMe::(anonymous namespace)::OptionalChunkToString(void*, unsigned int) in CompletionData.cpp.obj
"_clang_getCursor", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
YouCompleteMe::TranslationUnit::GetDeclarationLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetCursor(int, int) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetDefinitionLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetTypeAtLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetEnclosingFunctionAtLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetDocsForLocationInFile(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
...
"_clang_getCursorDefinition", referenced from:
YouCompleteMe::TranslationUnit::GetDefinitionLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
"_clang_getCursorDisplayName", referenced from:
YouCompleteMe::TranslationUnit::GetEnclosingFunctionAtLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
"_clang_getCursorExtent", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
"_clang_getCursorKind", referenced from:
YouCompleteMe::CursorIsValid(CXCursor) in ClangUtils.cpp.obj
YouCompleteMe::CursorIsReference(CXCursor) in ClangUtils.cpp.obj
YouCompleteMe::CursorIsDeclaration(CXCursor) in ClangUtils.cpp.obj
"_clang_getCursorLocation", referenced from:
YouCompleteMe::TranslationUnit::GetDeclarationLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetDefinitionLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
"_clang_getCursorReferenced", referenced from:
YouCompleteMe::TranslationUnit::GetDeclarationLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetDocsForLocationInFile(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
"_clang_getCursorSemanticParent", referenced from:
YouCompleteMe::TranslationUnit::GetEnclosingFunctionAtLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
"_clang_getCursorSpelling", referenced from:
YouCompleteMe::DocumentationData::DocumentationData(CXCursor const&) in Documentation.cpp.obj
"_clang_getCursorType", referenced from:
YouCompleteMe::DocumentationData::DocumentationData(CXCursor const&) in Documentation.cpp.obj
YouCompleteMe::TranslationUnit::GetTypeAtLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
"_clang_getDiagnostic", referenced from:
YouCompleteMe::TranslationUnit::UpdateLatestDiagnostics() in TranslationUnit.cpp.obj
"_clang_getDiagnosticFixIt", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
"_clang_getDiagnosticInSet", referenced from:
YouCompleteMe::(anonymous namespace)::FullDiagnosticText(void*) in ClangHelpers.cpp.obj
"_clang_getDiagnosticLocation", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
"_clang_getDiagnosticNumFixIts", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
"_clang_getDiagnosticNumRanges", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
"_clang_getDiagnosticRange", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
"_clang_getDiagnosticSeverity", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
"_clang_getDiagnosticSpelling", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
"_clang_getExpansionLocation", referenced from:
YouCompleteMe::Location::Location(CXSourceLocation const&) in ClangHelpers.cpp.obj
YouCompleteMe::Location::Location(CXSourceLocation const&) in Range.cpp.obj
YouCompleteMe::Location::Location(CXSourceLocation const&) in TranslationUnit.cpp.obj
"_clang_getFile", referenced from:
YouCompleteMe::TranslationUnit::GetDeclarationLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetCursor(int, int) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetDefinitionLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetTypeAtLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetEnclosingFunctionAtLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetDocsForLocationInFile(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
"_clang_getFileName", referenced from:
YouCompleteMe::CXFileToFilepath(void*) in ClangUtils.cpp.obj
"_clang_getLocation", referenced from:
YouCompleteMe::TranslationUnit::GetDeclarationLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetCursor(int, int) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetDefinitionLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetTypeAtLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetEnclosingFunctionAtLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetDocsForLocationInFile(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
"_clang_getNullCursor", referenced from:
YouCompleteMe::TranslationUnit::GetCursor(int, int) in TranslationUnit.cpp.obj
"_clang_getNumCompletionChunks", referenced from:
YouCompleteMe::CompletionData::CompletionData(CXCompletionResult const&) in CompletionData.cpp.obj
YouCompleteMe::(anonymous namespace)::OptionalChunkToString(void*, unsigned int) in CompletionData.cpp.obj
"_clang_getNumDiagnostics", referenced from:
YouCompleteMe::TranslationUnit::UpdateLatestDiagnostics() in TranslationUnit.cpp.obj
"_clang_getNumDiagnosticsInSet", referenced from:
YouCompleteMe::(anonymous namespace)::FullDiagnosticText(void*) in ClangHelpers.cpp.obj
"_clang_getRangeEnd", referenced from:
YouCompleteMe::Range::Range(CXSourceRange const&) in Range.cpp.obj
"_clang_getRangeStart", referenced from:
YouCompleteMe::Range::Range(CXSourceRange const&) in Range.cpp.obj
"_clang_getTokenLocation", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
"_clang_getTokenSpelling", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
"_clang_getTypeSpelling", referenced from:
YouCompleteMe::DocumentationData::DocumentationData(CXCursor const&) in Documentation.cpp.obj
YouCompleteMe::TranslationUnit::GetTypeAtLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
"_clang_isDeclaration", referenced from:
YouCompleteMe::CursorIsDeclaration(CXCursor) in ClangUtils.cpp.obj
"_clang_isInvalid", referenced from:
YouCompleteMe::CursorIsValid(CXCursor) in ClangUtils.cpp.obj
"_clang_isReference", referenced from:
YouCompleteMe::CursorIsReference(CXCursor) in ClangUtils.cpp.obj
"_clang_parseTranslationUnit", referenced from:
YouCompleteMe::TranslationUnit::TranslationUnit(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, void*) in TranslationUnit.cpp.obj
"_clang_reparseTranslationUnit", referenced from:
YouCompleteMe::TranslationUnit::Reparse(std::__1::vector<CXUnsavedFile, std::__1::allocator<CXUnsavedFile> >&, unsigned int) in TranslationUnit.cpp.obj
"_clang_toggleCrashRecovery", referenced from:
YouCompleteMe::ClangCompleter::ClangCompleter() in ClangCompleter.cpp.obj
YouCompleteMe::ClangCompleter::ClangCompleter() in ClangCompleter.cpp.obj
"_clang_tokenize", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [/Users/danni/.vim/bundle/YouCompleteMe/third_party/ycmd/ycm_core.so] Error 1
make[2]: *** [ycm/CMakeFiles/ycm_core.dir/all] Error 2
make[1]: *** [ycm/CMakeFiles/ycm_support_libs.dir/rule] Error 2
make: *** [ycm_support_libs] Error 2
Traceback (most recent call last):
File "/Users/danni/.vim/bundle/YouCompleteMe/third_party/ycmd/build.py", line 327, in <module>
Main()
File "/Users/danni/.vim/bundle/YouCompleteMe/third_party/ycmd/build.py", line 316, in Main
BuildYcmdLibs( args )
File "/Users/danni/.vim/bundle/YouCompleteMe/third_party/ycmd/build.py", line 261, in BuildYcmdLibs
subprocess.check_call( build_command )
File "/Users/danni/miniconda/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'ycm_support_libs', '--', '-j', '8']' returned non-zero exit status 2
Traceback (most recent call last):
File "./install.py", line 32, in <module>
Main()
File "./install.py", line 21, in Main
subprocess.check_call( [ python_binary, build_file ] + sys.argv[1:] )
File "/Users/danni/miniconda/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/danni/miniconda/bin/python', '/Users/danni/.vim/bundle/YouCompleteMe/third_party/ycmd/build.py', '--clang-completer']' returned non-zero exit status 1

我刚刚通过 brew 安装了最新版本的 Vim 和 CMake,有人能帮我理解这个问题吗?

最佳答案

这看起来像是 YouCompleteMe 设置过程中的一个错误,如果您将其报告给他们的 issue tracker 就好了。 .

是什么让我这么想:

1)输出顶部的警告:

Linking CXX shared library 
/Users/danni/.vim/bundle/YouCompleteMe/third_party/ycmd/ycm_core.so

ld: warning: ignoring file
../clang+llvm-3.7.0-x86_64-linux-gnu-ubuntu-14.04/lib/libclang.so.3.7,
file was built for unsupported file format

2)相关的clang版本检测为 here (如果我没有记错的话)。

它选择了错误的下载 clang (一个用于 Ubuntu 14.04)。

选择 clang 下载的逻辑是:如果定义了“APPLE”变量 - 如果是 windows 则获取 mac os 版本 - 然后赢得版本,否则对于 64 位系统使用“x86_64-linux-gnu-ubuntu-14.04”。

可能的解决方法:

1)如果不需要C族补全,使用 ./install.py没有 --clang-completer 标志

2) 您手动安装正确的 clang 版本并告诉 YouCompleteMe 使用它。
我没试过,但使用安装的clang的命令似乎是 ./install.py --clang-completer --system-libclang .
如果你有 XCode,你可能已经安装了 clang。否则检查 full installation guide在 YCM 文档中。

3) 蛮力 - 更改 YCM 源以获取正确的版本。这不是很好的解决问题的方法,因为您需要在更新 YCM 之前删除您的更改并在更新后将它们放回去,但这样您也可以在设置过程中确认错误:
  • 打开/Users/danni/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/CMakeLists.txt
  • 添加 set( APPLE TRUE )在顶部。
  • 运行 ./install.py --clang-completer再次。
  • 注意:我实际上并没有尝试这种方法,但认为它可以工作。如果出现问题,请尝试在 ycmd 文件夹中搜索其他“CMakeLists.txt”文件并添加 set( APPLE TRUE )给他们。
  • 关于vim - YouCompleteMe 安装 CalledProcessError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34836774/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com