-
Notifications
You must be signed in to change notification settings - Fork 260
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
GCC 8.2.1 needs -fno-gnu-unique to work around std::make_shared defect due to libicuuc.so(DT_SYMBOLIC) #363
Comments
Have you tried building ccls with clang 8? If your distribution doesn't provide it, consider using prebuilt archives on http://releases.llvm.org/
A |
Had an similar problem (crash whenever a file was indexed), which was fixed by using |
I had this bug too and discovered by accident that using clang to compile ccls fixes this. Tested with clang 8.0.0 (works) and gcc 8.2.1 (crashes). Here is the backtrace of the core dump:
Edit: maybe this should be moved to its own issue? |
the similar problem happens to me also.
clang version 8.0.0 (tags/RELEASE_800/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-pc-linux-gnu/8.2.1
Found candidate GCC installation: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1
Found candidate GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.1
Found candidate GCC installation: /usr/lib64/gcc/x86_64-pc-linux-gnu/8.2.1
Selected GCC installation: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64 ccls server wont start |
10:07:06 ccls initialize.cc:271 I initialize in directory /tmp with uri file:///tmp/
10:07:06 ccls initialize.cc:294 I initializationOptions: {"compilationDatabaseCommand":"","compilationDatabaseDirectory":"","cache":{"directory":"/home/jimmy/.emacs.d/.cache/lsp-ccls","format":"binary","hierarchicalPath":false,"retainInMemory":2},"capabilities":{"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"}","moreTriggerCharacter":[]},"foldingRangeProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":true}}},"clang":{"excludeArgs":[],"extraArgs":[],"pathMappings":[],"resourceDir":""},"client":{"hierarchicalDocumentSymbolSupport":true,"linkSupport":true,"snippetSupport":true},"codeLens":{"localVariables":true},"completion":{"caseSensitivity":2,"detailedLabel":true,"dropOldRequests":true,"duplicateOptional":true,"filterAndSort":true,"include":{"blacklist":[],"maxPathSize":30,"suffixWhitelist":[".h",".hpp",".hh",".inc"],"whitelist":[]},"maxNum":100},"diagnostics":{"blacklist":[],"onChange":1000,"onOpen":0,"onSave":0,"spellChecking":true,"whitelist":[]},"highlight":{"largeFileSize":2097152,"lsRanges":false,"blacklist":[],"whitelist":[]},"index":{"blacklist":[],"comments":2,"initialNoLinkage":false,"initialBlacklist":[],"initialWhitelist":[],"maxInitializerLines":5,"multiVersion":0,"multiVersionBlacklist":[],"multiVersionWhitelist":[],"name":{"suppressUnwrittenScope":false},"onChange":false,"parametersInDeclarations":true,"threads":0,"trackDependency":2,"whitelist":[]},"request":{"timeout":5000},"session":{"maxNum":10},"workspaceSymbol":{"caseSensitivity":1,"maxNum":1000,"sort":true},"xref":{"maxNum":2000}}
10:07:06 ccls initialize.cc:323 I use -resource-dir=/usr/lib/clang/8.0.0
10:07:06 ccls initialize.cc:356 I workspace folder: /tmp/
10:07:06 ccls initialize.cc:381 I start 4 indexers
10:07:06 ccls initialize.cc:389 I dispatch initial index requests
10:07:06 ccls pipeline.cc:478 I loaded project. Refresh semantic highlight for all working file.
10:07:06 preamble sema_manager.cc:733 I create session for /tmp/hello/hello.cpp
10:07:06 indexer3 pipeline.cc:344 I parse /tmp/hello/hello.cpp
Process ccls stderr finished
|
It solves my problem. So, I think archlinuxcn/ccls-git 20190329-2 is built with gcc (GCC) 8.2.1 20181127, instead of clang version 8.0.0 (tags/RELEASE_800/final under my personal environment. |
Interesting: I have ccls built with GCC 8.1.0 and I don't see this issue. This GCC is one I built myself so maybe there's some configuration of the Fedora version of GCC that is causing this problem? |
Thanks, this also worked for me. |
also for me on archlinux... |
I built it with Clang 8 and can't reproduce the issue anymore. Can you clarify, how the compiler may help in this situation? |
I'll jot down some notes here and keep updating this comment.
|
Hm, if I understand the above correctly, then ccls built with GCC 8.3.0 should work fine, right? It includes the fix for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88782. But I'm still seeing the same issues as the OP... Am I missing something? |
Ah - now I understand: LLVM also has to be built with the new GCC version. Problem is fixed with Arch llvm package llvm-8.0.0-2. Thanks! |
Rebuild with GCC 8.3; fixes segfaults in clang's /usr/bin/modularize. Some further explanation at the link bellow: MaskRay/ccls#363 (comment) git-svn-id: file:///srv/repos/svn-packages/svn@352148 eb2447ed-0c53-47e4-bac8-5bc4a241df78
Observed behavior
ccls crashes:
Expected behavior
ccls should reindex new contents.
Steps to reproduce
System information
git describe --tags --long
): 0.20181225.9-35-g1976fec5The text was updated successfully, but these errors were encountered: