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.

Prerequiste
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
SS12=/net/pkgdev/storage/data/export/downloads/sunstudio12-patched-ii-2009Sep-sol-x86.tar.bz2
SS12u1=/net/pkgdev/storage/data/export/downloads/sunstudio12u1-patched-ii-2010Feb-sol-x86.tar.gz
DLCMIRROR=/net/pkgdev/storage/data/export/downloads/dlc.sun.com

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://opensolaris.org/developer/sunstudioexpress \
                 pkg://opensolaris.org/sunstudioexpress \
                 pkg://opensolaris.org/ss-dev \
                 pkg://opensolaris.org/developer/sunstudio12u1

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
etc

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 \
runtime/perl-510/extra

Set up your environment:

SNV=138
GATE=OpenIndiana_b$SNV

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://anon@hg.opensolaris.org/hg/pkg/gate 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 http://pkgdev.openindiana.org/hg/onnv-gate
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 opensolaris.sh

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/opensolaris.sh | \
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\;/ \
> openindiana.sh

Edit STAFFER and MAILTO in opensolaris.sh as appropriate, then add the following to the bottom of opensolaris.sh:

cat <<EOF >> openindiana.sh
PKGPUBLISHER_REDIST=openindiana.org
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
CW_NO_SHADOW=1; export CW_NO_SHADOW
EOF

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/bldenv.sh openindiana.sh \
 "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/bldenv.sh 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 openindiana.sh
  • No labels

4 Comments

  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}
      fi
    done
    

    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 openindiana.org and has the same kind of crash. The b145 from openindiana.org works for me and I can build b145 on b145 from openindiana.org 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 ?opensolaris.sh

    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
    openindiana:x:103:1::/home/openindiana:/bin/sh
    root@oi:/home/tjyang/gettext-0.16.1# passw