Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 357709

Summary: [RDT] After indexing a large project, I get "Unresolved inclusion" errors, even though the include search paths were carefully configured
Product: [Tools] PTP Reporter: Corey Ashford <cjashfor>
Component: RDTAssignee: Project Inbox <ptp-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: major    
Priority: P3 CC: recoskie, rsjoao, wainersm
Version: 5.0.2   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=357021
Whiteboard:

Description Corey Ashford CLA 2011-09-14 19:45:30 EDT
Build Identifier: I20110613-1736

I have set up a remote C/C++ project containing the Linux kernel source.  Even though I've carefully set up the remote include paths, the indexer is not finding the include files.

For example, I get an Unresolved Inclusion error for the line:

#include <linux/interrupt.h>

which resides in one of the C source files.

I have tried adding both a remote absolute path to where linux/interrupt.h resides, and also a workspace-relative path and neither one worked.  Both resulted in the same unresolved inclusion errors.

A related problem is that after quite a lengthy indexing time, the indexer spends at least five minutes spilling these errors out to the error log, and there appears to be no way of canceling this job.

Reproducible: Always

Steps to Reproduce:
1. get the latest Linux kernel source from https://github.com/torvalds/linux.git and set it up as a remote project using Remote Tools.
2. Filter out all of the arch/* directories, except the one you are working on.  Also filter out the drivers directory, because that will speed up the indexing considerably.
3. Add the remote include paths of <workspace>/include <workspace>/include/linux and <workspace>arch/<your_arch>/include.
4. Do an index operation.  It should take 5-10 minutes (plus the added time for the $*(@# Photran indexer), after which you should see all of the unresolved inclusion errors.
Comment 1 Corey Ashford CLA 2011-09-14 19:58:40 EDT
I should add that I'm seeing these "Unresolved inclusion: ..." errors in the Error Log view.
Comment 2 Chris Recoskie CLA 2011-09-15 10:46:24 EDT
Until recently the GNU scanner discovery stuff was pretty broken, and that will mean things would not get parsed right unless you painstakingly set up all of the include paths, and *macros* at the proper values.  SR1 should help with that a lot.  I would suggest trying out a newer build... a June build is pretty old at this point.  If you still have issues then we can dig further.
Comment 3 Chris Recoskie CLA 2011-09-16 10:52:23 EDT
Are you still seeing this with the properly matched CDT/RDT?
Comment 4 Corey Ashford CLA 2011-09-20 14:21:36 EDT
No, this problem went away once I switched to the nightly build of the CDT.  Should we wait for SR1 to come out, then re-test?
Comment 5 Chris Recoskie CLA 2011-09-20 14:48:00 EDT
I'm going to mark this as WORKSFORME then.  If you see this in the official SR1, then feel free to reopen it.