Posts Tagged ‘ror’

gem environment

Thursday, August 20th, 2009

/home/ror/test# gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.5
- RUBY VERSION: 1.9.1 (2009-07-16 patchlevel 243) [sparc-solaris2.11]
- INSTALLATION DIRECTORY: /usr/bin/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /usr/bin/bin/ruby
- EXECUTABLE DIRECTORY: /usr/bin/bin
- RUBYGEMS PLATFORMS:
- ruby
- sparc-solaris-2.11
- GEM PATHS:
- /usr/bin/lib/ruby/gems/1.9.1
- /root/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://gems.rubyforge.org/

GNU libiconv library: Solaris 10 does not meet what ruby/rails need

Thursday, August 20th, 2009

Get a copy from sunfreeware.com. I used version 1.11. Gunzip/tar xvf the archive and then cd to the newly created directory.

./configure --prefix=/usr
make
make install

This should be done before you compile ruby. If not, you'll have problem down the road.

Compile Ruby on Solaris 10

Thursday, August 20th, 2009

I downloaded ruby-1.9.1-p243 and gunzip/tar’ed it. When doing

./configure -prefix=/usr/bin -enable-pthread; make; make install

(BTW, I should have used /usr as bin dir is implied in the build)

[note: Second time when I did it, I ran the following command to compile ruby in Solaris 10:

./configure --enable-pthread --prefix=/usr --exec-prefix=/usr
make
make install

--enable-pthread is not needed if your tck/tl did not compile with this option.
]

It spits error like “no output file specified”. Looking into the C codesm under lib, I chnaged several lines in mkmf.rb, which solved the problem. The chnaged line as reflected in diff:

/home/ror/ruby-1.9.1-p243# diff lib/mkmf.rb lib/mkmf.rb.orig
1918,1919c1918,1919
< COMPILE_C = config_string(’COMPILE_C’) || ‘$(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG) $@ -c $<’
< COMPILE_CXX = config_string(’COMPILE_CXX’) || ‘$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG) $@ -c $<’

> COMPILE_C = config_string(’COMPILE_C’) || ‘$(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<’
> COMPILE_CXX = config_string(’COMPILE_CXX’) || ‘$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<’
1921c1921
<   “$(CC) #{OUTFLAG} conftest $(INCFLAGS) $(CPPFLAGS) ” \

>   “$(CC) #{OUTFLAG}conftest $(INCFLAGS) $(CPPFLAGS) ” \

/home/ror/ruby-1.9.1-p243# uname -a
SunOS zone100-246 5.11 snv_79a sun4v sparc SUNW,Sun-Fire-T200

Did a sym link to make ruby in PATH again:

ln -s bin/ruby ruby

Now I have the newest ruby on Solaris!

:/home/ror/ruby-1.9.1-p243# /usr/bin/bin/ruby -v
ruby 1.9.1p243 (2009-07-16 revision 24175) [sparc-solaris2.11]