The recommended OS to build OpenIndiana on will always be the latest development release at the time you are building. The exception to the OS rule is for bootstrapping OpenIndiana from OpenSolaris where you should have the latest development binary release (b134) installed which can be obtained from Genunix. (In case you want to upgrade an older OpenSolaris install to osol-134, follow How to upgrade to osol-134).
The recommended build environment uses a patched Sun Studio 12 to compile along side a patched Sun Studio 12.1 to provide the lint. Both compilers are available to download as tarballs from here:
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 /opt/sunstudio12.1 /opt/onbld # etc |
Then install the tarballs:
pfexec mkdir /opt/SUNWspro cd /opt/SUNWspro bzip2 -dc $DOWNLOAD_LOCATION/sunstudio12-patched-ii-2009Sep-sol-{x86,sparc}.tar.bz2 | pfexec tar xvf - cd /opt gzip -dc $DOWNLOAD_LOCATION/sunstudio12u1-patched-ii-2010Feb-sol-{x86,sparc}.tar.gz | pfexec tar xvf - pfexec ln -s ../sunstudio12.1 /opt/SUNWspro |
Note: Sun Studio 12.2 is available but has not been tested so please do not use at this time.
Install some packages:
pfexec pkg install developer/gcc-3 \ developer/opensolaris/pkg5 \ developer/swig \ developer/build/automake-110 \ developer/build/autoconf \ developer/versioning/subversion |
Install CBE 1.7.0 from:
svn co svn+ssh://anon@svn.opensolaris.org/svn/jds/jds-cbe/trunk jds-cbe |
or http://dlc.sun.com/osol/jds/downloads/cbe/test/. The ./cbe-install script is not meant to be run as root. It has to be run as user with "Software Installation" or "Primary Administrator" rights! (See /etc/user_attr).
Would you like the CBE installer to install this package for you? \[yes\] no |
Would you like to skip all missing packages? \[no\]: yes |
Enter the base directory (prefix) of the cbe \[/opt/dtbld\]: enter for default |
Would you like to do this now? \[no\]: enter for default |
Would you like to configure more compilers for use with the Desktop CBE? \[no\]: enter for default |
Please select the default compiler \[3\]: enter for default |
Answer 'no' to all remaining questions.
Then remove gnu make, so that (the other) make is the default Different consolidations require different make versions so do not remove any binaries you install while setting up your environment. Please pay close attention to the PATH variables that are set in each consolidations build instructions.
Get GNU gettext (at least version 0.16.1):
http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.1.1.tar.gz and install it using: ./configure --prefix=/opt/dtbld && make && pfexec make install
Alternative: You may use pkgbuild from CBE (above).
This method requires the 0.16.1 version:
http://ftp.gnu.org/pub/gnu/gettext/gettext-0.16.1.tar.gz
\[18:04\] <Meths> Otherwise, cd jds-cbe-dir; pkgbuild \-bb CBEgettext.spec \[18:04\] <Meths> cd \~/packages/PKGS/CBEgettext/reloc \[18:05\] <Meths> tar cf - * \| ( cd /opt/dtbld; pfexec tar xvpf - ) |
Once you've setup and installed the recommended build environment, the build process can/shall be entirely done as user.