Several Tips to build the opensolaris ON repository

In the last weekend, I tried to build the latest onnv-gate on my laptop (which is running snv_66).  I checked out the onnv-gate repository, and installed SUNWonbld.

In recently Solaris Developer Express build, SunStudio 12 is installed out of box. While the ON (Operating platform and Networking) repository still requires SunStudio 11. Move /opt/SUNWspro to /opt/sunstudio_12/SUNWspro, and install SunStudio 11 to /opt/sunstudio_11/SUNWspro, then create a symbol link /opt/SUNWspro referring to SunStudio 11.

I found changing SunStudio path at the $PATH in nightly(1) does not take effect, seems that the "cw -_cc" still gets the compiler from /opt/SUNWspro/bin.

Then launch nightly(1) to build the code. I found that some env variables may impact the building. At the beginning, I could not successfully build the code with my own account,
but I could make it with "gk". Thanks to Yandong, he reminded me to use "env -" to execute nightly(1):

$ env - /opt/onbld/bin/nightly ./opensolaris.sh

Besides that, seems that I need to remove the usr/platform/i86pc/ilb/fm/fmd and  usr/platform/i86pc/ilb/fm/fmd/plugins in the closed binary directory. Otherwise, nightly(1) would fail to build the usr archive:

Failed to create i86pc usr archive:     2110 blocks
cpiotranslate: usr/platform/i86pc/lib/fm/fmd/plugins: no packaging info
cpiotranslate: usr/platform/i86pc/lib/fm/fmd: no packaging info

And I also noticed bldenv(1) does not recognize the debug option in the env file (i.e., opensolaris.sh), while you need explicitly set the debug option in the command line:

$ bldenv -d ./opensolaris.org.

P.S., from the [osol-discussion] thread, it seems that SunStudio 12 could successfully build the latest onnv-gate repository now.