Bug 8261

Summary: Add a note on how to add linked folders for Yocto ADT Autotools projects in Eclipse
Product: [Documentation] Development Manual Reporter: Jose Lamego <jose.a.lamego>
Component: developmentAssignee: Scott Rifenbark <srifenbark>
Status: VERIFIED FIXED QA Contact: Bogdan Alexandru Voiculescu <bogdanx.a.voiculescu>
Severity: normal    
Priority: Medium CC: bogdanx.a.voiculescu, srifenbark, valentinx.hangan
Version: 1.7.1   
Target Milestone: 2.0   
Hardware: x86   
OS: Multiple   
Whiteboard: Sept 15, 2015 - IN PROGRESS REVIEW
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Done (doc changes complete)
Bug Depends on: 7549    
Bug Blocks:    
Attachments:
Description Flags
Screenshot of unresolved symbols/types in Eclipse Kepler none

Description Jose Lamego 2015-09-04 22:14:28 UTC
Some "Yocto Project ADT Autotools" projects may display errors for unresolved functions/symbols/types that are caused by missing include files, even when they may be appropriately listed in the project navigator. Error messages are "Function/Symbol/Type 'xxx' could not be resolved".

This is caused by a failed recursive parsing for the include folders in certain specific machine/project configurations, which is a known behavior in Eclipse for which there is no fix other than manually linking the folders to the project. Some examples of this in the bug 7549 ([1]) and in references [2] to [5].

A special note in section 4.2.2.4 "Building the project" on how to do the manual folder linking would allow users to troubleshoot their specific case.

A proposal for the note is:

4.2.2.4.1 Note for Yocto Project ADT Autotools projects
"When building "Yocto Project ADT Autotools" projects, the Eclipse IDE may display some error messages for Functions/Symbols/Types that cannot be "resolved", even when the related include file may be listed at the project navigator and even when the project is able to build. 
For these cases only, it is recommended to add a new linked folder to the appropriate sysroot:
 - Select the project
 - Navigate to menu File > New > Folder
In the New Folder Dialog:
 - Select "Link to alternate location (linked folder)"
 - Click Browse to navigate to the include folder inside the same sysroot location selected in the Yocto Project configuration preferences and click OK
 - Click Finish to save the linked folder

[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=7549
[2] http://stackoverflow.com/questions/12194103/eclipse-cdt-indexer-how-to-solve-unresolved-includes
[3] https://www.eclipse.org/forums/index.php/t/50622/
[4] http://stackoverflow.com/questions/17900370/eclipse-kepler-cdt-include-external-header-files-add-external-include-path-rec
[5] https://www.eclipse.org/forums/index.php/m/1059441/
Comment 1 Jose Lamego 2015-09-04 22:26:48 UTC
Created attachment 2709 [details]
Screenshot of unresolved symbols/types in Eclipse Kepler
Comment 2 Scott Rifenbark 2015-09-15 17:25:28 UTC
Jose, 

I have added the note as suggested.  You can review the new material at http://www.yoctoproject.org/docs/1.9/dev-manual/dev-manual.html#building-the-project.

Let me know if there are any changes.  Once we are good, I will commit the change to the yocto-docs repository.

Thanks,
Scott
Comment 3 Scott Rifenbark 2015-09-22 15:08:08 UTC
Setting days to 1.0 for this to get it off the red-flag list.  The changes are in and I am just waiting for approval before setting to RESOLVED/FIXED.

Scott
Comment 4 Jose Lamego 2015-09-22 15:19:09 UTC
Hi Scott,

Note looks good, now it should allow users to troubleshoot their specific cases. Please proceed to close this bug.

Thanks
Jose
Comment 5 Scott Rifenbark 2015-09-22 15:37:56 UTC
Jose, 

Thanks.  Bug is now set to RESOLVED/FIXED and doc flag to "Done."