[BioRuby] Installing Ruby 1.9 on CentOS 5.4

Peter Cock p.j.a.cock at googlemail.com
Mon Nov 7 09:59:17 UTC 2011


On Sat, Nov 5, 2011 at 12:10 PM, Naohisa Goto
<ngoto at gen-info.osaka-u.ac.jp> wrote:
>> Note I tried passing -prefix and --prefix to configure, but it didn't
>> accept it - use prefix with no minus at all,
>
> This seems to be very strange. I'm afraid if the machine might have
> serious trouble.

Odd - it worked today. Maybe it wasn't a minus sign last week, but
a different dash if I copied and pasted it from a webpage? Not sure.

> In addition, install libffi is recommended.
>  $ cd ~/Downloads
>  $ wget ftp://sourceware.org/pub/libffi/libffi-3.0.10.tar.gz
>  $ tar zxvf libffi-3.0.10.tar.gz
>  $ cd libffi-3.0.10
>  $ ./configure --prefix=$HOME
>  $ make
>  $ make check
>  $ make install

Done

> "yum install openssl-devel" is also strongly recommended.
>

Done, I'm surprised that wasn't installed on this server already.

> And then, configureing Ruby. For using libraries installed other than
> system-wide directory, additional options to specify paths of C header
> files and libraries shoud be given to CPPFLAGS, LDFLAGS, etc.
>
>  $ tar zxvf ruby-1.9.3-p0.tar.gz
>  $ cd ruby-1.9.3-p0
>  $ ./configure --prefix=$HOME \
>   CPPFLAGS="-I$HOME/lib/libffi-3.0.10/include -I$HOME/include" \
>   LDFLAGS="-L$HOME/lib -Wl,-rpath,$HOME/lib"
>  $ make
>  $ make check
>  $ make install
>
> If you think the gcc in CentOS 5.4 is buggy, adding optflags="-O2"
> to supress optimize level is suggested.
>
> During make check, few error would be happened, due to incomplete IPv6
> network settings, kernel and glibc bug, older libraries bug, etc.
>
> FYI, I have very very old RedHat 4.6 (x86_64), and I've successfully
> installed ruby-1.9.3-p0 in my home directory without root privilege.

That was very encouraging, as it is almost exactly what I'm trying to do :)
I think it was the flags that I was missing.

I also did "gem install soap4r-ruby1.9" as you suggested, and now
BioRuby's test pass using ruby-1.9.3-p0:

$ ruby test/runner.rb
/home/buildslave/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
`require': iconv will be deprecated in the future, use String#encode
instead.
Run options:

# Running tests:

.......................................................................................ignored
attr: {}arrayType
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Finished tests in 130.295656s, 28.4277 tests/s, 164.6333 assertions/s.

3704 tests, 21451 assertions, 0 failures, 0 errors, 0 skips



Do you need to look at this iconv deprecation warning, and the
"ignored attr: {}arrayType" message?

> RedHat 4.6 uses gcc 3.4.6 that may have bug about symbol visibility
> options, and the following error happened during make process.
>
>  Generating RDoc documentation
>  ./ruby: symbol lookup error: /XXXXX/src/ruby-1.9.3-p0/.ext/
>  x86_64-linux/enc/encdb.so: undefined symbol: rb_encdb_declare
>
> For the workaround of  the (very old gcc's) bug, editing Makefile is
> needed. after configure before make.
>
>  $ cp Makefile Makefile.bak
>  $ sed -e "s/-fvisibility=hidden/-fvisibility=default/" Makefile.bak > Makefile
>  $ make clean
>  $ make
>
> Note that the workaround is needed only when you see the symbol
> lookup error. On, CentOS 5.4, it seems the workaround is not needed
> (and it may have bad effect for systems without the problem).

I didn't see that error, so didn't apply this change to the Makefile.

Thank you very much Goto-san :)

Peter




More information about the BioRuby mailing list