- Downloading a source tarball (ccd-src-DATE.tar.bz2)
- Checking out code from the CCD subversion
wokspace.
Access is via svn+ssh. Anyone may checkout the
repository as user "anon" as shown below.
% svn
co svn+ssh://anon at svn dot opensolaris dot org/svn/companion/core/usr
For more information about using subversion see SVN
Help. The svn repository is updated more often than the tarball
and is probably the best choice.
General Prerequisites
Building the CCD is similar to building the SFW and
Operating System/Networking (ON) consolidations from source.
If you are not familiar with building SFW or ON
from opensolaris.org, please read the build
instructions for ON and SFW
and the detailed
documentation
before starting your build. You will also need the following shared
build/install-time tools:
- compiler: Sun Studio 11 with patches
which can be obtained from
the
Tools community.
- compiler: gcc 3.4.3 with patches as delivered with Solaris
Express build 22 or later, or packages from SFW build 22 or later.
- ON build tools package (SUNWonbld-DATE.PLATFORM.tar.bz2)
SUNWonbld
package from the ON download site.
Like SFW, the CCD does not use BFU or BFU archives. There are no closed
binaries; the entire consolidation is Open Source.
Build the CCD consolidation on any OpenSolaris
distribution compatible with the Solaris Express release no more than two builds
older than the CCD sources. For example, to build CCD sources for build 78, your distribution must be compatible with Solaris Express build 76 or later. Consult your vendor's documentation for information about compatibility with Solaris Express. This latest CCD version builds best on build 76 or later.
You must also have installed the full set of CCD packages that are
no less than two
builds old. This requirement exists because of the way some components
reference binaries and headers during the build. Ocaml and emacs are
the most noticeable, but other components may also have this
requirement. If you
are building only a subset of CCD components, it may be
possible to skip installing the entire CCD. However, this
is not recommended.
The release notes will always
contain information about new or additional build environment
requirements that may arise from time to time.
The buildable source may contain source for high key-strength crypto.
Please note that certain countries restrict the redistribution of high
key-strength crypto. If you live in one of these countries, it is your
responsibility to ensure that you are complying with your country's
laws
in this area.
NEWS
- It is no longer necessary to build as root. The fix for bug 6418795 is now in the Companion SVN repository on opensolaris.org. The
current sourcetarball and corresponding packages, 20080131, are based on build 76.
For Further Information
General questions on the CCD consolidation should be directed to the
discussion list at companion dash discuss at opensolaris dot org. Please note that
the
mailing lists are configured to only allow posts from list subscribers
or via the web forum interface. To subscribe, see the Companion
project home.
Installing from Source
Once you have downloaded the CCD source, follow these steps
to build it. Suppose you are using /export/companion as your workspace.
- If your build machine is already configured for building ON
and/or SFW, skip ahead to step 2. Otherwise, follow the compiler and
onbld installation instructions in the ON README. These are steps 2, 3,
and 4 in the onnv_41 README.
- Be sure that your installed copy of gcc is up to date:
$ /usr/sfw/bin/gcc --version | grep GCC
gcc (GCC) 3.4.3 (csl-sol210-3_4-20050802)
- Be sure that your installed copy of cc is up to date. If you've
followed the above instructions, you should see:
$ /opt/SUNWspro/bin/cc -V
Correct output is architecture-dependent:
cc: Sun C 5.8 Patch 121015-02 2006/03/29 (sparc)
cc: Sun C 5.8 Patch 121016-02 2006/03/31 (x86)
NOTE: BOTH COMPILERS are REQUIRED and must be at the correct
revisions!
- cd to /export/companion and unpack the source into your build
area, e.g.
$ bzcat ccd-src-DATE.tar.bz2 | tar xf -
The sources will unpack into "usr/src." Note that CCD does not require
any closed binaries. You can use any convenient location instead of
/export/companion, but these instructions will assume you've unpacked
the source there.
- Create an environment file to guide tools like nightly(1) and
bldenv(1). You CANNOT use the same env file you use to build ON or any
other consolidation! Copy
/export/companion/usr/src/tools/env/freeware-devloper.sh to
/export/companion. It doesn't have to go in /export/companion, but
that's a
convenient place to put it. Nor do you have to keep the name
freeware-developer.sh, but that's the name we'll use in these notes. Then
make the following changes in your freeware-developer.sh:
- change GATE to the name of the top-level directory (e.g.,
"companion").
- change CODEMGR_WS to the top-level path (e.g.,
"/export/companion").
- change STAFFER to your login.
- change MAILTO to your email address.
- Do NOT set VERSION; this will break your build!
- The default options are recommended. Using other options may
cause your build to fail or contain unnecessary noise.
- To build a complete set of archives, cd to /export/companion, and utter
$ su - root
# nohup
# /opt/onbld/bin/nightly ./freeware-developer.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/companion/log/log.).
Pieces of the detailed log are also available under usr/src. For
example, usr/src/install-i386.out will have the log from the x86 "make
install" part of the build.
By default nightly(1) will do a "clobber" build, which includes
a "make clobber" and blowing away any files that earlier builds
installed into $ROOT (/export/companion/proto/root_PLATFORM). To bypass
these steps, do an incremental build with "nightly -i
./ccd-opensolaris.sh &".
- To build a specific component, first use bldenv(1) to set up
various environment variables:
# cd /export/companion
# bldenv ./freeware-developer.sh
[status information from bldenv]
Next, you must create and partially populate the proto area:
# cd $SRC
# dmake rootdirs
# dmake tools
# dmake headers
Finally, cd into the directory containing the component you wish to
build, and run make:
# dmake -f Makefile.sfw
Note that all sub-makefiles are called Makefile.sfw.