Skip to content

Instantly share code, notes, and snippets.

@kungfoo
Created March 22, 2012 15:44
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save kungfoo/2159108 to your computer and use it in GitHub Desktop.
Save kungfoo/2159108 to your computer and use it in GitHub Desktop.
Installing 1.8.7-p358 with rbenv, when glibc >= 2.14 is installed
build_package_stdout_patch() {
wget 'http://bugs.ruby-lang.org/attachments/download/1931/stdout-rouge-fix.patch'
patch -p1 < stdout-rouge-fix.patch
}
require_gcc
install_package "ruby-1.8.7-p358" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p358.tar.gz" stdout_patch standard
install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz" ruby
@kungfoo
Copy link
Author

kungfoo commented Mar 22, 2012

This will help with installing 1.8.7-p358 when glibc is newer than 2.14. Without the patch it will not compile, yielding a similar result to this:

BUILD FAILED

Inspect or clean up the working tree at /tmp/ruby-build.20120322164533.20365
Results logged to /tmp/ruby-build.20120322164533.20365.log

Last 10 log lines:
callback.func:78:33: error: expected ‘)’ before ‘(’ token
callback.func:79:3: warning: data definition has no type or storage class [enabled by default]
callback.func:79:24: error: ‘proc’ undeclared here (not in a function)
callback.func:79:39: error: ‘argc’ undeclared here (not in a function)
callback.func:79:45: error: ‘argv’ undeclared here (not in a function)
callback.func:82:1: error: expected identifier or ‘(’ before ‘}’ token
dl.c:106:1: error: expected ‘;’, ‘,’ or ‘)’ before ‘static’
make[1]: *** [dl.o] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment