Youcompleteme: Compilation error in CentOS 6.8

Created on 4 Jul 2016  Â·  8Comments  Â·  Source: ycm-core/YouCompleteMe

Issue Prelude

Please complete these steps and check these boxes (by putting an x inside
the brackets) _before_ filing your issue:

  • [x] I have read and understood YCM's CONTRIBUTING document.
  • [x] I have read and understood YCM's CODE_OF_CONDUCT document.
  • [x] I have read and understood YCM's README, especially the
    Frequently Asked Questions section.
  • [x] I have searched YCM's issue tracker to find issues similar to the one I'm
    about to report and couldn't find an answer to my problem. (Example Google
    search.
    )
  • [ ] If filing a bug report, I have included the output of vim --version.
  • [ ] If filing a bug report, I have included the output of :YcmDebugInfo.
  • [ ] If filing a bug report, I have included the output of
    :YcmToggleLogs stderr.
  • [x] If filing a bug report, I have included which OS (including specific OS
    version) I am using.
  • [x] If filing a bug report, I have included a minimal test case that reproduces
    my issue.
  • [x] I understand this is an open-source project staffed by volunteers and
    that any help I receive is a selfless, heartfelt _gift_ of their free time. I
    know I am not entitled to anything and will be polite and courteous.
  • [x] I understand my issue may be closed if it becomes obvious I didn't
    actually perform all of these steps.

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.]

First off I realize that generally speaking compilation errors are due to problems with the distro and this issue may not be relevant here but I was able to pinpoint the specific commit that introduced the failing build.

I am having trouble compiling the new version of YouCompleteMe on CentOS release 6.8 (Final) using ./install.py.

I found out that the problem is actually in the Valloric/ycmd repository. The specific commit that introduces the commit seems to be 4d9d0f1.

NOTE: I made sure to install the dependencies listed here but I am guessing that my version of CentOS simply doesn't have current enough packages: https://valloric.github.io/YouCompleteMe/#fedora-linux-x64

Here is the output during compilation:

