Youcompleteme: When I enter VIM I get The ycmd server SHUT DOWN (restart with ':YcmRestartServer'). Unexpected error while loading the YCM core library. Type ':YcmToggleLogs ycmd_49739_stderr_rbhx3wqr.log' to check the logs

Created on 19 Nov 2018  路  4Comments  路  Source: ycm-core/YouCompleteMe

Issue Details

When I enter VIM I get:

The ycmd server SHUT DOWN (restart with ':YcmRestartServer'). Unexpected error while loading the YCM core library. Type ':YcmToggleLogs ycmd_49739_stderr_rbhx3wqr.log' to check the logs.

selection_029

result of :YcmToggleLogs ycmd_49739_stderr_rbhx3wqr.log

 13 Traceback (most recent call last):
 14   File "/home/sporty/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_utils.py", line 97, in CompatibleWithCurrentCore
 15     ycm_core = ImportCore()
 16   File "/home/sporty/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_utils.py", line 89, in ImportCore
 17     import ycm_core as ycm_core
 18 ImportError: /home/sporty/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycm_core.so: undefined symbol: clang_getCompletionFixIt
  • What did you do?

Today I updated the plugin and the issue appeared, I have been using YCM successfully for 4 years now.

Diagnostic data

Output of vim --version

VIM - Vi IMproved 8.1 (2018 May 18, compiled Nov 05 2018 12:39:48)
Included patches: 1-524
Modified by [email protected]
Compiled by [email protected]
Huge version without GUI.  Features included (+) or not (-):
+acl               +extra_search      +mouse_netterm     +tag_old_static
+arabic            +farsi             +mouse_sgr         -tag_any_white
+autocmd           +file_in_path      -mouse_sysmouse    -tcl
+autochdir         +find_in_path      +mouse_urxvt       +termguicolors
-autoservername    +float             +mouse_xterm       +terminal
-balloon_eval      +folding           +multi_byte        +terminfo
+balloon_eval_term -footer            +multi_lang        +termresponse
-browse            +fork()            -mzscheme          +textobjects
++builtin_terms    +gettext           +netbeans_intg     +timers
+byte_offset       -hangul_input      +num64             +title
+channel           +iconv             +packages          -toolbar
+cindent           +insert_expand     +path_extra        +user_commands
-clientserver      +job               -perl              +vartabs
-clipboard         +jumplist          +persistent_undo   +vertsplit
+cmdline_compl     +keymap            +postscript        +virtualedit
+cmdline_hist      +lambda            +printer           +visual
+cmdline_info      +langmap           +profile           +visualextra
+comments          +libcall           -python            +viminfo
+conceal           +linebreak         +python3           +vreplace
+cryptv            +lispindent        +quickfix          +wildignore
+cscope            +listcmds          +reltime           +wildmenu
+cursorbind        +localmap          +rightleft         +windows
+cursorshape       -lua               -ruby              +writebackup
+dialog_con        +menu              +scrollbind        -X11
+diff              +mksession         +signs             -xfontset
+digraphs          +modify_fname      +smartindent       -xim
-dnd               +mouse             +startuptime       -xpm
-ebcdic            -mouseshape        +statusline        -xsmp
+emacs_tags        +mouse_dec         -sun_workshop      -xterm_clipboard
+eval              +mouse_gpm         +syntax            -xterm_save
+ex_extra          -mouse_jsbterm     +tag_binary
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -Wdate-time  -g -O2 -fdebug-prefix-map=/build/vim-VgGUNj/vim-8.1.0524=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim        -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl     -L/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu -lpython3.6m -lpthread -ldl -lutil -lm

Output of YcmDebugInfo

Printing YouCompleteMe debug information...
-- Client logfile: /tmp/ycm_70cna1qz.log
-- Server errored, no debug info from server
-- Server running at: http://127.0.0.1:37317
-- Server process ID: 12600
-- Server logfiles:
--   /tmp/ycmd_37317_stdout_0hxjrvpd.log
--   /tmp/ycmd_37317_stderr_3f3rbpcv.log
Press ENTER or type command to continue

Contents of YCM, ycmd and completion engine logfiles

Client logfile: /tmp/ycm_70cna1qz.log

2018-11-19 11:04:46,182 - ERROR - HTTPConnectionPool(host='127.0.0.1', port=37317): Max retries exceeded with url: /ready (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fc4b627b828>: Failed to establish a new connection: [Errno 111] Connection refused',))
2018-11-19 11:04:46,285 - ERROR - The ycmd server SHUT DOWN (restart with ':YcmRestartServer'). Unexpected error while loading the YCM core library. Type ':YcmToggleLogs ycmd_37317_stderr_3f3rbpcv.log' to check the logs.
2018-11-19 11:04:50,844 - ERROR - HTTPConnectionPool(host='127.0.0.1', port=37317): Max retries exceeded with url: /debug_info (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fc4b62a0048>: Failed to establish a new connection: [Errno 111] Connection refused',))

/tmp/ycmd_49381_stdout_0bocujq8.log is empty

/tmp/ycmd_49381_stderr_79pb2s7v.log

2018-11-19 11:04:46,202 - ERROR - Error occurred while loading global extra conf ./ycm_global_ycm_extra_conf.py
Traceback (most recent call last):
  File "/home/sporty/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/extra_conf_store.py", line 104, in _CallGlobalExtraConfMethod
    module = Load( global_ycm_extra_conf, force = True )
  File "/home/sporty/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/extra_conf_store.py", line 183, in Load
    module = LoadPythonSource( _RandomName(), module_file )
  File "/home/sporty/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/utils.py", line 452, in LoadPythonSource
    return imp.load_source( name, pathname )
  File "./ycm_global_ycm_extra_conf.py", line 34, in <module>
    import ycm_core
ImportError: /home/sporty/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycm_core.so: undefined symbol: clang_getCompletionFixIt
2018-11-19 11:04:46,214 - ERROR - /home/sporty/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycm_core.so: undefined symbol: clang_getCompletionFixIt
Traceback (most recent call last):
  File "/home/sporty/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_utils.py", line 97, in CompatibleWithCurrentCore
    ycm_core = ImportCore()
  File "/home/sporty/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_utils.py", line 89, in ImportCore
    import ycm_core as ycm_core
ImportError: /home/sporty/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycm_core.so: undefined symbol: clang_getCompletionFixIt

Add let g:ycm_log_level = 'debug' to vimrc, restart Vim, reproduce the
issue, and include link here to a [gist][] containing the entire logfiles for
ycm, ycmd and any completer logfiles listed by :YcmToggleLogs.

OS version, distribution, etc.

Ubuntu 18.04

Output of build/install commands

Install workeded as expected.

Most helpful comment

@micbou, yes that was probably my problem. I used

Plug 'Valloric/YouCompleteMe', { 'do': './install.py --clang-completer --system-libclang' }

in .vimrc. So as @bstaletic recommended, I rebuilt it by hand using same command less the --system-libclang, it now all seems to work. Thank you all.

All 4 comments

From your log:

ImportError: /home/sporty/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycm_core.so: undefined symbol: clang_getCompletionFixIt

I'm sure this will be solved when you recompile YCM.
If you have further questions ask on gitter.

@sittim Are you installing YCM with --system-libclang? If so, you are most likely using a system libclang that is too old. You need at least version 7.0.0. On a side note, we need to increase the version requirement in the docs.

@micbou, yes that was probably my problem. I used

Plug 'Valloric/YouCompleteMe', { 'do': './install.py --clang-completer --system-libclang' }

in .vimrc. So as @bstaletic recommended, I rebuilt it by hand using same command less the --system-libclang, it now all seems to work. Thank you all.

@sittim @micbou works with same trick, but wondering what would be missing without --system-libclang ?

Was this page helpful?
0 / 5 - 0 ratings