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

I have installed Clang7 in my Debian 9 32bit in parrallels #2958

Closed
3 tasks
Jianghui-Wang opened this issue Mar 26, 2018 · 11 comments
Closed
3 tasks

I have installed Clang7 in my Debian 9 32bit in parrallels #2958

Jianghui-Wang opened this issue Mar 26, 2018 · 11 comments

Comments

@Jianghui-Wang
Copy link

Jianghui-Wang commented Mar 26, 2018

Issue Prelude

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

  • I have read and understood YCM's CONTRIBUTING document.
  • I have read and understood YCM's CODE_OF_CONDUCT document.
  • 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.
  • [x ] If filing a bug report, I have included the output of :YcmDebugInfo.
  • [x ] If filing a bug report, I have attached the contents of the logfiles using
    the :YcmToggleLogs command.
  • [ 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, including what I expected to happen and what actually happened.
  • [x ] If filing a installation failure report, I have included the entire output
    of install.py (or cmake/make/ninja) including its invocation
  • [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

Provide a clear description of the problem, including the following key
questions:
I have installed Clang7 in my Debian 9 32bit in parrallels,
when ./install.py --clang-completer there is sth wrong.

88703edb-e915-40ac-bc33-4df1ebd3917a

  • What did you do?
    Find in Google/stackflow but find nothing.

Include steps to reproduce here.

f163b6e4-44b8-4567-b019-c746332b50be

Include description of a minimal test case, including any actual code required
to reproduce the issue.

  • What did you expect to happen?

Include description of the expected behaviour.

  • What actually happened?

Include description of the observed behaviour, including actual output,
screenshots, etc.

Diagnostic data

Output of vim --version

Place the output here, or a link to a gist.

Output of YcmDebugInfo

Place the output here, or a link to a gist.

Contents of YCM, ycmd and completion engine logfiles

Include link here to a gist containing the entire logfiles for ycm, ycmd
and any completer logfiles listed by :YcmToggleLogs.

OS version, distribution, etc.

Include system information here.
debian 9

Linux bad 4.9.0-4-686-pae #1 SMP Debian 4.9.65-3+deb9u1 (2017-12-23) i686 GNU/Linux

4GB/64G given

which run in parallels desktop on my MacBook Pro 2017 macOS10.13.3

Output of build/install commands

Include link to a gist containing the invocation and entire output of
install.py if reporting an installation issue.

@micbou
Copy link
Collaborator

micbou commented Mar 26, 2018

There are no 32-bit pre-built Clang binaries available on Linux. Since you have installed the latest version of Clang, you should run the install.py script with the --system-libclang flag:

./install.py --clang-completer --system-libclang

@Jianghui-Wang
Copy link
Author

Jianghui-Wang commented Mar 26, 2018

Yes, it works ! , but seemed there is sth else wrong.

when I open my vim a red line in the bottom say sth wrong and ask me to read ycmtogglelogs

I opened it , following is what he said:


2018-03-26 08:20:29,959 - ERROR - libclang.so.7: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "/home/chw/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_utils.py", line 96, in CompatibleWithCurrentCore
ycm_core = ImportCore()
File "/home/chw/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_utils.py", line 88, in ImportCore
import ycm_core as ycm_core
ImportError: libclang.so.7: cannot open shared object file: No such file or directory


I can use $clang a.c to compile my c code, and I do not know where is wrong

Also when I use command "whereis libclang.so.7" it can show


➜ / whereis libclang.so.7
libclang.so: /usr/local/lib/libclang.so /usr/local/lib/libclang.so.7


@micbou
Copy link
Collaborator

micbou commented Mar 26, 2018

What's the output of the commands:

ls /home/chw/.vim/plugged/YouCompleteMe/third_party/ycmd/

and

ldd /home/chw/.vim/plugged/YouCompleteMe/third_party/ycmd/ycm_core.so

?

@Jianghui-Wang
Copy link
Author

09328366-fd01-45eb-bc18-dbab3d96a4d0

@micbou
Copy link
Collaborator

micbou commented Mar 26, 2018

Sorry, I should've asked you to list the files with -l:

ls -l /home/chw/.vim/plugged/YouCompleteMe/third_party/ycmd/

Also, does it work if you start Vim like this:

LD_LIBRARY_PATH=/usr/local/lib vim

?

@bstaletic
Copy link
Collaborator

It should work with LD_LIBRARY_PATH=/path/to/ycmd vim.

@Jianghui-Wang
Copy link
Author

fc52827b-6b13-4631-9ba2-e7f00c60b968

Yes! LD_LIBRARY_PATH=/usr/local/lib vim is useful ! (Although I do not know why

So, should I make a .sh to make sure it will works every time I open vim ?

@micbou
Copy link
Collaborator

micbou commented Mar 26, 2018

I suppose there are dependencies of libclang.so.7.0 in /usr/local/lib. You can confirm that with:

ldd /home/chw/.vim/plugged/YouCompleteMe/third_party/ycmd/libclang.so.7.0

and

LD_LIBRARY_PATH=/usr/local/lib ldd /home/chw/.vim/plugged/YouCompleteMe/third_party/ycmd/libclang.so.7.0

The missing dependencies would be the ones not found in the first command but found in the second.

So, should I make a .sh to make sure it will works every time I open vim ?

There are several ways to permanently add /usr/local/lib to your library path. You can add the following line to your .bashrc:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

or you can create a file in the /etc/ld.so.conf.d folder that contains the line:

/usr/local/lib

then run ldconfig to update the library paths.

@micbou
Copy link
Collaborator

micbou commented Mar 26, 2018

Nevermind, you don't need to create a file in /etc/ld.so.conf.d. There is already one containing /usr/local/lib (/etc/ld.so.conf.d/libc.conf). You just need to run ldconfig as root.

@Jianghui-Wang
Copy link
Author

Jianghui-Wang commented Mar 26, 2018

ThX! You really helped me, Thank you for your patient guidance.


However, the two seems the same ?

f66630e6-ad20-4c40-bba7-b116bcb32881


What's more, maybe "How to install ycm in 32bit linux" can add to README I suggest?

It is pretty hard to deal with in 32bit machine, while easily installed in my OS X.

LOL, I have never used this plug before and I hope I can enjoy it !

@micbou
Copy link
Collaborator

micbou commented Mar 26, 2018

However, the two seems the same ?

Strange. Not sure what's happening then.

What's more, maybe "How to install ycm in 32bit linux" can add to README I suggest?

Running a 32-bit Linux is rather uncommon so I think the wiki would be a better place to add such instructions.

LOL, I have never used this plug before and I hope I can enjoy it !

If you have any questions, feel free to ask them in the Gitter room or on the ycm-users Google group.

@micbou micbou closed this as completed Mar 26, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 17, 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

3 participants