openindiana - getting rubinius to work

Hey there! This time, we will get rubinius running on openindiana. As there is not package for llvm yet, it get’s compiled within the build.

I got it this far because of crsd. He told me how to get llvm running, so that we could get rubinius to compile. After that dbussink got rbx to compile within two days! He found some really strange things, but in the end, rubinius can run on a solaris platform!


But first, you have to fulfill some requirements. First you have to add the sfe publisher to get the gcc4. You can do that with the command

pkg set-publisher -O sfe

After that install the following packages

Yeah, that’s alot of gnu, but we need it to get everything going. The cause of this are the old versions of solaris software, which do not support many features. The default compiler is even gcc 3.4.3!

After you have installed these packages, install the following package from sfe.

The order is important, as gcc3 and gcc4 set symlinks in /usr/bin. If you install them in another order, the symlink is not correct and you end up having a lot of work.

some patching

After that, we have to fix a small bug in gcc with editing the file /usr/include/spawn.h.

< #ifdef __cplusplus
<   char *const *_RESTRICT_KYWD argv,
<   char *const *_RESTRICT_KYWD envp);
< #else
< #endif
< #ifdef  __cplusplus
<   char *const *_RESTRICT_KYWD argv,
<   char *const *_RESTRICT_KYWD envp);
< #else
< #endif

This fixes a bug in gcc with the __restrict key word.

fix the path

Now that we installed and fix a bunch of things, we need to include the gnu path into our own. Use the following command to get this done

export PATH="/usr/gnu/bin:$PATH"

Yes, it needs to be at the first place or else one of the old solaris binaries get’s chosen and then, nothing works and produces weired errors.

getting rbx to compile

with an own build

If you want to build rbx yourself, get the code from After that, configure and rake and everything should be fine.

with rvm

If you want to get it working with rvm, install rvm like normal. After that you can simply install rbx with

rvm install rbx

That’s all you need.


After dbussink fixed all the errors, rbx compiles fine, when the toolchain is there. To get to this point was not easy, but we did it. So have a lot of fun with hacking on and using rubinius!