Monthly Archives: January 2011

Step 0 to next BeleniX

For the next BeleniX we are planning to pull some binary packages out of OpenIndiana and build some from source ourselves. The primary things we need at this point include the base Gcc 4.5 compiler toolchain and properly working RPM5 packaging. We subsequently need an importer to convert IPS binary packages into RPM5 since we want to pull some stuff from OpenIndiana (like Gnome).

I was playing around with RPM5 on OpenIndiana and now have a working setup, though not properly bootstrap packaged yet. The other major task was to get Gcc 4.5.2 built with all features enabled. It was quite a task given that C++ GMP stuff is involved and that the Gcc 4.3.2 compiler on OpenIndiana is heavily broken and buggy.

Details of how I got to a properly working Gcc 4.5.2 toolchain is here: http://mail.opensolaris.org/pipermail/belenix-discuss/2011-January/001491.html

One interesting new feature in Gcc 4.5 is the support for Link Time Optimizations which begins to match what is being offered by the Interprocedural Optimizations feature in SUN Studio. The Gcc 4.3.2 piece in OI has at least these problems:

  1. It provides libssp.so which the compiler looks for libssp_nonshared.a. Libssp is used if compiler options to provide stack protection are enabled.
  2. It provides an improperly linked libstdc++ as a result of which C++ exception handling is broken with g++. The library search order in libstdc++ should first be libgcc_s.so followed by libc.so since there exists the same stack Unwind handler function in both with different parameters. TheĀ  libgcc_s version is what libstdc++ needs to use.
  3. It is not able to compile the Parma Polyhedra Library required by Gcc to support loop optimizations via advanced Polyhedral methods. Some C++ template handling seems to be broken.

In any case now that I have the Gcc 4.5.2 toolchain working properly I would be re-building RPM5 with that and creating a bootstrap framework next.

OpenGrok Server

Update: The links in this post are now obsolete and I am no longer maintaining this stuff. However there is now excellent community supported OpenGrok cross reference available at the following URL: http://code.metager.de/source/.

Given that not many realize the powerful features and polished interface that OpenGrok provides, I decided to put up an OpenGrok server to cross-reference some common major FOSS software stacks on a development machine used by BeleniX folks: http://belenix.v12.su/source/. It contains stuff like the Linux kernel trunk, Python, Ruby, OpenJDK, Glibc among others.

I also have put up patched kernels corresponding to Fedora 13 and 14 releases. It was in interesting exercise to automate getting patched Fedora kernels. Since I wanted as much of history info as possible I did not use tarballs. Rather I checked out the base kernel patch release from Git and applied all the patches in order as listed in kernel.spec and then I did a git pull to merge the fedora kernel git bundle into a subdirectory in the main kernel tree. You can grab the script from here: http://www.belenix.org/binfiles/get-fedora-kernel.

I will add some more stuff shortly. In addition it will take me a few more days to setup an auto-sync mechanism to keep the source trees synced to upstream every couple of days. For now the tress are being manually updated. Hopefully this will prove to be an useful resource going forward.