Closed metalmac closed 7 years ago
OK, so the problem is, as you speculate, that the download of clang you have is somehow broken. There's nothing we can do about that.
Can you try installing with ./install.py --clang-completer
(and let it download clang for you) and see if that works? I recommend using our install.py
rather than manually running cmake, etc. as this is how we test it.
Thank you for your reply, Ok, I will try your advice. Meanwhile , I will check my libclang . Howerver, I'm a little confused about two points. Could you explain to me more specifically please ?
./install.py --clang-completer
)have the same effect with the mannually running cmake? So I could choose to use the install.py rather than compiling referring to the Full Installation Guide?Please refer to the full Installation Guide below; the following commands are provided on a best-effort basis and may not work for you.
......
Remember: YCM is a plugin with a compiled component. If you update YCM using Vundle and the ycm_core library APIs have changed (happens rarely), YCM will notify you to recompile it. You should then rerun the install process.
Install development tools and CMake: sudo apt-get install build-essential cmake
Make sure you have Python headers installed: sudo apt-get install python-dev python3-dev.
Compiling YCM with semantic support for C-family languages:
cd ~/.vim/bundle/YouCompleteMe ./install.py --clang-completer
If it means that the install.py
does the YCM compiling and Installing for me automatically?
As before, I thought that I need to compile the whole ycm_core library using CMake with libclang, and then to run the install.py
to complete the installation referring to the Full Installation Guide
and Ubuntu Linux x64 Installation?
@puremourning Thanks again, I resolve the issue according to your adivice. :+1:
But ,it was rather strange that the install.py
download the opensusue version libclang rather than the Ubuntu 14.04.01 LTS for me. Please check the complie log below.
(I recompile the vim and ycm_core due to the vim compiling lack the python support. So it will skipped the download stage.)
#root @ metalmac-PC in ~/.vim/bundle/YouCompleteMe on git:master o [11:05:30]
$ ./install.py --clang-completer
Searching Python 2.7 libraries...
Found Python library: /usr/lib/python2.7/config-i386-linux-gnu/libpython2.7.so
Found Python headers folder: /usr/include/python2.7
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
Your C++ compiler supports C++11, compiling in that mode.
-- Found PythonLibs: /usr/lib/python2.7/config-i386-linux-gnu/libpython2.7.so (found suitable version "2.7.6", minimum required is "2.6")
Using Clang archive: /root/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/../clang_archives/clang+llvm-3.9.0-i586-opensuse13.2.tar.xz
Using libclang to provide semantic completion for C/C++/ObjC
Using external libclang: /tmp/ycm_build.lpTU39/clang+llvm-3.9.0-i586-opensuse13.2/lib/libclang.so.3.9
-- Found PythonInterp: /usr/bin/python (found version "2.7.6")
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/ycm_build.lpTU39
Scanning dependencies of target BoostParts
[ 0%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/path.cpp.o
[ 1%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/windows_file_codecvt.cpp.o
[ 1%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/portability.cpp.o
[ 2%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/operations.cpp.o
[ 3%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/unique_path.cpp.o
[ 3%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/codecvt_error_category.cpp.o
[ 4%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/path_traits.cpp.o
[ 5%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/utf8_codecvt_facet.cpp.o
[ 5%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/date_time/src/posix_time/posix_time_types.cpp.o
[ 6%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/date_time/src/gregorian/greg_weekday.cpp.o
[ 8%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/date_time/src/gregorian/date_generators.cpp.o
[ 8%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/date_time/src/gregorian/gregorian_types.cpp.o
[ 9%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/date_time/src/gregorian/greg_month.cpp.o
[ 10%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/system/src/error_code.cpp.o
[ 10%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/timer/src/auto_timers_construction.cpp.o
[ 11%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/timer/src/cpu_timer.cpp.o
[ 12%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/atomic/src/lockpool.cpp.o
[ 12%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/str.cpp.o
[ 13%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object_protocol.cpp.o
[ 14%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/dict.cpp.o
[ 14%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/wrapper.cpp.o
[ 16%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/life_support.cpp.o
[ 17%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/class.cpp.o
[ 17%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/enum.cpp.o
[ 18%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/stl_iterator.cpp.o
[ 19%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/inheritance.cpp.o
[ 19%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/function_doc_signature.cpp.o
[ 20%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/function.cpp.o
[ 21%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/iterator.cpp.o
[ 21%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/pickle_support.cpp.o
[ 22%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/slice.cpp.o
[ 24%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/errors.cpp.o
[ 24%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/numeric.cpp.o
[ 25%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object_operators.cpp.o
[ 26%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/import.cpp.o
[ 26%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/tuple.cpp.o
[ 27%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/exec.cpp.o
[ 28%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/list.cpp.o
[ 28%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/long.cpp.o
[ 29%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/module.cpp.o
[ 31%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/converter/from_python.cpp.o
[ 31%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/converter/type_id.cpp.o
[ 32%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/converter/builtin_converters.cpp.o
[ 33%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/converter/registry.cpp.o
[ 33%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/converter/arg_to_python_base.cpp.o
[ 34%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/stl_port.cpp.o
[ 35%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_iserializer.cpp.o
[ 35%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/codecvt_null.cpp.o
[ 36%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/polymorphic_oarchive.cpp.o
[ 37%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/binary_iarchive.cpp.o
[ 37%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/extended_type_info_typeid.cpp.o
[ 39%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/text_wiarchive.cpp.o
[ 40%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_text_oprimitive.cpp.o
[ 40%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_text_wiprimitive.cpp.o
[ 41%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/binary_oarchive.cpp.o
[ 42%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/void_cast.cpp.o
[ 42%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/text_oarchive.cpp.o
[ 43%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_text_iprimitive.cpp.o
[ 44%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/xml_oarchive.cpp.o
[ 44%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/xml_wgrammar.cpp.o
[ 45%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_archive.cpp.o
[ 47%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/singleton.cpp.o
[ 47%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_text_woprimitive.cpp.o
[ 48%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/binary_woarchive.cpp.o
[ 49%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/polymorphic_iarchive.cpp.o
[ 49%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_xml_archive.cpp.o
[ 50%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/binary_wiarchive.cpp.o
[ 51%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/archive_exception.cpp.o
[ 51%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_pointer_iserializer.cpp.o
[ 52%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/xml_iarchive.cpp.o
[ 54%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/extended_type_info_no_rtti.cpp.o
[ 54%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/xml_wiarchive.cpp.o
[ 55%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_oserializer.cpp.o
[ 56%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/utf8_codecvt_facet.cpp.o
[ 56%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_serializer_map.cpp.o
[ 57%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_pointer_oserializer.cpp.o
[ 57%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_oarchive.cpp.o
[ 58%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/xml_archive_exception.cpp.o
[ 59%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/extended_type_info.cpp.o
[ 59%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/text_woarchive.cpp.o
[ 60%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_iarchive.cpp.o
[ 62%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/text_iarchive.cpp.o
[ 62%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/xml_grammar.cpp.o
[ 63%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/chrono/src/chrono.cpp.o
[ 64%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/chrono/src/process_cpu_clocks.cpp.o
[ 64%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/chrono/src/thread_clock.cpp.o
[ 65%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/fileiter.cpp.o
[ 66%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/usinstances.cpp.o
[ 66%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/c_regex_traits.cpp.o
[ 67%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/cpp_regex_traits.cpp.o
[ 68%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/instances.cpp.o
[ 68%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/regex_raw_buffer.cpp.o
[ 70%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/posix_api.cpp.o
[ 71%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/cregex.cpp.o
[ 71%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/regex_debug.cpp.o
[ 72%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/w32_regex_traits.cpp.o
[ 73%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/winstances.cpp.o
[ 73%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/icu.cpp.o
[ 74%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/wide_posix_api.cpp.o
[ 75%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/wc_regex_traits.cpp.o
[ 75%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/regex_traits_defaults.cpp.o
[ 77%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/regex.cpp.o
[ 78%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/static_mutex.cpp.o
[ 78%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/smart_ptr/src/sp_debug_hooks.cpp.o
[ 79%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/smart_ptr/src/sp_collector.cpp.o
[ 80%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/exception/src/clone_current_exception_non_intrusive.cpp.o
[ 80%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/thread/src/future.cpp.o
[ 81%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/thread/src/pthread/once.cpp.o
[ 82%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/thread/src/pthread/once_atomic.cpp.o
[ 82%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/thread/src/pthread/thread.cpp.o
Linking CXX static library libBoostParts.a
[ 82%] Built target BoostParts
Scanning dependencies of target ycm_core
[ 83%] Building CXX object ycm/CMakeFiles/ycm_core.dir/IdentifierCompleter.cpp.o
[ 83%] Building CXX object ycm/CMakeFiles/ycm_core.dir/CandidateRepository.cpp.o
[ 85%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Result.cpp.o
[ 86%] Building CXX object ycm/CMakeFiles/ycm_core.dir/PythonSupport.cpp.o
[ 86%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Candidate.cpp.o
[ 87%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/TranslationUnit.cpp.o
[ 88%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/ClangCompleter.cpp.o
[ 88%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/ClangUtils.cpp.o
[ 89%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/CompilationDatabase.cpp.o
[ 90%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/Documentation.cpp.o
[ 90%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/TranslationUnitStore.cpp.o
[ 91%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/Range.cpp.o
[ 93%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/ClangHelpers.cpp.o
[ 93%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/CompletionData.cpp.o
[ 94%] Building CXX object ycm/CMakeFiles/ycm_core.dir/versioning.cpp.o
[ 95%] Building CXX object ycm/CMakeFiles/ycm_core.dir/LetterNode.cpp.o
[ 95%] Building CXX object ycm/CMakeFiles/ycm_core.dir/LetterNodeListMap.cpp.o
[ 96%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Utils.cpp.o
[ 97%] Building CXX object ycm/CMakeFiles/ycm_core.dir/IdentifierUtils.cpp.o
[ 97%] Building CXX object ycm/CMakeFiles/ycm_core.dir/CustomAssert.cpp.o
[ 98%] Building CXX object ycm/CMakeFiles/ycm_core.dir/IdentifierDatabase.cpp.o
[100%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ycm_core.cpp.o
Linking CXX shared library /root/.vim/bundle/YouCompleteMe/third_party/ycmd/ycm_core.so
[100%] Built target ycm_core
# root @ metalmac-PC in ~/.vim/bundle/YouCompleteMe on git:master o [11:14:19]
$
Install.py builds and sets up everything you need :)
The opensuse clang is used intentionally to avoid a dependency issue with libtinfo for many users. Another reason to use the script :)
@puremourning Ok, Thank you, So you mean you wrote the python script to download opensuse clang intentionlly ? I understand now .:)
Issue Prelude
Please complete these steps and check these boxes (by putting an
x
inside the brackets) before filing your issue:vim --version
.:YcmDebugInfo
.:YcmToggleLogs stderr
.Thank you for adhering to this process! It ensures your issue is resolved quickly and that neither your nor our time is needlessly wasted.
Issue Details
[If filing a bug report, please include a list of steps that describe how to reproduce the bug you are experiencing. Also include test code if relevant.]
1. Issue Brief
Today I tried to update my YCM plugin with Vim 8.0, so I followed the Installation Guide as follows
1) Updated my Vim to Vim 8.0.0005 via compiling from source; 2) Downloaded the latest YCM respos from here and did
git submodule update --init --recursive
; 3) Copy YCM to ~./.vim/bundle/YouCompleteMe/ 4) Downloaded the latest Pre-Built libclang (3.9.0) from this site; 5) Compiled the ycm_core with CMake and libclang;But ,it poped out this error at the end of compilation.
Please see the error details at Section 4.
2. OS Environment
VirtualBox 5.1.4 r110228 (Qt5.5.1) - : Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-43-generic i686) Host Machine: Windows 7 Ultimate
3. Relevant Software infos
4. Error Details
Please check the log below
And what's more,It was very strange that the clang-family command occured some error when they were running. I obtained those files from official site ,and use the this download link(http://llvm.org/releases/3.9.0/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz) just exactly same as my OS version.
I wonder maybe there was something wrong with my libclang?
One more question, Do I HAVE TO compile YCM with all semantic support( run the following command) right AFTER compiling the ycm_core ?
Thanks for all the advice :) Have a Nice Day!