Community
Participate
Working Groups
Created attachment 275533 [details] jstack when indexer hangs I am using Eclipse - Photon, CDT 9.5.2.201807181141. Trying to index llvm+clang sources using Eclipse project generated by cmake. "Enabled Project specific settings" of project indexer. Indexer gets stuck on https://github.com/llvm-mirror/clang/blob/master/test/Modules/merge-template-specializations.cpp which is cloned as <llvm-repo>/tools/clang/test/Modules/merge-template-specializations.cpp. Letting it run overnight bricks the machine. Attached jstack trace when indexer is hung.
Created attachment 275534 [details] Another jstack snapshot Appears to be looping in the method org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExecDeclarator.createDefaultInitializedCompositeValue(ExecDeclarato r.java:137.
Thanks for the report. Please see bug 514035 comment 0.
I created a resource filter to "Exclude All" "Name matches tools/clang/test" with an expectation that all the subdirectories would be excluded from build and hence from the indexer. However, the indexer still gets stuck at the above referenced file. I enabled "C/C++ General -> Code Analysis -> Indexer -> Enable project specific settings". Can someone please let me know what else I need to do get the indexer to completely ignore the directory tools/clang/test? Thanks!
(In reply to Open Address from comment #3) > I created a resource filter to "Exclude All" "Name matches tools/clang/test" > with an expectation that all the subdirectories would be excluded from build > and hence from the indexer. > > However, the indexer still gets stuck at the above referenced file. > > I enabled "C/C++ General -> Code Analysis -> Indexer -> Enable project > specific settings". > > Can someone please let me know what else I need to do get the indexer to > completely ignore the directory tools/clang/test? > > Thanks! I don't know if resource filters work for this but normally I do it like this: - Right-click on the test folder in Project Explorer > Resource Configurations > Exclude from Build. Select the configuration, OK. - Right-click on the project > Properties > C/C++ General > Indexer. Tick "Enable Project specific settings". Untick "Index source files not included in build" and you might want at the same time to untick "Index unused headers..." (You can also set all this in the global preferences instead). Another tip is to exclude all but one target in llvm/lib/Target, I only keep X86. Hope this helps!
Thanks for the suggestion. However, I see that the options "Exclude from Build..." and "Reset to Default..." in Project Explorer > Resource Configurations are greyed out.
Looks like I have reached a dead-end :-( No matter what I try, I am unable to exclude the indexer from parsing the files in tools/clang/test directory. Would really appreciate if any kind soul can nudge me in the right direction and getting hung while parsing the above referenced file. Thanks in advance.
I'm afraid I don't have any insights to offer beyond noting that the approach described by Marc-André in comment 4 is what I typically do as well, and I haven't come across a situation where the option was greyed out.
Maybe you created the project the new "core build" type which I don't know about. Maybe Doug could comment if/how exclusion work? How did you create the project? Could you attach your .project and .cproject?
(In reply to Marc-André Laperle from comment #8) > Maybe you created the project the new "core build" type which I don't know > about. Maybe Doug could comment if/how exclusion work? How did you create > the project? Could you attach your .project and .cproject? I created the Eclipse config of unmodified llvm+clang repo using the following cmake command: cmake -G "Eclipse CDT4 - Ninja" -DCMAKE_INSTALL_PREFIX=/home/username/github/install/llvm -DCMAKE_ECLIPSE_VERSION=4.8 /home/username/github/src/llvm. Please find .project and .cproject attached. Thanks for your responses and willingness to help.
Created attachment 275809 [details] .project
Created attachment 275810 [details] .cproject
Comment on attachment 275809 [details] .project Ignore this.
Created attachment 275811 [details] .project
(In reply to Open Address from comment #9) > cmake -G "Eclipse CDT4 - Ninja" I think that's your problem. The project files generated by CMake's CDT project generator are no longer compatible with recent CDT versions (see e.g. [1]). Users have reported success using the cmake4eclipse plugin instead, perhaps you could try that. [1] https://dev.eclipse.org/mhonarc/lists/cdt-dev/msg33110.html
(In reply to Nathan Ridge from comment #14) > (In reply to Open Address from comment #9) > > cmake -G "Eclipse CDT4 - Ninja" > > I think that's your problem. The project files generated by CMake's CDT > project generator are no longer compatible with recent CDT versions (see > e.g. [1]). > > Users have reported success using the cmake4eclipse plugin instead, perhaps > you could try that. > > [1] https://dev.eclipse.org/mhonarc/lists/cdt-dev/msg33110.html Oh, I see. Did not know that. Will look at cmake4eclipse. Thank you very much!