Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add ON_CLOSED_BINS example for OI


You need an illumos-based operating system to build illumos (cross-compilation is not supported). If you don't have one installed, the quickest way to get started is to download and install either OpenIndiana from or OmniOS from . You may use a virtual machine – compilation performance may suffer, but it is functional. Some other distributions support self-hosting, including compilation of illumos-gate, as well. If you have an existing system with OpenSolaris installed, see Updating OpenSolaris to OpenIndiana.

Note: All commands in this guide assume you run them as an unprivileged user. sudo will be prepended to commands which need additional privileges; on some systems pfexec can be used instead, if your user has the correct RBAC profiles. The generic commands below use a $USER variable to define the current (unprivileged) user account's name which will ultimately be used to compile the project. If you are not using a stock shell or have manipulated the $USER variable in your environment at a site, system, or user level, you are responsible for diagnosing and addressing any consequences.


The source code was traditionally built using Sun's closed-source compiler suite, which was named Sun Studio at the time of the illumos fork.  We now build illumos with GCC, but you will still need some tools from Sun Studio and those are available as packages in the legacy OpenSolaris repository.


The primary version of GCC necessary for development and integration 4.4.4 (4.4.4-il-4) should have been installed on your system when you installed the prerequisites above.  If for some reason that didn't happen (old build system, or the like), tarballs are available as described in the initial heads-up notice  2012-06-15 Illumos will now build with GCC 4.4.4 + patches.  We are presently also using GCC 7 as a shadow compiler as part of our effort to switch to GCC 7 for all builds (see bug 9996).

titleOpenIndiana Hipster 20161030

OpenIndiana Hipster 20161030 ships with gcc-4.4.4-il-3, so make sure to update that package to -il-4 before building.

Building with 4.4.4-il-3 leads to build failures with warnings as below in the mail_msg and nightly.log:

../../i86pc/os/trap.c:2188: error: unknown conversion type character '-' in format [-Wformat]
../../i86pc/os/trap.c:2188: error: too many arguments for format [-Wformat-extra-args]


Unfortunately, Sun Studio lint is currently required even for GCC-only builds.  We currently deliver Lint libraries built using the closed Sun Studio version of lint (see bug 10011).  OmniOS includes this in its sunstudio12.1 package.  On OpenIndiana it's delivered as part of developerof the developer/sunstudio12u1/cc package, which you shouldn't install explicitly if you've already installed is installed automatically as part of installing the build-essential metapackage (see above).

Sun Studio compilers

If you wish to attempt to build using the legacy Sun Studio compiler, you need specifically patched versions of both Studio 12 (used to compile) and 12.1 (used for lint) to get consistent results. These are no longer distributed by Oracle and can not be legally found in the open Internet.


The settings we are going to focus on for now are the following:

  • NIGHTLY_OPTIONS - You may remove the "l" (lowercase L) option from the string, this will disable lint checking of the code to save some time during the build, but patches should be linted.
  • CODEMGR_WS - This should be the root of the directory with the code. If you followed the previous example, it will be /code/illumos-gate.
  • STAFFER - Change this to the name of the non-privileged user you use on the system
  • VERSION - Set this to illumos-gate or whatever version string you want for the build


On OpenIndiana you'll likely see something like 'Branch: 20172018.0.0.16790'. You have to use PKGVERS_BRANCH to overwrite this value, you can't use ONNV_BUILDNUM for this purpose. You should set PKGVERS_BRANCH in a form of YEAR.MAJOR.0.0 , where YEAR is the current year and MAJOR is more greater that the one used by OpenIndiana. For example:  

Code Block
export PKGVERS_BRANCH=20172018.3999.0.0

Building with only GCC-4.4.4-il (i.e. without using Sun Studio at all)

NOTE: This configuration is recommended for new most users.

If you are building with solely GCC 4.4.4 (i.e. you do NOT wish to use Sun Studio at all), you must append these lines to the end of


Before submitting a patch, we request that you perform a full, non-incremental build including the lint stage.

Building specific components, and other info