This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 89872

Summary: "Parser Settings" for Sun Compilers Collection are incorrect
Product: cnd Reporter: soldatov <soldatov>
Component: -- Other --Assignee: Vladimir Kvashin <vkvashin>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P2    
Version: 5.x   
Hardware: All   
OS: Solaris   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 183834    

Description soldatov 2006-11-22 15:22:00 UTC
- Add path to Sun Studio compilers into PATH
- Run Netbeans
- Set 'Sun Compiler Collection' in 'Default Compiler Collection' field in 'C/C++
Pack Settings' tab
- Create 'Quote' sample project
==>
Parser cannot find <cstdlib> and <cstring> include files

I typed in console:
CC -E ~/Quote1/customer.cc | grep cstdlib
==> #1 /shared/dp/mars/sparc-S2/prod/include/CC/std

I opened parser settings and found:
-xbuiltin <-- It isn't path 
/shared/dp/mars/sparc-S2/prod/include/CC/Cstd
/shared/dp/mars/sparc-S2/prod/include/CC
/shared/dp/mars/sparc-S2/prod/include/CC/rw7
/shared/dp/mars/sparc-S2/prod/include/cc
/usr/include
Comment 1 Maria Tishkova 2006-11-22 16:33:05 UTC
I want to notice that this is P2 for C/C++ Development Pack but for SS it looks
more like P1.
Comment 2 Jesse Grodnik 2006-11-22 21:05:54 UTC
Need to analyze for follow-up release of the NB C/C++ Dev Pack.That release is
likely to be the platform for the next generation Sun Studio IDE.
Comment 3 Vladimir Kvashin 2006-11-22 22:05:07 UTC
Below is the reason of such behavior.

To understand what are compiler predefined include paths, Sun compiler (CC) is
invoked with -xdryrun -E parameters and its output is parsed.
It is supposed to output several -I options. Project system finds this -I
options in its output and places their content into a list of compiler
predefined include paths.

On my machine, it prints

-I-xbuiltin
-I/opt/SUNWspro/prod/include/CC/Cstd
-I/opt/SUNWspro/prod/include/CC
-I/opt/SUNWspro/prod/include/CC/rw7
-I/opt/SUNWspro/prod

I see two problems here

1) -I-xbuiltin obviously does not correspond any directory. This should be fixed
on IDE site - this should be just ignored by project system.

2) Compiler prints -Iopt/SUNWspro/prod/include/CC/Cstd, but does not print
-Iopt/SUNWspro/prod/include/CC/std. Both directories exist and compiler does
search both for includes
Comment 4 Maria Tishkova 2006-11-23 07:42:57 UTC
Vladimir,
I think the first problem you mentioned about -I-xbuiltin is a bug in compiler
side and IDE should not do anything with that, we can check with compilers team
and file CR for this issue.
Comment 5 Vladimir Kvashin 2007-04-20 14:08:43 UTC
Fixed.

/shared/data/ccvs/repository/cnd/makeproject/src/org/netbeans/modules/cnd/makeproject/api/compilers/SunCCCompiler.java,v
 <--  SunCCCompiler.java
new revision: 1.2.2.8.10.8; previous revision: 1.2.2.8.10.7
Comment 6 Vladimir Voskresensky 2007-05-25 14:02:47 UTC
*** Issue 104733 has been marked as a duplicate of this issue. ***
Comment 7 soldatov 2007-12-26 09:54:12 UTC
verified in 200712260000 build