-- The C compiler identification is GNU 4.4.7
-- The CXX compiler identification is GNU 4.4.7
-- 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
-- Found PythonLibs: /usr/lib/python2.6/config/libpython2.6.so (found suitable version "2.6.6", minimum required is "2.6")
-- Found PythonInterp: /usr/bin/python (found version "2.6.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.nNibHK
Scanning dependencies of target BoostParts
[  0%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/atomic/src/lockpool.cpp.o
[  1%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/smart_ptr/src/sp_debug_hooks.cpp.o
[  2%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/smart_ptr/src/sp_collector.cpp.o
[  2%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/system/src/error_code.cpp.o
[  3%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/timer/src/auto_timers_construction.cpp.o
[  4%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/timer/src/cpu_timer.cpp.o
[  5%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/chrono/src/chrono.cpp.o
[  5%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/chrono/src/thread_clock.cpp.o
[  6%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/chrono/src/process_cpu_clocks.cpp.o
[  8%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/date_time/src/posix_time/posix_time_types.cpp.o
[  8%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/date_time/src/gregorian/greg_weekday.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/date_time/src/gregorian/gregorian_types.cpp.o
[ 11%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/date_time/src/gregorian/date_generators.cpp.o
[ 11%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/exec.cpp.o
[ 12%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/stl_iterator.cpp.o
[ 13%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/class.cpp.o
[ 13%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/function.cpp.o
[ 14%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/inheritance.cpp.o
[ 16%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/iterator.cpp.o
[ 17%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/pickle_support.cpp.o
[ 17%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/life_support.cpp.o
[ 18%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/function_doc_signature.cpp.o
[ 19%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object/enum.cpp.o
[ 19%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/dict.cpp.o
[ 20%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object_operators.cpp.o
[ 21%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/import.cpp.o
[ 22%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/long.cpp.o
[ 22%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/errors.cpp.o
[ 24%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/converter/registry.cpp.o
[ 25%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/converter/from_python.cpp.o
[ 25%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/converter/builtin_converters.cpp.o
[ 26%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/converter/type_id.cpp.o
[ 27%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/converter/arg_to_python_base.cpp.o
[ 28%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/module.cpp.o
[ 28%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/tuple.cpp.o
[ 29%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/numeric.cpp.o
[ 31%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/wrapper.cpp.o
[ 31%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/list.cpp.o
[ 32%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object_protocol.cpp.o
[ 33%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/str.cpp.o
[ 34%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/slice.cpp.o
[ 34%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/portability.cpp.o
[ 35%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/codecvt_error_category.cpp.o
[ 36%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/path_traits.cpp.o
[ 36%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/utf8_codecvt_facet.cpp.o
[ 37%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/path.cpp.o
[ 39%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/unique_path.cpp.o
[ 40%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/windows_file_codecvt.cpp.o
[ 40%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/operations.cpp.o
[ 41%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/regex_traits_defaults.cpp.o
[ 42%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/icu.cpp.o
[ 42%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/c_regex_traits.cpp.o
[ 43%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/regex_raw_buffer.cpp.o
[ 44%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/regex_debug.cpp.o
[ 45%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/usinstances.cpp.o
[ 45%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/fileiter.cpp.o
[ 47%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/static_mutex.cpp.o
[ 48%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/wide_posix_api.cpp.o
[ 48%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/w32_regex_traits.cpp.o
[ 49%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/cregex.cpp.o
[ 50%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/instances.cpp.o
[ 51%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/winstances.cpp.o
[ 51%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/posix_api.cpp.o
[ 52%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/cpp_regex_traits.cpp.o
[ 54%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/wc_regex_traits.cpp.o
[ 54%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/regex.cpp.o
[ 55%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/archive_exception.cpp.o
[ 56%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/extended_type_info_no_rtti.cpp.o
[ 57%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/stl_port.cpp.o
[ 57%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/xml_grammar.cpp.o
[ 58%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_xml_archive.cpp.o
[ 59%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/extended_type_info_typeid.cpp.o
[ 59%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/binary_wiarchive.cpp.o
[ 60%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/xml_wiarchive.cpp.o
[ 62%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/xml_iarchive.cpp.o
[ 63%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/text_oarchive.cpp.o
[ 63%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/xml_archive_exception.cpp.o
[ 64%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_iserializer.cpp.o
[ 65%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/binary_woarchive.cpp.o
[ 65%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_oarchive.cpp.o
[ 66%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_iarchive.cpp.o
[ 67%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/text_iarchive.cpp.o
[ 68%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/extended_type_info.cpp.o
[ 68%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_text_iprimitive.cpp.o
[ 70%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/utf8_codecvt_facet.cpp.o
[ 71%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_pointer_iserializer.cpp.o
[ 71%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/singleton.cpp.o
[ 72%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/text_wiarchive.cpp.o
[ 73%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_text_woprimitive.cpp.o
[ 74%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/codecvt_null.cpp.o
[ 74%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/xml_wgrammar.cpp.o
[ 75%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/polymorphic_iarchive.cpp.o
[ 77%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_text_wiprimitive.cpp.o
[ 77%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_archive.cpp.o
[ 78%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/xml_oarchive.cpp.o
[ 79%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/binary_iarchive.cpp.o
[ 80%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/binary_oarchive.cpp.o
[ 80%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/polymorphic_oarchive.cpp.o
[ 81%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_oserializer.cpp.o
[ 82%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_text_oprimitive.cpp.o
[ 82%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/void_cast.cpp.o
[ 83%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_serializer_map.cpp.o
[ 85%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/text_woarchive.cpp.o
[ 86%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/serialization/src/basic_pointer_oserializer.cpp.o
[ 86%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/exception/src/clone_current_exception_non_intrusive.cpp.o
[ 87%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/thread/src/future.cpp.o
[ 88%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/thread/src/pthread/once.cpp.o
[ 88%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/thread/src/pthread/once_atomic.cpp.o
[ 89%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/thread/src/pthread/thread.cpp.o
Linking CXX static library libBoostParts.a
[ 89%] Built target BoostParts
Scanning dependencies of target ycm_core
[ 90%] Building CXX object ycm/CMakeFiles/ycm_core.dir/LetterNode.cpp.o
In file included from /home/vagrant/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/ycm/LetterNode.h:22,
                 from /home/vagrant/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/ycm/LetterNode.cpp:18:
/home/vagrant/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/BoostParts/boost/move/unique_ptr.hpp: In member function ‘YouCompleteMe::LetterNodeListMap& YouCompleteMe::LetterNodeListMap::operator=(YouCompleteMe::LetterNodeListMap&)’:
/home/vagrant/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/ycm/LetterNodeListMap.h:65:   instantiated from ‘void std::vector<_Tp, _Alloc>::push_back(const _Tp&) [with _Tp = YouCompleteMe::LetterNode, _Alloc = std::allocator<YouCompleteMe::LetterNode>]’
/home/vagrant/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/ycm/LetterNode.cpp:37:   instantiated from here
/home/vagrant/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/BoostParts/boost/move/unique_ptr.hpp:362: error: ‘boost::movelib::unique_ptr<T, D>& boost::movelib::unique_ptr<T, D>::operator=(boost::movelib::unique_ptr<T, D>&) [with T = boost::array<YouCompleteMe::NearestLetterNodeIndices, 128u>, D = boost::movelib::default_delete<boost::array<YouCompleteMe::NearestLetterNodeIndices, 128u> >]’ is private
/home/vagrant/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/ycm/LetterNodeListMap.h:65: error: within this context
In file included from /home/vagrant/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/ycm/LetterNode.cpp:18:
/home/vagrant/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/ycm/LetterNode.h: In member function ‘YouCompleteMe::LetterNode& YouCompleteMe::LetterNode::operator=(YouCompleteMe::LetterNode&)’:
/home/vagrant/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/ycm/LetterNode.h:35:   instantiated from ‘void std::vector<_Tp, _Alloc>::_M_insert_aux(__gnu_cxx::__normal_iterator<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type::pointer, std::vector<_Tp, _Alloc> >, const _Tp&) [with _Tp = YouCompleteMe::LetterNode, _Alloc = std::allocator<YouCompleteMe::LetterNode>]’
/usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_vector.h:741:   instantiated from ‘void std::vector<_Tp, _Alloc>::push_back(const _Tp&) [with _Tp = YouCompleteMe::LetterNode, _Alloc = std::allocator<YouCompleteMe::LetterNode>]’
/home/vagrant/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/ycm/LetterNode.cpp:37:   instantiated from here
/home/vagrant/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/ycm/LetterNode.h:35: note: synthesized method ‘YouCompleteMe::LetterNodeListMap& YouCompleteMe::LetterNodeListMap::operator=(YouCompleteMe::LetterNodeListMap&)’ first required here
In file included from /usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/vector:69,
                 from /home/vagrant/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/ycm/LetterNodeListMap.h:23,
                 from /home/vagrant/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/ycm/LetterNode.h:22,
                 from /home/vagrant/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/ycm/LetterNode.cpp:18:
/usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_insert_aux(__gnu_cxx::__normal_iterator<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type::pointer, std::vector<_Tp, _Alloc> >, const _Tp&) [with _Tp = YouCompleteMe::LetterNode, _Alloc = std::allocator<YouCompleteMe::LetterNode>]’:
/usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_vector.h:741:   instantiated from ‘void std::vector<_Tp, _Alloc>::push_back(const _Tp&) [with _Tp = YouCompleteMe::LetterNode, _Alloc = std::allocator<YouCompleteMe::LetterNode>]’
/home/vagrant/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/ycm/LetterNode.cpp:37:   instantiated from here
/usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/vector.tcc:312: note: synthesized method ‘YouCompleteMe::LetterNode& YouCompleteMe::LetterNode::operator=(YouCompleteMe::LetterNode&)’ first required here
In file included from /usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/vector:61,
                 from /home/vagrant/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/ycm/LetterNodeListMap.h:23,
                 from /home/vagrant/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/ycm/LetterNode.h:22,
                 from /home/vagrant/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/ycm/LetterNode.cpp:18:
/usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_algobase.h: In static member function ‘static _OI std::__copy_move<false, false, std::random_access_iterator_tag>::__copy_m(_II, _II, _OI) [with _II = const YouCompleteMe::LetterNode*, _OI = YouCompleteMe::LetterNode*]’:
/usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_algobase.h:397:   instantiated from ‘_OI std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = false, _II = const YouCompleteMe::LetterNode*, _OI = YouCompleteMe::LetterNode*]’
/usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_algobase.h:436:   instantiated from ‘_OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false, _II = __gnu_cxx::__normal_iterator<const YouCompleteMe::LetterNode*, std::vector<YouCompleteMe::LetterNode, std::allocator<YouCompleteMe::LetterNode> > >, _OI = __gnu_cxx::__normal_iterator<YouCompleteMe::LetterNode*, std::vector<YouCompleteMe::LetterNode, std::allocator<YouCompleteMe::LetterNode> > >]’
/usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_algobase.h:468:   instantiated from ‘_OI std::copy(_II, _II, _OI) [with _II = __gnu_cxx::__normal_iterator<const YouCompleteMe::LetterNode*, std::vector<YouCompleteMe::LetterNode,
std::allocator<YouCompleteMe::LetterNode> > >, _OI = __gnu_cxx::__normal_iterator<YouCompleteMe::LetterNode*, std::vector<YouCompleteMe::LetterNode, std::allocator<YouCompleteMe::LetterNode> > >]’
/usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/vector.tcc:176:   instantiated from ‘std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = YouCompleteMe::LetterNode, _Alloc = std::allocator<YouCompleteMe::LetterNode>]’
/home/vagrant/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/ycm/LetterNode.h:35:   instantiated from ‘void std::vector<_Tp, _Alloc>::_M_insert_aux(__gnu_cxx::__normal_iterator<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type::pointer, std::vector<_Tp, _Alloc> >, const _Tp&) [with _Tp = YouCompleteMe::LetterNode, _Alloc = std::allocator<YouCompleteMe::LetterNode>]’
/usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_vector.h:741:   instantiated from ‘void std::vector<_Tp, _Alloc>::push_back(const _Tp&) [with _Tp = YouCompleteMe::LetterNode, _Alloc = std::allocator<YouCompleteMe::LetterNode>]’
/home/vagrant/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/ycm/LetterNode.cpp:37:   instantiated from here
/usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_algobase.h:343: error: no match for ‘operator=’ in ‘* __result = * __first’
/home/vagrant/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/ycm/LetterNode.h:35: note: candidates are: YouCompleteMe::LetterNode& YouCompleteMe::LetterNode::operator=(YouCompleteMe::LetterNode&)
gmake[3]: *** [ycm/CMakeFiles/ycm_core.dir/LetterNode.cpp.o] Error 1
gmake[2]: *** [ycm/CMakeFiles/ycm_core.dir/all] Error 2
gmake[1]: *** [ycm/CMakeFiles/ycm_core.dir/rule] Error 2
gmake: *** [ycm_core] Error 2
Searching Python 2.6 libraries...
Found Python library: /usr/lib/python2.6/config/libpython2.6.so
Found Python headers folder: /usr/include/python2.6

Most helpful comment

OK. The full command I tested was ./install.py and the gcc version is 4.4.7. The compilation failed when using clang 3.4.2 which was the lastest available package in the repository. But, as @puremourning said, using devtoolset-2 which had gcc 4.8.2 fixed the compilation. I guess we can mark this as closed now.

All 8 comments

Well, I seem to have the same compiling issue as yours. Same error output. And I seem pull the latest change from this repo today before I run install.py.

Btw, not sure if gcc version would be a problem but mine is gcc (Debian 4.4.5-8) 4.4.5.

Just to be sure can you both post your full compiler version and the invocation of install.py that you ran?

It sounds like either a compiler limitation or we are relying on a language feature in advance of previous versions.

Red hat 6 default compiler is ancient. Can you try with the Dev toolset or with clang ?

I personally gave up compiling YCM on RHEL 6.6. Everything is just too ancient there. I've heard of others who have succeeded at this though.

I succeed regularly, but I have Dev toolset 2 which is gcc 4.8

OK. The full command I tested was ./install.py and the gcc version is 4.4.7. The compilation failed when using clang 3.4.2 which was the lastest available package in the repository. But, as @puremourning said, using devtoolset-2 which had gcc 4.8.2 fixed the compilation. I guess we can mark this as closed now.

YCM complies ok after I installed devtoolset 3 on my CentOS 6.6

I met the same problem compiling with gcc version 4.4.5 (Debian 4.4.5-8). It seems that boost::movelib::unique_ptr< NearestLetterNodeArray > letters_; in file "third_party/ycmd/cpp/ycm/LetterNodeListMap.h" has a private copy construct, thus meets the condition of Deleted implicitly-declared copy assignment operator scenario:

T has a non-static data member or a direct or virtual base class that cannot be copy-assigned (overload resolution for the copy assignment fails, or selects a deleted or inaccessible function);

So, I tried to add the definition of the missing copy assignment operator.

diff --git a/cpp/ycm/LetterNodeListMap.cpp b/cpp/ycm/LetterNodeListMap.cpp
index f963378..f8cdd44 100644
--- a/cpp/ycm/LetterNodeListMap.cpp
+++ b/cpp/ycm/LetterNodeListMap.cpp
@@ -48,6 +48,11 @@ LetterNodeListMap::LetterNodeListMap( const LetterNodeListMap &other ) {
     letters_.reset( new NearestLetterNodeArray( *other.letters_ ) );
 }

+LetterNodeListMap &LetterNodeListMap::operator=( const LetterNodeListMap &other ) {
+  if ( this != &other && other.letters_ )
+    letters_.reset( new NearestLetterNodeArray( *other.letters_ ) );
+  return *this;
+}
+
+

 NearestLetterNodeIndices &LetterNodeListMap::operator[] ( char letter ) {
   if ( !letters_ )
diff --git a/cpp/ycm/LetterNodeListMap.h b/cpp/ycm/LetterNodeListMap.h
index da7a226..2e8824c 100644
--- a/cpp/ycm/LetterNodeListMap.h
+++ b/cpp/ycm/LetterNodeListMap.h
@@ -66,6 +66,7 @@ class LetterNodeListMap {
 public:
   LetterNodeListMap();
   LetterNodeListMap( const LetterNodeListMap &other );
+  LetterNodeListMap &operator=( const LetterNodeListMap &other );

   NearestLetterNodeIndices &operator[] ( char letter );

It compiles and works well. But not fully tested yet.

I wonder if perhaps the main YCM installation instructions should clarify which GCC version is needed?
Fair enough that Val doesn't want to be responsible for every dinosaur environment out there though :).

On CentOS 6 I'm having difficulty installing devtoolset 3 due to what seems (?) to be a broken dependency requirement in the package itself (seems to depend upon itself?).

Currently following this suggestion, which basically recommends keeping 2 different versions of GCC:

https://lists.centos.org/pipermail/centos/2016-November/162068.html

Pretty ugly solution..., but I want auto/omni completion!

--

Update: Okay, would seriously not recommend compiling GCC if that can ever be avoided.
Even on a decent dev machine this takes quite a while.
I also didn't get it to work.

After following this individuals gist though, I was able to compile YCM (run install.py more specifically) in Centos 6.8: https://gist.github.com/stephenturner/e3bc5cfacc2dc67eca8b.

--

2nd Update:

YCM wants gclib 2.15.
https://www.centos.org/forums/viewtopic.php?t=55393
Possibly no solution other than OS upgrade which I can't do :(.

Was this page helpful?
0 / 5 - 0 ratings