-
Notifications
You must be signed in to change notification settings - Fork 771
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
Fix --system-libclang on Gentoo amd64, if llvm is compiled with ABI_X86="32 64" #891
Conversation
Codecov Report
@@ Coverage Diff @@
## master #891 +/- ##
==========================================
+ Coverage 94.69% 95.87% +1.17%
==========================================
Files 41 79 +38
Lines 4018 5478 +1460
==========================================
+ Hits 3805 5252 +1447
- Misses 213 226 +13 |
Of course I forgot about multilib llvm when I posted the first Gentoo specific oull request. I've confirmed that this works on a non-multilb llvm, so only a few questions.
Reviewed 1 of 1 files at r1. Comments from Reviewable |
So... some of the other paths are probably not necessary anymore, but I don't know which. Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed. Comments from Reviewable |
I believe debian based distributions have something like I see this change as one that could clean up out CMakeLists.txt a bit, so it's a welcome change. I just want to make sure we get it right, so I want to hear from other maintainers too. Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed. Comments from Reviewable |
Thanks for sending a PR! Re: macOS: AFAIK I wonder if this change will make it inadvertently start using a homebred-installed version of libclang when it didn't before? TBH I'm not sure, and testing it out would be a serious pain. IN principle, I think using llvm-config is a good-thing(TM), though we have to be a little careful not to break people who previously didn't realise they were relying on us not doing that (however nefariously). Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed. Comments from Reviewable |
I think we should test this carefull on all the platforms we have access to. I can test Mint, Windows and maybe RHEL. Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks failed. cpp/ycm/CMakeLists.txt, line 311 at r1 (raw file):
I believe Comments from Reviewable |
I've just tried llvm-config on Mint. It successfully found the default libclang.so. Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks failed. Comments from Reviewable |
…86="32 64" $ ls -ld /usr/lib64/llvm/4/l* drwxr-xr-x 3 root root 20K Dec 16 02:37 lib32 drwxr-xr-x 3 root root 20K Dec 16 02:37 lib64 drwxr-xr-x 2 root root 4.0K Dec 16 02:37 libexec This results in GLOB finding the wrong library. $ ./install.py --clang-completer --system-libclang ... Using external libclang: /usr/lib64/llvm/4/lib32/libclang.so.4.0 ... /usr/lib64/llvm/4/lib32/libclang.so.4.0: error adding symbols: File in wrong format
Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion. cpp/ycm/CMakeLists.txt, line 311 at r1 (raw file): Previously, bstaletic (Boris Staletic) wrote…
Removed. Comments from Reviewable |
Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion. cpp/ycm/CMakeLists.txt, line 295 at r2 (raw file):
Do we still need the FreeBSD paths if we're now using llvm-config? Does anyone have access to a FreeBSD machine to try it out? Comments from Reviewable |
Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion. cpp/ycm/CMakeLists.txt, line 295 at r2 (raw file): Previously, Valloric (Val Markovic) wrote…
I installed a FreeBSD 11.1 VM. There is no llvm-config by default. The default compiler is clang 4.0.0 which is way too old for YCM now anyway. I installed llvm 5 However, the existing path (
So, in conclusion: Yes, the BSD paths are still needed, because the required llvm-config on FreeBSD is Comments from Reviewable |
Reviewed 1 of 1 files at r2. cpp/ycm/CMakeLists.txt, line 295 at r2 (raw file): Previously, puremourning (Ben Jackson) wrote…
Well, that changes things a bit. The Something like:
And if we end up using the last one we print a warning that we have no idea what version we might find and what dragons be there. Comments from Reviewable |
I've got another idea: use Review status: all files reviewed at latest revision, 1 unresolved discussion. cpp/ycm/CMakeLists.txt, line 295 at r2 (raw file): Previously, bstaletic (Boris Staletic) wrote…
I wanted to avoid hardcoding versions... but if that's unavoidable, Comments from Reviewable |
Review status: all files reviewed at latest revision, 1 unresolved discussion. cpp/ycm/CMakeLists.txt, line 295 at r2 (raw file): Previously, DarthGandalf (Alexey Sokolov) wrote…
Hard coding versions was just for the sake of simplicity, nothing more than that. It's definitely not a good idea. 4.0 is old, because the version ycmd downloads is 5.0.1, so who knows when something might break because of different versions. Comments from Reviewable |
Review status: all files reviewed at latest revision, 1 unresolved discussion. cpp/ycm/CMakeLists.txt, line 295 at r2 (raw file): Previously, bstaletic (Boris Staletic) wrote…
I'm not sure how much effort we should go to in order to support Comments from Reviewable |
Review status: all files reviewed at latest revision, 1 unresolved discussion. cpp/ycm/CMakeLists.txt, line 295 at r2 (raw file): Previously, puremourning (Ben Jackson) wrote…
There's always an option of merging this PR as is and only benefit Gentoo. Comments from Reviewable |
Review status: all files reviewed at latest revision, 1 unresolved discussion. cpp/ycm/CMakeLists.txt, line 295 at r2 (raw file): Previously, bstaletic (Boris Staletic) wrote…
Let's merge it as is... Comments from Reviewable |
Alright, seems like utilising Review status: all files reviewed at latest revision, 1 unresolved discussion. Comments from Reviewable |
Reviewed 1 of 1 files at r2. Comments from Reviewable |
@zzbot r+ Reviewed 1 of 1 files at r2. Comments from Reviewable |
📌 Commit f912ca7 has been approved by |
Fix --system-libclang on Gentoo amd64, if llvm is compiled with ABI_X86="32 64" $ ls -ld /usr/lib64/llvm/4/l* drwxr-xr-x 3 root root 20K Dec 16 02:37 lib32 drwxr-xr-x 3 root root 20K Dec 16 02:37 lib64 drwxr-xr-x 2 root root 4.0K Dec 16 02:37 libexec This results in GLOB finding the wrong library. $ ./install.py --clang-completer --system-libclang ... Using external libclang: /usr/lib64/llvm/4/lib32/libclang.so.4.0 ... /usr/lib64/llvm/4/lib32/libclang.so.4.0: error adding symbols: File in wrong format FTR, I had to use --system-libclang because of libtinfo.so.5 issue (ycm-core/YouCompleteMe#778) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/891) <!-- Reviewable:end -->
💔 Test failed - status-appveyor |
@zzbot retry |
Fix --system-libclang on Gentoo amd64, if llvm is compiled with ABI_X86="32 64" $ ls -ld /usr/lib64/llvm/4/l* drwxr-xr-x 3 root root 20K Dec 16 02:37 lib32 drwxr-xr-x 3 root root 20K Dec 16 02:37 lib64 drwxr-xr-x 2 root root 4.0K Dec 16 02:37 libexec This results in GLOB finding the wrong library. $ ./install.py --clang-completer --system-libclang ... Using external libclang: /usr/lib64/llvm/4/lib32/libclang.so.4.0 ... /usr/lib64/llvm/4/lib32/libclang.so.4.0: error adding symbols: File in wrong format FTR, I had to use --system-libclang because of libtinfo.so.5 issue (ycm-core/YouCompleteMe#778) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/891) <!-- Reviewable:end -->
💔 Test failed - status-appveyor |
Third time's the charm? Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks failed. Comments from Reviewable |
Fix --system-libclang on Gentoo amd64, if llvm is compiled with ABI_X86="32 64" $ ls -ld /usr/lib64/llvm/4/l* drwxr-xr-x 3 root root 20K Dec 16 02:37 lib32 drwxr-xr-x 3 root root 20K Dec 16 02:37 lib64 drwxr-xr-x 2 root root 4.0K Dec 16 02:37 libexec This results in GLOB finding the wrong library. $ ./install.py --clang-completer --system-libclang ... Using external libclang: /usr/lib64/llvm/4/lib32/libclang.so.4.0 ... /usr/lib64/llvm/4/lib32/libclang.so.4.0: error adding symbols: File in wrong format FTR, I had to use --system-libclang because of libtinfo.so.5 issue (ycm-core/YouCompleteMe#778) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/891) <!-- Reviewable:end -->
☀️ Test successful - status-appveyor, status-travis |
[READY] Update ycmd Include the following changes: - PR ycm-core/ycmd#789: add support for Windows flags when --driver-mode=cl is given; - PR ycm-core/ycmd#848: hide C++ symbols by default; - PR ycm-core/ycmd#857: add Java support using jdt.ls; - PR ycm-core/ycmd#861: translate libclang error codes to exceptions; - PR ycm-core/ycmd#880: support downloading Clang binaries on ARM systems; - PR ycm-core/ycmd#883: handle zero column diagnostic from OmniSharp; - PR ycm-core/ycmd#884: specify Platform property when compiling OmniSharp; - PR ycm-core/ycmd#886: use current working directory in JavaScript completer; - PR ycm-core/ycmd#887: update Boost to 1.66.0; - PR ycm-core/ycmd#888: update JediHTTP; - PR ycm-core/ycmd#889: update Clang to 5.0.1; - PR ycm-core/ycmd#891: fix building with system libclang on Gentoo amd64; - PR ycm-core/ycmd#904: drop Python 2.6 and Python 3.3 support; - PR ycm-core/ycmd#905: calculate the start column when items are not resolved in the language server completer; - PR ycm-core/ycmd#912: download Clang binaries from HTTPS; - PR ycm-core/ycmd#914: do not try to symlink libclang on Windows. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/2902) <!-- Reviewable:end -->
$ ls -ld /usr/lib64/llvm/4/l*
drwxr-xr-x 3 root root 20K Dec 16 02:37 lib32
drwxr-xr-x 3 root root 20K Dec 16 02:37 lib64
drwxr-xr-x 2 root root 4.0K Dec 16 02:37 libexec
This results in GLOB finding the wrong library.
$ ./install.py --clang-completer --system-libclang
...
Using external libclang: /usr/lib64/llvm/4/lib32/libclang.so.4.0
...
/usr/lib64/llvm/4/lib32/libclang.so.4.0: error adding symbols: File in wrong format
FTR, I had to use --system-libclang because of libtinfo.so.5 issue (ycm-core/YouCompleteMe#778)
This change is