Ad

Tuesday, August 23, 2011

Install Ruby 1.8.7-p352 on Arch Linux

I'm returning to Arch Linux for my trusty laptop. After installing RVM and all of the requirements listed in the notes page, I would get compilation errors when trying to install ruby 1.8.7-p352.


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


I was able to find a patch in the AUR version of ruby that fixed the problem.


diff -urB ruby-1.8.7-p352/ext/dl/depend ruby-1.8.7-p352.patched//ext/dl/depend
--- ruby-1.8.7-p352/ext/dl/depend 2007-02-12 23:01:19.000000000 +0000
+++ ruby-1.8.7-p352.patched//ext/dl/depend 2011-07-26 18:25:12.512525291 +0100
@@ -32,15 +32,15 @@

call.func: $(srcdir)/mkcall.rb ./dlconfig.rb
@echo "Generating call.func"
- @$(RUBY) $(srcdir)/mkcall.rb > $@
+ @$(RUBY) $(srcdir)/mkcall.rb | cat > $@

callback.func: $(srcdir)/mkcallback.rb ./dlconfig.rb
@echo "Generating callback.func"
- @$(RUBY) $(srcdir)/mkcallback.rb > $@
+ @$(RUBY) $(srcdir)/mkcallback.rb | cat > $@

cbtable.func: $(srcdir)/mkcbtable.rb ./dlconfig.rb
@echo "Generating cbtable.func"
- @$(RUBY) $(srcdir)/mkcbtable.rb > $@
+ @$(RUBY) $(srcdir)/mkcbtable.rb | cat > $@

debug:
$(MAKE) CPPFLAGS="$(CPPFLAGS) -DDEBUG"

No comments:

Post a Comment