Child pages
  • snv_138 on snv_134 build notes
Skip to end of metadata
Go to start of metadata

Instructions for building snv_138 on snv_134.

It's necessary to get snv_134 up to a build between snv_137 and snv_143 before you can go to later builds.

Builds prior to snv_136 built SVR4 packages, 136 and later will output to an IPS pkg repo.

Create an user named openindiana
Login as openindiana
Note: You will need to have the extras repo set up on the box you are doing this for. Please see here.

Set some environment variables:

These are specific to our build environment, but you can achieve the same by obtaining those downloads and altering the environment variables.

pfexec svcadm enable -r autofs
pfexec svcadm enable -r nfs/client

Install Sun Studio:

Before beginning, make sure you don't have Sun Studio installed:

pkg info | grep sunstu

If they are installed, remove. Eg:

pfexec pkg uninstall -r pkg:// \
                 pkg:// \
                 pkg:// \

Keep running "pkg info | grep sunstu" and uninstalling until nothing reports back.

Then double check there is nothing under /opt related to compilers, and remove as necessary, eg:

ls -l /opt
pfexec rm -rf /opt/SUNWspro
pfexec rm -rf /opt/sunstudio12.1
pfexec rm -rf /opt/onbld

Then install the tarballs:

pfexec mkdir /opt/SUNWspro
bzip2 -dc ${SS12} | (cd /opt/SUNWspro; pfexec tar xvf -)
gzip -dc ${SS12u1} | (cd /opt; pfexec tar xvf -)
pfexec ln -s ../sunstudio12.1 /opt/SUNWspro

Install Dependencies:

pfexec pkg install \
developer/opensolaris/osnet \
runtime/perl-510 \

Set up your environment:


pfexec /sbin/zfs create -p rpool/export/builds/$GATE
pfexec chown `id -u`:`id -g` /export/builds/$GATE
cd /export/builds/$GATE

unset CC
unset CXX
PATH=/opt/onbld/bin:/opt/onbld/bin/`uname -p`:/opt/SUNWspro/bin:/usr/bin:/usr/sbin:/usr/ccs/bin
export PATH

To build 138 you'll need to update pkggate before doing the build:

pfexec pkg install -v FSWxorg-headers developer/opensolaris/pkg5 developer/swig

hg clone ssh:// pkg-gate
cd pkg-gate/src
dmake install
cd ../proto/root_`uname -p`

Copy pkg files:

tar cf - * | (cd / ; pfexec tar xvpf -)

Now we can grab the source for onnv_138:

cd /export/builds/$GATE
hg clone
cd onnv-gate

hg update onnv_$SNV

Do the binaries:

bzip2 -dc $DLCMIRROR/osol/on/downloads/b$SNV/on-closed-bins-nd.`uname -p`.tar.bz2 | tar xpvf -
bzip2 -dc $DLCMIRROR/osol/on/downloads/b$SNV/on-closed-bins.`uname -p`.tar.bz2 | tar xpvf -
cp $DLCMIRROR/osol/on/downloads/b$SNV/on-crypto.i386.tar.bz2 .
cp $DLCMIRROR/osol/on/downloads/b$SNV/on-crypto-nd.i386.tar.bz2 .

Create a custom version off

Note: We have removed the debug flags and also the -a, -C and -l flags (create cpio archives, check for cstyle/hdrck errors, make lint respectively)

cat usr/src/tools/env/ | \
sed s/^NIGHTLY_OPTIONS=\".*\"\;/NIGHTLY_OPTIONS=\"-nmprt\"\;/ | \
sed s/GATE=testws\;/GATE=$GATE\;/ | \
sed s%CODEMGR_WS=\"/export/\$GATE\"\;%CODEMGR_WS=\"`pwd`\"\;% | \
sed s/^STAFFER=nobody\;/STAFFER=openindiana\;/ \

Edit STAFFER and MAILTO in as appropriate, then add the following to the bottom of

cat <<EOF >>
i386_LINT=/opt/sunstudio12.1/bin/lint; export i386_LINT
amd64_LINT=/opt/sunstudio12.1/bin/lint; export amd64_LINT
sparc_LINT=/opt/sunstudio12.1/bin/lint; export sparc_LINT
sparcv9_LINT=/opt/sunstudio12.1/bin/lint; export sparcv9_LINT

The "CW_NO_SHADOW" disables shadow compilation. Shadow Compilation basically compiles everything with CC and GCC to ensure both compile cleanly.

Build the ONBLD Tools:

ksh93 usr/src/tools/scripts/ \
 "cd usr/src/tools && dmake install"

From reading the comments in the Makefile it is apparent that the above is all that is needed as we are building with the closed binaries. The other make bit sets stuff up for insiders with complete source trees.

Should the above still contain the "&& dmake setup" from the blog command it copies?  If not is there any need for the "cd .."
What does "dmake setup" do? The target doesn't seem to exist.
James McPherson wrote in a post the following

$ ksh93 usr/src/tools/scripts/ envfile \
	"cd usr/src && \
	PATH= (insert PATH statement here) dmake setup && \
	cd tools && dmake install"

*What does dmake setup do?
*Why did the build succeed without issuing dmake setup
*What is the correct order? First install and than setup or reverse.

Now install the newly built onbld tools:

pfexec cp -r usr/src/tools/proto/root_i386-nd/opt/onbld /opt

Now Build:

time nightly
  • No labels


  1. I need to remove redistributable package as it affects the pkg system in a way similar to entire package.

    for i in redistributable ; do
      if ( pkg verify -Hq ${i} ) ; then
        pfexec pkg uninstall -vr ${i}

    I can build b138 on b134 without any error except the perl error which was ignored. However, I cannot boot the installed system. The system crashes during boot. I try install the b138 from and has the same kind of crash. The b145 from works for me and I can build b145 on b145 from without any problem. Any suggestion for the b138 on my machine?

  2. If we're removing -l from $NIGHTLY_OPTIONS, do we need to declare the path to lint in our ?

    1. By removing debug flags -D & -F running lint is disabled automatically
      WARNING: DEBUG build not requested; disabling lint.

  3. Anonymous

    When adding user "openindiana" on oi_148, I got user name too long warning but account still got created.

    root@oi:/home/tjyang/gettext-0.16.1# uname -a
    SunOS oi 5.11 oi_148 i86pc i386 i86pc Solaris
    root@oi:/home/tjyang/gettext-0.16.1# useradd openindiana
    UX: useradd: openindiana name too long.
    root@oi:/home/tjyang/gettext-0.16.1# grep openindiana /etc/passwd
    root@oi:/home/tjyang/gettext-0.16.1# passw