OpenSolaris snv_111b (take 2) relocation error


#1

I followed the directions on :
http://wiki.opscode.com/display/chef/Installation+on+OpenSolaris+2008.11+with+RubyGems

but after validation, I get:
root@osapp:/var/ruby/1.8/gem_home/gems/ohai-0.3.6/lib/ohai/plugins# chef-client

[Thu, 03 Dec 2009 05:40:38 -0800] INFO: Starting Chef Run
ld.so.1: ruby: fatal: relocation error: file
/var/ruby/1.8/gem_home/gems/json-1.2.0/ext/json/ext/generator.so: symbol isinf:
referenced symbol not found
Killed

gem env

RubyGems Environment:

  • RUBYGEMS VERSION: 1.3.5
  • RUBY VERSION: 1.8.7 (2008-08-11 patchlevel 72) [i386-solaris2.11]
  • INSTALLATION DIRECTORY: /var/ruby/1.8/gem_home
  • RUBY EXECUTABLE: /usr/ruby/1.8/bin/ruby
  • EXECUTABLE DIRECTORY: /var/ruby/1.8/gem_home/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86-solaris-2.11
  • GEM PATHS:
    • /var/ruby/1.8/gem_home
    • /root/.gem/ruby/1.8
    • /usr/ruby/1.8/lib/ruby/gems/1.8
  • GEM CONFIGURATION:
  • REMOTE SOURCES:

I wasn’t finding an easy way to reset the exec dir, so I just created a link:

ls -l /var/ruby/1.8/gem_home/bin

lrwxrwxrwx 1 root root 8 Dec 3 04:42 /var/ruby/1.8/gem_home/bin -> /usr/bin

but that didn’t change anything.

At the top of the opscode page it says:
‘On snv_117 I had trouble getting the json gem to build, adding -std=c99 to gcc
options in extconf.rb solved this.’

uh… what?

slocate extconf.rb

/var/ruby/1.8/gem_home/gems/json-1.2.0/ext/json/ext/parser/extconf.rb
/var/ruby/1.8/gem_home/gems/json-1.2.0/ext/json/ext/generator/extconf.rb

ok, so I added ‘-stdc=c99’ to the 2 files found… but when I recompile gems,
it overwrites the files.
So that (obviously) isn’t right.

In my google searches, I didn’t find anything useful in relation to the error.
I’m guessing this is a ruby error more than chef, but some direction to pursue
would be helpful.

Bill


#2

Ok… this is what I ended up doing (with the help of someone who
knows ruby)

I went to:
/var/ruby/1.8/gem_home/gems/json-1.2.0/ext/json/ext/generator/

edited extconf.rb and changed:
$CFLAGS += ’ -Wall’
to
$CFLAGS += ’ -Wall -std=c99’

ran:
ruby extconf.rb

ran:
make
make install

(still no dice… because… ruby was picking up the so from the dir
just above this one!)

cp generator.so …/generator.so

Bill

Bill Levering
idbill@planx.com
KFP: 0C38 4D7E 5B50 94FE 992D 406D 6C81 DE33 5459 A1AC

On Dec 2, 2009, at 10:50 PM, idbill@planx.com idbill@planx.com
wrote:

I followed the directions on :
http://wiki.opscode.com/display/chef/Installation+on+OpenSolaris+2008.11+with+RubyGems

but after validation, I get:
root@osapp:/var/ruby/1.8/gem_home/gems/ohai-0.3.6/lib/ohai/plugins#
chef-client

[Thu, 03 Dec 2009 05:40:38 -0800] INFO: Starting Chef Run
ld.so.1: ruby: fatal: relocation error: file
/var/ruby/1.8/gem_home/gems/json-1.2.0/ext/json/ext/generator.so:
symbol isinf:
referenced symbol not found
Killed

gem env

RubyGems Environment:

  • RUBYGEMS VERSION: 1.3.5
  • RUBY VERSION: 1.8.7 (2008-08-11 patchlevel 72) [i386-solaris2.11]
  • INSTALLATION DIRECTORY: /var/ruby/1.8/gem_home
  • RUBY EXECUTABLE: /usr/ruby/1.8/bin/ruby
  • EXECUTABLE DIRECTORY: /var/ruby/1.8/gem_home/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86-solaris-2.11
  • GEM PATHS:
    • /var/ruby/1.8/gem_home
    • /root/.gem/ruby/1.8
    • /usr/ruby/1.8/lib/ruby/gems/1.8
  • GEM CONFIGURATION:
  • REMOTE SOURCES:

I wasn’t finding an easy way to reset the exec dir, so I just
created a link:

ls -l /var/ruby/1.8/gem_home/bin

lrwxrwxrwx 1 root root 8 Dec 3 04:42 /var/ruby/1.8/gem_home/bin -> /
usr/bin

but that didn’t change anything.

At the top of the opscode page it says:
‘On snv_117 I had trouble getting the json gem to build, adding -
std=c99 to gcc
options in extconf.rb solved this.’

uh… what?

slocate extconf.rb

/var/ruby/1.8/gem_home/gems/json-1.2.0/ext/json/ext/parser/extconf.rb
/var/ruby/1.8/gem_home/gems/json-1.2.0/ext/json/ext/generator/
extconf.rb

ok, so I added ‘-stdc=c99’ to the 2 files found… but when I
recompile gems,
it overwrites the files.
So that (obviously) isn’t right.

In my google searches, I didn’t find anything useful in relation to
the error.
I’m guessing this is a ruby error more than chef, but some direction
to pursue
would be helpful.

Bill