This page tracks bugs and issues related to building OpenSolaris with the Sun Studio 12 compilers. This information was all culled from various emails and bug reports. Thanks to everyone who did the heavy lifting here.
{toc}
There is a bug keyword (s11-cbe-mars) that should be attached to any Sun Studio 12 bugs or OpenSolaris bugs that need fixing to support building OpenSolaris with SS12.
h5. Get the latest patches
There are been many compiler bugs fixed in Sun Studio 12 patches. So make sure you have at least all the -01 patches for the compilers. It's simplest to just download all the latest patches if you've installed from packages. The first round of patches was included with the ML release of Sun Studio 12, so if you download Sun Studio 12 from the Sun Download Center, it should include the initial patches. You can test this by using 'cc -V'. You should see a patch-id in the output like:
{noformat}
cc: Sun C 5.9 SunOS_sparc Patch 124867-01 2007/07/12
{noformat}
h5. How to build with Sun Studio 12
In order to build OpenSolaris with the Sun Studio 12 compilers you need to add the following line to your environment file:
{noformat}
__SSNEXT=
{noformat}
See usr/src/Makefile.master for details (search for __SSNEXT)
You also need to set SPRO_VROOT to the alternate compilers.
h2. +Current Issues+
h3. Fixes needed in OpenSolaris:
h5. 6578211 cw doesn't accept -m32/-m64 options
Not fixed yet.
h5. 6508332 Many lint errors reported on the onnv gate when mars's lint is used.
Not fixed yet.
h3. Fixes needed in the compilers:
h5. 6586975 dtrace cores on onnv built with ss12 fcs
Fix done. Scheduled for a patch.
h5. 6586614 zfs_mknode asserts at kernel built with ss12
Fix done. Scheduled for a patch.
h5. 6595514 kenbus on onnv build with ss12 is 10% slower
Some improvement using SS12 patches. Unclear what the next step is from the CR.
h2. +Resolved Issues+
There are some changes that were required in OpenSolaris source in order to cope with the new compilers. These have already been dealt with, but they are recorded here for posterity. Not all of these are fixed bugs. But I think they are not showstoppers for SS12 adoption at this point.
h3. OpenSolaris fixes
h5. Change -Wu,-xmodel=kernel to -xmodel=kernel.
Both SS11 and SS12 accept -xmodel=kernel. This was fixed a while ago.
aka: 6470487 ld relocation errors occur when building the amd64 kernel for nevada with mars build 30
h5. Use -m64 instead of -xarch=amd64 (to avoid a warning)
This is not a compatible change. SS11 only takes xarch=amd64, and SS12 will warn if you use -xarch=amd64. This was a mistake in SS12 (it makes transitioning difficult) and the compiler group hopes not to repeat the same mistake. This issue is not currently planned to be patched away.
h5. CDE depends on a bug in the C++ compiler that was fixed in a SS11 patch.
I think they're still using SS10.
6561990 CDE 1.7 fails to build on sparc after SunStudio was patched
h5. 6564479 Unable to build libssl using Studio 12
This is a workaround for compiler bug 6555899 (see below)
h5. 6554132 mdb's genunix module overloads the "sys/panic.h" variables causing Studio 12 build to fail
Fixed in build 66. This works around compiler bug 6553840 (see below)
h5. 6538819 ict_tcgeta() accesses lx_termio.c_cc[LX_VEOL] which doesn't exist
Fixed in build 64. New compiler uncovered bad code.
h5. 6470487 ld relocation errors occur when building the amd64 kernel for nevada with mars build 30
This bug included the implementation of __SSNEXT, It was fixed in build 51.
The example code in the bug shows the old wizard option being used to enable 'kernel' mode.
That doesn't work any more, use the regular option.
h3. Compiler fixes
There are also compiler bugs that have been uncovered and are being worked on.
h5. 6555899 Studio 12 semantic checker is too aggressive when checking lines that will never be executed
Invalid but unreachable code is still diagnosed.
This is worked around in libssl by the fix for 6564479 (see above)
h5. 6553840 mdb's genunix module fails to compiler when using Studio 12 build 45 or newer
This was worked around in mdb by the fix for 6554132 (see above)
h2. +Proposed patch snapshot+
The official Solaris CBE has uses a snapshot with a fixed set of patches to guarantee stability. Here is a copy of some internal email that lists the proposed set of patches. Notice we're still waiting for one specific patch. You can find more information about these patches (like which bugs are fixed in each patch) by looking on the SunSolve website, and searching by patch id.
{noformat}
sparc:
126503-01 Sun Studio 12: Patch for Sun Distributed Make 7.8
124863-01 Sun Studio 12: Patch for Sun C++ Compiler
124872-02 dbx 7.6 debugger sun studio 12
124870-01 Sun Studio 12: Patch for Sun Performance Library
124867-01 Sun Studio 12: Patch for C 5.9 compiler
126995-01 Sun Studio 12: Patch for Performance Analyzer Tools
127156-01 Sun Studio 12: Patch for install utilities.
127001-01 Sun Studio 12: Patch for Fortran 95 8.3 Dynamic Libraries
127152-01 Sun Studio 12: Patch for IDE
126495-02 Sun Studio 12: Patch for debuginfo handling
127143-01 Sun Studio 12: Patch for Fortran 95 8.3 Support Library
127000-01 Sun Studio 12: Patch for Fortran 95 8.3 Compiler
124875-02 Sun Studio 12: Patch for Debugger GUI 3.0
127147-01 Sun Studio 12: Patch for update notification
124861-03 Sun Studio 12: Compiler Common patch for Sun C C++ F77 F95
x86:
126504-01 Sun Studio 12_x86: Patch for Sun Distributed Make 7.8
124864-01 Sun Studio 12_x86: Patch for Sun C++ Compiler
124873-02 dbx 7.6 debugger sun studio 12 x86
124869-01 Sun Studio 12_x86: Patch for Sun Performance Library
124868-01 Sun Studio 12_x86: Patch for C 5.9 compiler
126996-01 Sun Studio 12_x86: Patch for Performance Analyzer Tools
127157-01 Sun Studio 12_x86: Patch for install utilities.
127003-01 Sun Studio 12_x86: Patch for Fortran 95 8.3 Dynamic Libraries
127153-01 Sun Studio 12_x86: Patch for IDE
126496-02 Sun Studio 12_x86: Patch for debuginfo handling
127144-01 Sun Studio 12_x86: Patch for Fortran 95 8.3 Support Library
127002-01 Sun Studio 12_x86: Patch for Fortran 95 8.3 Compiler
124876-02 Sun Studio 12_x86: Patch for Debugger GUI 3.0
127148-01 Sun Studio 12_x86: Patch for update notification
126498-02 Sun Studio 12_x86: Sun Compiler Common patch for x86 backend
For the x86 base I am waiting for the patch: 126498-03 as this
fixes two critical bugs for ON.
Once I have that patch we'll look to getting the compilers up on
/ws/onnv-tools.
Does anyone else have any patch requirements ?
Cheers
pete
{noformat}
{toc}
There is a bug keyword (s11-cbe-mars) that should be attached to any Sun Studio 12 bugs or OpenSolaris bugs that need fixing to support building OpenSolaris with SS12.
h5. Get the latest patches
There are been many compiler bugs fixed in Sun Studio 12 patches. So make sure you have at least all the -01 patches for the compilers. It's simplest to just download all the latest patches if you've installed from packages. The first round of patches was included with the ML release of Sun Studio 12, so if you download Sun Studio 12 from the Sun Download Center, it should include the initial patches. You can test this by using 'cc -V'. You should see a patch-id in the output like:
{noformat}
cc: Sun C 5.9 SunOS_sparc Patch 124867-01 2007/07/12
{noformat}
h5. How to build with Sun Studio 12
In order to build OpenSolaris with the Sun Studio 12 compilers you need to add the following line to your environment file:
{noformat}
__SSNEXT=
{noformat}
See usr/src/Makefile.master for details (search for __SSNEXT)
You also need to set SPRO_VROOT to the alternate compilers.
h2. +Current Issues+
h3. Fixes needed in OpenSolaris:
h5. 6578211 cw doesn't accept -m32/-m64 options
Not fixed yet.
h5. 6508332 Many lint errors reported on the onnv gate when mars's lint is used.
Not fixed yet.
h3. Fixes needed in the compilers:
h5. 6586975 dtrace cores on onnv built with ss12 fcs
Fix done. Scheduled for a patch.
h5. 6586614 zfs_mknode asserts at kernel built with ss12
Fix done. Scheduled for a patch.
h5. 6595514 kenbus on onnv build with ss12 is 10% slower
Some improvement using SS12 patches. Unclear what the next step is from the CR.
h2. +Resolved Issues+
There are some changes that were required in OpenSolaris source in order to cope with the new compilers. These have already been dealt with, but they are recorded here for posterity. Not all of these are fixed bugs. But I think they are not showstoppers for SS12 adoption at this point.
h3. OpenSolaris fixes
h5. Change -Wu,-xmodel=kernel to -xmodel=kernel.
Both SS11 and SS12 accept -xmodel=kernel. This was fixed a while ago.
aka: 6470487 ld relocation errors occur when building the amd64 kernel for nevada with mars build 30
h5. Use -m64 instead of -xarch=amd64 (to avoid a warning)
This is not a compatible change. SS11 only takes xarch=amd64, and SS12 will warn if you use -xarch=amd64. This was a mistake in SS12 (it makes transitioning difficult) and the compiler group hopes not to repeat the same mistake. This issue is not currently planned to be patched away.
h5. CDE depends on a bug in the C++ compiler that was fixed in a SS11 patch.
I think they're still using SS10.
6561990 CDE 1.7 fails to build on sparc after SunStudio was patched
h5. 6564479 Unable to build libssl using Studio 12
This is a workaround for compiler bug 6555899 (see below)
h5. 6554132 mdb's genunix module overloads the "sys/panic.h" variables causing Studio 12 build to fail
Fixed in build 66. This works around compiler bug 6553840 (see below)
h5. 6538819 ict_tcgeta() accesses lx_termio.c_cc[LX_VEOL] which doesn't exist
Fixed in build 64. New compiler uncovered bad code.
h5. 6470487 ld relocation errors occur when building the amd64 kernel for nevada with mars build 30
This bug included the implementation of __SSNEXT, It was fixed in build 51.
The example code in the bug shows the old wizard option being used to enable 'kernel' mode.
That doesn't work any more, use the regular option.
h3. Compiler fixes
There are also compiler bugs that have been uncovered and are being worked on.
h5. 6555899 Studio 12 semantic checker is too aggressive when checking lines that will never be executed
Invalid but unreachable code is still diagnosed.
This is worked around in libssl by the fix for 6564479 (see above)
h5. 6553840 mdb's genunix module fails to compiler when using Studio 12 build 45 or newer
This was worked around in mdb by the fix for 6554132 (see above)
h2. +Proposed patch snapshot+
The official Solaris CBE has uses a snapshot with a fixed set of patches to guarantee stability. Here is a copy of some internal email that lists the proposed set of patches. Notice we're still waiting for one specific patch. You can find more information about these patches (like which bugs are fixed in each patch) by looking on the SunSolve website, and searching by patch id.
{noformat}
sparc:
126503-01 Sun Studio 12: Patch for Sun Distributed Make 7.8
124863-01 Sun Studio 12: Patch for Sun C++ Compiler
124872-02 dbx 7.6 debugger sun studio 12
124870-01 Sun Studio 12: Patch for Sun Performance Library
124867-01 Sun Studio 12: Patch for C 5.9 compiler
126995-01 Sun Studio 12: Patch for Performance Analyzer Tools
127156-01 Sun Studio 12: Patch for install utilities.
127001-01 Sun Studio 12: Patch for Fortran 95 8.3 Dynamic Libraries
127152-01 Sun Studio 12: Patch for IDE
126495-02 Sun Studio 12: Patch for debuginfo handling
127143-01 Sun Studio 12: Patch for Fortran 95 8.3 Support Library
127000-01 Sun Studio 12: Patch for Fortran 95 8.3 Compiler
124875-02 Sun Studio 12: Patch for Debugger GUI 3.0
127147-01 Sun Studio 12: Patch for update notification
124861-03 Sun Studio 12: Compiler Common patch for Sun C C++ F77 F95
x86:
126504-01 Sun Studio 12_x86: Patch for Sun Distributed Make 7.8
124864-01 Sun Studio 12_x86: Patch for Sun C++ Compiler
124873-02 dbx 7.6 debugger sun studio 12 x86
124869-01 Sun Studio 12_x86: Patch for Sun Performance Library
124868-01 Sun Studio 12_x86: Patch for C 5.9 compiler
126996-01 Sun Studio 12_x86: Patch for Performance Analyzer Tools
127157-01 Sun Studio 12_x86: Patch for install utilities.
127003-01 Sun Studio 12_x86: Patch for Fortran 95 8.3 Dynamic Libraries
127153-01 Sun Studio 12_x86: Patch for IDE
126496-02 Sun Studio 12_x86: Patch for debuginfo handling
127144-01 Sun Studio 12_x86: Patch for Fortran 95 8.3 Support Library
127002-01 Sun Studio 12_x86: Patch for Fortran 95 8.3 Compiler
124876-02 Sun Studio 12_x86: Patch for Debugger GUI 3.0
127148-01 Sun Studio 12_x86: Patch for update notification
126498-02 Sun Studio 12_x86: Sun Compiler Common patch for x86 backend
For the x86 base I am waiting for the patch: 126498-03 as this
fixes two critical bugs for ON.
Once I have that patch we'll look to getting the compilers up on
/ws/onnv-tools.
Does anyone else have any patch requirements ?
Cheers
pete
{noformat}