In my previous posts I explained that the plain vanilla ruby 1.9 install with rvm wouldn't work on joyent shared accelerators.
The amazing people at joyent actually answered on the forum with a more precise explanation of the problem. So if you get a error like this when compiling ruby on an opensolaris :
Undefined first referenced symbol in file rb_eArgError bug.o (symbol scope specifies local binding) ld: fatal: Symbol referencing errors. No output written to ../../../.ext/i386-solaris2.11/test/bug-3662/bug.so collect2: ld returned 1 exit status
It's not so much a linker error as a problem with gobjcopy (part of the binutils shipped with Solaris). Mamash, a joyent administrator proposes the following solution to this problem :
The problem seems to be related to gobjcopy (part of the binutils shipped with Solaris). Upon extracting Ruby 1.9.x, when you take out the line that calls $(OBJCOPY) in Makefile.in, you should be able to configure/build Ruby just fine. I'm checking whether this has any adverse effects on the resulting binaries/libs, but just playing with the binaries quickly looks fine.(source)
A rare Google find suggests this has to do with the version of gobjcopy shipped with different Solaris Nevada builds.
The rare google find refers to a blog post on Mandy Waite's old blog at sun now become oracle. The blog post entitled "Building Ruby 1.9.1 on Solaris SPARC" explains the whole gobjcopy thing.
Anyway, here is the command line I used to compile my ruby-1.9.2 :
~]rvm install ruby-1.9.2 --patch ~/makefile_nodir.patch -C --enable-shared,--with-openssl-dir=$HOME/.rvm/usr
The makefile patch can be found in the following gist