Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I saw a similar post about Solaris and thought of a similar howto. I've heard of recent news (as in 2013) with the distribution and I learned I could easily update my initial OpenIndiana 151a7 release to hipster (0.5.11-0.151.1.8.1 to be more precise - you can check individual files in the distribution with the link). In this upcoming release, many things are different from what is explained in the old OpenIndiana wiki or the Illumos build howto and its "how to use gcc only" section because of the ownership of SunStudio etc. I've learned a long time ago that setting up an environment for development, or simply to compile a few things like I do, involves more than just having the right software. It's a lot about configuration and information - and development skills when you do develop software.

Software

OpenIndiana uses IPS just like Solaris. pkg install pkgname / pkg search -r keyword and pkg info -r keyword are quite helpful as the GUI frontend packager is broken for the moment in 151a8.

Extra repositories need to be configured to access extra packages:

$ pkg set-publisher -p http://pkg.openindiana.org/sfe

and the encumbered one if applicable

pkg set-publisher -p http://pkg.openindiana.org/sfe-encumbered

On a clean install, I've settled for these 2 big metapackages (about 600mb of downloads total, some few GBs installed) and a few things which appeared appropriate when I compiled fvwm:

sudo pkg install pkg://openindiana.org/metapackages/build-essential@1.0,5.11-0.151.1.8.1:20130803T052718Z
sudo pkg install sunstudio12u1
sudo pkg install pkg:/library/desktop/gtk1@1.2.10-0.151.1.8
sudo pkg install pkg:/library/java/java-gnome@2.30.0-0.151.1.8
sudo pkg install pkg://sfe/library/fribidi@0.19.2,5.11-0.151.1.5:20120805T091919Z

Build-essential contains mostly everything you need including but not limited to:

pkg install -v pkg:/archiver/gnu-tar pkg:/compress/p7zip pkg:/compress/unzip \
pkg:/developer/build/ant pkg:/developer/build/autoconf pkg:/developer/build/automake-110 \
pkg:/developer/build/gnu-make pkg:/developer/build/libtool pkg:/developer/build/make \
pkg:/developer/gnome/gettext pkg:/developer/java/jdk \
pkg:/developer/java/junit pkg:/developer/lexer/flex pkg:/developer/macro/cpp \
pkg:/developer/macro/gnu-m4 pkg:/developer/object-file pkg:/developer/parser/bison \
pkg:/file/gnu-coreutils pkg:/file/gnu-findutils \
pkg:/library/libtool/libltdl pkg:/library/libxslt pkg:/library/pcre \
pkg:/system/library/math/header-math pkg:/text/gawk \
pkg:/text/gnu-diffutils pkg:/text/gnu-gettext pkg:/text/gnu-grep \
pkg:/text/gnu-patch pkg:/text/gnu-sed pkg:/text/groff \
pkg:/text/texinfo pkg:/library/neon pkg:/library/apr-util-13 \
pkg:/developer/library/lint pkg:/system/header pkg:/developer/build/onbld \
pkg:/data/docbook \
pkg:/library/glib2 \
pkg:/library/libxml2 \
pkg:/library/libxslt \
pkg:/library/nspr/header-nspr \
pkg:/library/perl-5/xml-parser \
pkg:/system/library/install \
pkg:/system/library/dbus \
pkg:/system/library/libdbus \
pkg:/system/library/libdbus-glib \
pkg:/library/python-2/python-extra-26 \
pkg:/system/library/mozilla-nss/header-nss

gcc 4.7.3 is the latest available in the hipter branch (pkg://openindiana.org/developer/gcc-47@4.7.3,5.11-0.151.1.8.1:20130802T223703Z).

There is also the gcc-dev and ss-dev metapackages but I'm not sure to what extent they'd add anything to what I have now.

Configuration (highlights from my .bashrc file)

In some cases there might be a need to use another version of gcc than 4.7 but for now I'm using the latest available and have been relying on some suggested configuration from both the OpenIndiana and Illumos site, doing the best I could:

[...]
CW_GCC_DIR="/usr/gcc/4.7/bin/"; export CW_GCC_DIR
GCC_ROOT="/usr/gcc/4.7"; export GCC_ROOT
ONBLD_TOOLS="/opt/onbld"; export ONBLD_TOOLS
ONLY_LINT_DEFS="-I/sunstudio12.1/prod/include/lint"; export ONLY_LINT_DEFS
__GNUC=""; export __GNUC
amd64_LINT="/opt/sunstudio12.1/bin/lint"; export amd64_LINT
i386_LINT="/opt/sunstudio12.1/bin/lint"; export i386_LINT

PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/opt/onbld/bin:/opt/onbld/bin/i386:/opt/sfw/bin:/usr/sfw/bin:/usr/dt/bin:/usr/openwin/bin:/usr/sbin:/usr/gnu/bin/:/usr/sbin/:/sbin:/usr/local/bin:/usr/bin:/usr/ccs/bin:/usr/dt/bin:/usr/gnu/bin/"; export PATH

The challenge(s)

The challenge may be great, even for a developer, which I am not. After configuring my environment, I try to compile fvwm 2.6.5 because it's something standard, it's small and is sort of a landmark piece of software I'm interested in... to see what gives. Trying to improve on the features afforded by the configuration, I thought I had an issue and had to compile glib from source. So I came across this amazing account from this obviously very knowledgeable person who actually compiled this on OI. I realized I didn't need to install any further glib package, but this person maintains a repository of ported compiled software and that can be quite useful considering some of the complexity...

Also, as a general rule, one should pay attention to bug tracking on the platform as well as the mailing lists (especially oi-dev).

Common Build Environment

In the old section of the wiki on building the OI OS proper, there's reference to this tool called CBE 1.7.0. It cannot be installed at this point because it requires SUNWperl510core and force installing this will ruin your acl in my experience. When I succeeded in installing it, I'll admit to having no clue whatsoever on how to use that as it's way over my head and I wish I knew if this can simplify something when compiling userland stuff. What I know is that in the latest releases you have a mini-version of it 1.8.0 (pkg://openindiana.org/developer/build/cbe@1.8.0,5.11-0.151.1.8:20130305T143840Z) so I installed that which doesn't require the old perl dependency. Still nowhere near grasping what it's about (I'll have to read about specs and such) but it's there. I see some 2013 dated thread in the mailing list in the context of contributing SFE packages and pkgbuild.


