In general, the instructions at https://illumos.org/docs/developers/build/ are pretty good but could use some help.
ln -s ../../opt/ooce/include/cups /usr/include
illumos.sh
needs:
export BLD_JAVA_8=
illumos.sh
needs to specify 5.30 rather than 5.28.
export PERL_VERSION=5.30
--- usr/src/tools/env/illumos.sh Tue Jun 11 17:25:58 2019
+++ illumos.sh Wed Jun 12 04:13:08 2019
@@ -46,7 +46,7 @@
export NIGHTLY_OPTIONS='-FnCDAmprt'
# Some scripts optionally send mail messages to MAILTO.
-#export MAILTO=
+export MAILTO=mike.gerdts@joyent.com
# CODEMGR_WS - where is your workspace at
export CODEMGR_WS="`git rev-parse --show-toplevel`"
@@ -126,7 +126,7 @@
#export PKGVERS_BRANCH=2018.0.0.17900
# Skip Java 8 builds on distributions that don't support it
-#export BLD_JAVA_8=
+export BLD_JAVA_8=
# POST_NIGHTLY can be any command to be run at the end of nightly. See
# nightly(1) for interactions between environment variables and this command.
@@ -294,3 +294,30 @@
SMATCHBIN=$CODEMGR_WS/usr/src/tools/proto/root_$MACH-nd/opt/onbld/bin/$MACH/smatch
export SHADOW_CCS="$SHADOW_CCS smatch,$SMATCHBIN,smatch"
fi
+
+# https://illumos.org/docs/developers/build/
+
+# Set to the current perl version (this is correct for OmniOS r151028)
+export PERL_VERSION=5.30
+export PERL_ARCH=i86pc-solaris-thread-multi-64int
+export PERL_PKGVERS=
+
+# Set to current python3 version (this is correct for OmniOS r151028)
+export PYTHON3=/usr/bin/python3.5
+export TOOLS_PYTHON=$PYTHON3
+
+#export SPRO_ROOT=/opt/sunstudio12.1
+#export SPRO_VROOT="$SPRO_ROOT"
+#export ONLY_LINT_DEFS="-I${SPRO_ROOT}/sunstudio12.1/prod/include/lint"
+export ON_CLOSED_BINS=/opt/onbld/closed
+
+export __GNUC=
+export GNUC_ROOT=/opt/gcc-4.4.4/
+export PRIMARY_CC=gcc4,/opt/gcc-4.4.4/bin/gcc,gnu
+export PRIMARY_CCC=gcc4,/opt/gcc-4.4.4/bin/g++,gnu
+export SHADOW_CCS=gcc7,/opt/gcc-7/bin/gcc,gnu
+export SHADOW_CCCS=gcc7,/opt/gcc-7/bin/g++,gnu
+
+# This will set ONNV_BUILDNUM to match the release on which you are building, allowing ONU.
+export ONNV_BUILDNUM=`grep '^VERSION=r' /etc/os-release | cut -c10-`
+export PKGVERS_BRANCH=$ONNV_BUILDNUM.0