|
|
Once you have downloaded the tarballs that you need, here are the
steps to build the sources.
Suppose you are using /export/testws as your workspace.
1. cd to /export/testws and unpack the sources and encumbered
binaries, e.g.,
$ bzcat on-src-DATE.tar.bz2 | tar xf -
$ bzcat on-closed-bins-DATE.PLATFORM.tar.bz2 | tar xf -
The sources will unpack into "usr/src" and the binaries will unpack
into "closed/root_PLATFORM" (i.e., closed/root_i386 or
closed/root_sparc).
2. Install the compiler according to the instructions at the download
site. (Of course, if the compilers have not changed since you last
installed them, there is no need to install them again.) The result
should have the compilers installed in /opt/SUNWspro.
Please note that the compiler that comes with the Solaris Developer
Express release is Studio 12, which is not the standard compiler
for OpenSolaris code. If you use Studio 12, you will need to set
__SSNEXT to the null string in your environment file. Please do
report problems with Studio 12, particularly if the problem goes
away when you use Studio 11 (the current standard compiler).
If you already have the Studio 11 compiler installed, you can use
it, provided you have the following patches installed:
SPARC:
120760-07 Sun Studio 11: Compiler Common patch for Sun C C++ F77 F95
121017-02 Sun Studio 11: Patch for Sun C++ 5.8 compiler
121021-02 Sun Studio 11: Patch for Fortran 95 Dynamic Libraries
121019-02 Sun Studio 11: Patch for Fortran 95 8.2 Compiler
121015-02 Sun Studio 11: Patch for Sun C 5.8 compiler
x86:
120759-06 Sun Studio 11_x86: Sun Compiler Common patch for x86 backend
121016-02 Sun Studio 11_x86: Patch for Sun C_x86 5.8 Compiler
121018-02 Sun Studio 11_x86: Patch for Sun C++ 5.8 compiler
You may find it easier to install the Studio 11 compilers using the
tarballs, rather than installing them as packages.
3a. Remove the existing onbld tools, if any.
- If this is the first time you are installing build tools, skip ahead
to step 3b.
- Otherwise, use pkgrm(1M) to remove the old package.
3b. Install the current onbld tools.
- The SUNWonbld package is a pkgadd-format directory that has been
archived using tar and bzip2. Unpack it in a temporary directory and
use pkgadd(1M) to install it. For example:
# cd /var/tmp
# bzip2 -dc /path/to/SUNWonbld-DATE.PLATFORM.tar.bz2 | tar xf -
# pkgadd -d onbld SUNWonbld
4. Update your environment and login dot-files if this is the first
time you have installed the compiler and/or build tools.
- Add /opt/SUNWspro/bin and /opt/onbld/bin to your $PATH.
- Either remove /usr/ucb from your $PATH, or put it at the end.
5. Create an environment file to guide tools like nightly(1) and
bldenv(1).
- copy /export/testws/usr/src/tools/env/opensolaris.sh to
/export/testws. It doesn't have to go in /export/testws, but
that's a convenient place to put it. Nor do you have to keep the
name opensolaris.sh, but that's the name we'll use in these notes.
Then make the following changes in your opensolaris.sh:
- change GATE to the name of the top-level directory (e.g.,
"testws").
- change CODEMGR_WS to the top-level path (e.g., "/export/testws").
- change STAFFER to your login.
- (optional) customize VERSION. This is the string that "uname -v"
will print.
6. To build a complete set of archives, cd to /export/testws, utter
nightly ./opensolaris.sh &
and find something else to work on for a few hours. You can
monitor the build's progress using ptree(1). nightly(1) will send
mail to $MAILTO when it has finished.
The results mail from nightly(1) will have an overview of the build
results. A copy of the mail text and a more detailed log file will
be available in the workspace (/export/testws/log/log.
|