Questions

  • I was able to build fvwm 2.6.5 easily but does my setup look like a minimally acceptable build environment and is there anything specific that doesn't comply with best practices here?

References and links

Basic admin commands cheat sheet for someone new to SunOS (PDF)

  [1]: http://openindiana.org/pipermail/oi-dev/2013-May/002109.html
  [2]: http://pkg.openindiana.org/hipster/en/index.shtml
  [3]: http://wiki.openindiana.org/oi/Compiler+Migration
  [4]: http://wiki.illumos.org/display/illumos/How+To+Build+illumos
  [5]: http://wiki.illumos.org/display/illumos/How+To+Build+illumos#HowToBuildillumos-BuildingwithGCC-444iewithoutSunStudio
  [6]: http://docs.oracle.com/cd/E23824_01/html/E21802/ips_intro.html#scrolltoc
  [7]: http://docs.oracle.com/cd/E19963-01/html/820-6572/managepkgs.html
  [8]: http://wiki.openindiana.org/oi/Spec+Files+Extra+Repository
  [9]: http://www.fvwm.org/download/
  [10]: http://www.openindiana.co.uk/tags/c-standards
  [11]: http://www.openindiana.co.uk/content/repository-update-73-new-packs
  [12]: https://www.illumos.org/projects/openindiana/issues?page=1
  [13]: http://openindiana.org/mailman/listinfo
  [14]: http://wiki.openindiana.org/oi/Setting+up+the+recommended+build+environment
  [15]: http://comments.gmane.org/gmane.os.openindiana.devel/1887
  [16]: http://sourceforge.net/apps/mediawiki/pkgbuild/index.php?title=Pkgbuild_on_OpenSolaris
  [17]: http://i.stack.imgur.com/xSB2n.png
  [18]: https://blogs.oracle.com/JeffV/entry/comparing_solaris_11_zones_to
  [19]: http://ptribble.blogspot.ca/2013/05/sparse-root-zones-in-tribblix.html
  [20]: http://tribblix.blogspot.co.uk/
  [21]: http://unixed.com/blog/2013/02/the-solaris-11-immutable-zone/
  [22]: http://www.logiqwest.com/dataCenter/Demos/RunBooks/Zones/createBasicZone.html
  [23]: http://www.oracle.com/technetwork/server-storage/solaris/solaris-dtrace-wp-167895.pdf
  [24]: http://www.oracle.com/technetwork/server-storage/solaris11/documentation/solaris-11-cheat-sheet-1556378.pdf
share|improve this question

1 Answer 1

up vote 1 down vote accepted

Thanks for posting this. It looks pretty complete to me.

I think you should focus on the main topic which is how to setup a development host. Things like zones and DTrace and slightly off-topic IMHO. The important thing to keep in mind wrt zones and IPS is that software packages do not necessarily make their way into a zone just because they are installed in the global zone. In fact in standard Solaris the manifest that tells which packages that by default gets inherited from global zone is a pretty short list, possibly in an attempt to keep the footprint of zone to a minimum. This means that sometimes you will explicitly have to install package into the local zone even if it is already installed in the global zone. The good news is that this does not require Internet access from the local zone as it will use the IPS repository in the global zone as an intermediate proxy repo.

Perhaps you can also clarify the aim of your development host a bit further: do you intend the host to be able to build the distro itself or "just" various Linux/Unix OSS packages ?

There's another posting on how to do the equivalent on standard Solaris 11. Since Solaris 11 and OpenIndiana share the same heritage there may be something in that posting you can use.

share|improve this answer
    
Thank you for the answer! The other post you refer to was actually the post I was talking about so I've linked it in the opening sentence. The aim here is exploratory and I'm not gearing this up to compile the whole OS, as I already struggle with some concepts relating to porting more simple software. Thank you for your info about zones as I didn't know it worked like that. This is a work in progress and I'm pretty much a beginner in every single field. –  illuminÉ Aug 13 '13 at 2:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.