Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ycm server won't start #2230

Closed
2 tasks
karolrungo opened this issue Jul 5, 2016 · 17 comments
Closed
2 tasks

Ycm server won't start #2230

karolrungo opened this issue Jul 5, 2016 · 17 comments

Comments

@karolrungo
Copy link

karolrungo commented Jul 5, 2016

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.
    )
  • [ x] 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.
  • [x ] 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.
  • 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.]

I have installed Ycm via Vundle on vim7.4 in Ubuntu 14.04 on VirtualBox.
Compiled it with --clang-completer option
After opening any cpp/hpp file I got error message like that:
The ycmd server SHUT DOWN (restart with ':YcmRestartServer'). Unexpected error while loading the YCM core library. Run ':YcmToggleLogs stderr' to check the logs.

After command :YcmToggleLogs

Traceback (most recent call last):                                                                                                                     
 File "/home/rungo/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/server_utils.py", line 95, in CompatibleWithCurrentCore
ycm_core = ImportCore()                                                                                                                            
File "/home/rungo/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/server_utils.py", line 87, in ImportCore            
import ycm_core as ycm_core                                                                                                                        
ImportError: /usr/lib/i386-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/rungo/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../libclang.so.3.8)

i checked that:

$ sudo apt-get install libstdc++6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libstdc++6 is already the newest version.
@vheon
Copy link
Contributor

vheon commented Jul 5, 2016

That means that there is a mismatch between the version of libstdc++ required by the precompiled libclang that we download from the llvm site and the one you have installed. This is a bit strange since the one that we install is made for ubuntu 14.04 so there must be something wrong.

What is the output of strings /usr/lib/i386-linux-gnu/libstd++.so.6 | grep GLIBCXXX?

@karolrungo
Copy link
Author

Thre is something strange...

$ sudo apt-get install libstdc++6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libstdc++6 is already the newest version.
The following packages were automatically installed and are no longer required:
  appmenu-qt appmenu-qt5 autopoint bamfdaemon friends friends-dispatcher
  gir1.2-accounts-1.0 gir1.2-ebook-1.2 gir1.2-ebookcontacts-1.2
  gir1.2-edataserver-1.2 gir1.2-messagingmenu-1.0 gir1.2-signon-1.0
  gsettings-ubuntu-schemas indicator-appmenu indicator-bluetooth
  indicator-datetime indicator-keyboard indicator-messages indicator-power
  indicator-printers indicator-session indicator-sound
  libaccount-plugin-generic-oauth libaccount-plugin-google libaudclient2
  libbamf3-2 libcolumbus1 libcolumbus1-common libdbusmenu-qt5 libfriends0
  libgee2 libglew1.10 libglewmx1.10 libgsettings-qt1 libid3tag0 libimlib2
  liblightdm-gobject-1-0 liblua5.1-0 libntdb1 libnux-4.0-0 libnux-4.0-common
  libpocketsphinx1 libsphinxbase1 libtimezonemap1 libunity-gtk2-parser0
  libunity-gtk3-parser0 libunity-misc4 liburl-dispatcher1 libxmmsclient6
  nux-tools python-ntdb python3-feedparser signon-keyring-extension
  signon-plugin-oauth2 sphinx-voxforge-hmm-en sphinx-voxforge-lm-en
  telepathy-indicator unity-greeter unity-lens-files unity-lens-friends
  unity-lens-music unity-lens-photos unity-lens-video unity-scope-audacious
  unity-scope-calculator unity-scope-chromiumbookmarks unity-scope-clementine
  unity-scope-colourlovers unity-scope-devhelp unity-scope-firefoxbookmarks
  unity-scope-gmusicbrowser unity-scope-gourmet unity-scope-guayadeque
  unity-scope-home unity-scope-manpages unity-scope-musicstores
  unity-scope-musique unity-scope-openclipart unity-scope-texdoc
  unity-scope-tomboy unity-scope-video-remote unity-scope-virtualbox
  unity-scope-yelp unity-scope-zotero unity-scopes-master-default
  unity-scopes-runner
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.




`$ strings /usr/lib/i386-linux-gnu/libstd++.so.6 | grep GLIBCXXX
strings: '/usr/lib/i386-linux-gnu/libstd++.so.6': No such file`

@micbou
Copy link
Collaborator

micbou commented Jul 5, 2016

You are on Ubuntu 14.04 32-bit and since there is no Clang pre-built binaries available for this architecture, we use the binaries for Fedora 32-bit instead which seem to depend on a more recent version of libstdc++6. Try to update libstdc++6 by following these steps:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test 
sudo apt-get update
sudo apt-get install libstdc++6

@karolrungo
Copy link
Author

@micbou i have installed packages as you said in your comment and now I have another problem

Traceback (most recent call last):                                                                                      
File "/home/rungo/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/server_utils.py", line 95, in CompatibleWithCurrentCore 
ycm_core = ImportCore()                                                                                             
File "/home/rungo/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/server_utils.py", line 87, in ImportCore            
import ycm_core as ycm_core                                                                                         
ImportError: /home/rungo/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../libclang.so.3.8: symbol _ZTVNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEEE, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference

@micbou
Copy link
Collaborator

micbou commented Jul 5, 2016

My bad, you need to upgrade your packages, not just libstdc++6:

sudo apt-get upgrade

@karolrungo
Copy link
Author

still the same problem

@micbou
Copy link
Collaborator

micbou commented Jul 5, 2016

Did you run again the install.py script?

@karolrungo
Copy link
Author

karolrungo commented Jul 5, 2016

Yes, i did it again, still issue with libclang

@vheon
Copy link
Contributor

vheon commented Jul 5, 2016

One thing that you could do for sure is to follow the full guide and compile libclang yourself... I know is not an optimal solution...

@micbou
Copy link
Collaborator

micbou commented Jul 5, 2016

Or you could try to sudo apt-get dist-upgrade. If this still doesn't work then you can upgrade to Ubuntu 16.04 or install a 64-bit version.

@micbou
Copy link
Collaborator

micbou commented Jul 6, 2016

I am closing this since it is a configuration issue and we don't support Ubuntu 32-bit (only 64-bit).

@micbou micbou closed this as completed Jul 6, 2016
@fearphage
Copy link

I just saw this error on Ubuntu 17.04. The following command fixed it for me:

conda install libgcc

I got the idea from this thread.

Note: I did not perform the uninstall. The install upgraded the library and everything seems to be working now.

@yamsu
Copy link

yamsu commented Mar 26, 2018

Another option that worked for me, as I used gcc-5.2(non system gcc) to compile ycm, is to copy libstdc++.so.6 to the third_party/ycmd folder

The system libstdc++.so.6 file didn't have the necessary tag required by ycore.so as this lib wasn't used during compile time.

System Ubuntu 14.04 64bit with gcc 4.6

@timchenxiaoyu
Copy link

centos 7.4 also have this promblem

@bstaletic
Copy link
Collaborator

For RHEL/Centos we have a wiki entry on how to make it work.

@matrixzj
Copy link

@bstaletic will you provide a link for RHEL/CentOS wiki? Thanks a lot

@bstaletic
Copy link
Collaborator

Click on the wiki tab. Then click on the "Full installation on CentOS".

https://github.com/ycm-core/YouCompleteMe/wiki/Full-installation-on-CentOS

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants