Project

General

Profile

Actions

Feature #5517

closed

/hipster - add recent ruby (2.2.0) to oi-build

Added by Predrag Zečević almost 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
OI-Userland
Target version:
-
Start date:
2015-01-09
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

Hi,

Is it possible to have latest ruby on OI?
Can ruby-19 be replaced with/or installed together with ruby-22 ?

Needed because of (for example):

$ uname -rosv
SunOS 5.11 illumos-5ff8cfa Solaris

$ pfexec gem install /opt/Vagrant/pkg/vagrant-1.7.2.gem
ERROR:  Error installing /export/NoBackup/Vagrant/pkg/vagrant-1.7.2.gem:
        vagrant requires Ruby version >= 2.0.0.

$ pkg info ruby-19
          Name: runtime/ruby-19
       Summary: Ruby, RubyGems, and Rake
      Category: Development/Ruby
         State: Installed
     Publisher: openindiana.org
       Version: 1.9.3.551
        Branch: 2014.1.3.0
Packaging Date: November 25, 2014 11:31:55 AM 
          Size: 22.70 MB
          FMRI: pkg://openindiana.org/runtime/ruby-19@1.9.3.551-2014.1.3.0:20141125T113155Z

Best regards.

Actions #1

Updated by Predrag Zečević almost 8 years ago

I was playing around, and decided to built it on my own. This is based on https://github.com/mitchellh/vagrant/wiki/Installing-Vagrant-from-source document:

# 32bit compilation
export PREFIX=/opt/SFW
export PATH=${PREFIX}/bin:${PREFIX}/sbin:/usr/gnu/bin:/usr/local/bin:/usr/bin:/usr/sfw/bin:/usr/X11/bin:/usr/sbin:/sbin:/usr/demo/expect:/usr/perl5/5.16/bin

commonINCLUDE="-I${PREFIX}/include -I/usr/gnu/include -I/usr/include -I${PREFIX}/apr/include -I/usr/include/readline -I/usr/include/ncurses" 
export CFLAGS="-lstdc++ -m32 -march=native -D_POSIX_PTHREAD_SEMANTICS ${commonINCLUDE} -std=c99 " 
export CXXFLAGS="${commonINCLUDE}" # maybe not needed....
export LDFLAGS="-R${PREFIX}/lib -R${PREFIX}/apr/lib -R/usr/gnu/lib -L${PREFIX}/lib -L${PREFIX}/apr/lib -L/usr/gnu/lib" 
export LIBS="-lnsl -lsocket" 
export MAKE=gmake

gmake distclean
./configure --prefix=${PREFIX}/ruby/2.2 --enable-shared
gmake -j1
gmake install-cross

pfexec gmake -n install

Now it is easy to get Vagrant working on OI (${PREFIX}/ruby/2.2 has to be added in front of PATH if you do not want to specify full command line):

cd /var/tmp
[[ -d Vagrant ]] && rm -rf Vagrant
git clone https://github.com/mitchellh/vagrant.git Vagrant

cd Vagrant

pfexec gem install bundler
bundle install
pfexec rake install
# TO Remove: pfexec gem uninstall vagrant

Regards.

Actions #2

Updated by Alexander Pyhalov almost 8 years ago

Resolved in https://github.com/OpenIndiana/oi-userland/commit/5948ae783c84e52ac6b75986fb651d3d0c1cade6 .
As ruby 2.2 libraries are not binary compatible with ruby 1.9, for now we don't add require-any dependency on runtime/ruby-22 to runtime/ruby.

Actions #3

Updated by Ken Mays almost 8 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Closed

Actions

Also available in: Atom PDF