alexgutteridge / rsruby
- Source
- Commits
- Network (6)
- Issues (4)
- Downloads (2)
- Wiki (1)
- Graphs
-
Branch:
master
-
Hi,
I have the Universal binary of R 2.9.0 for Mac OS X from http://www.freestatistics.org/cran/ installed and installed the rsruby gem:
sudo gem install alexgutteridge-rsruby -- --with-R-dir=/Library/Frameworks/R.framework/ResourcesWhenever i require rsruby or run irb -r rsruby i get this error:
irb -rrsruby dyld: NSLinkModule() error dyld: Symbol not found: _rb_complex_new Referenced from: /opt/local/lib/ruby/gems/1.8/gems/alexgutteridge-rsruby-0.5.1.1/lib/rsruby_c.bundle Expected in: flat namespaceIs this a Mac only issue?
Comments
-
I am using RSRuby to perform a complex linear fit and consequent forecasting. The ruby wrapper is responsible for cycling through a very high number of data sets, each time dynamically generating the formula, wiping out old variables and creating new ones.
At unpredictable intervals, I am encountering errors such as:
"segmentation fault" "bus error"
etc. I am not an expert in embedding C in Ruby, and therefore I am not quite sure what kind of traceback I can provide.
I would be happy to provide any info if someone directs me in the right direction.
Best,
OzComments
Here is an example trace I just received while using predict():
caught segfault
address 0xc0f5f4f7, cause 'memory not mapped'
Traceback:
1: makepredictcall(variables[[i]], vars[[i + 1]])
2: model.frame.default(formula = main ~ lag.41 + lag.42 + lag.52 + bihfeatures, data = feature.matrix, drop.unused.levels = TRUE)
3: model.frame(formula = main ~ lag.41 + lag.42 + lag.52 + bihfeatures, data = feature.matrix, drop.unused.levels = TRUE)
4: eval(expr, envir, enclos)
5: eval(mf, parent.frame())
6: lm(main ~ lag.41 + lag.42 + lag.52 + bihfeatures, data = feature.matrix)
7: eval(expr, envir, enclos)
8: function (expr, envir = parent.frame(), enclos = if (is.list(envir) || is.pairlist(envir)) parent.frame() else baseenv()) .Internal(eval(expr, envir, enclos))(expression(model.41 = lm(main ~ lag.41 + lag.42 + lag.52 + bihfeatures, data = feature.matrix)))
aborting ...
Segmentation fault
-
Maybe mkmf changed in ruby 1.9?
'gem install rsruby' results in:
lib/ruby/1.9.1/mkmf.rb:1221:in
dir_config': undefined methodsplit' for true:TrueClass (NoMethodError)
from extconf.rb:3:in `'
Comments
for me it looks like a problem with:
rsruby_c.bundle: mach-o, but wrong architecturePerhaps this file needs to be build on snow leopard. I will try installing from compiled code on my machine...
TimR must have been built with the '--enable-R-shlib'
This is a problem as snowleopard does not have a fortran compiler. installing gfortran works but for some reason R installation has a problem using it. So I cannot get R installed other than using the precompiled version. I don't think it is installing the necessary shared library. So I am stuck...until I either get the R compilation step to recognize the gfortran compiler or find a replacement fortran compiler for mac os x 10.6.
-
Snow leopard compilation problem with ruby 1.8.7 and OS X R version 2.9.2
1 comment Created 2 months ago by harleymI am following the documented installation procedures and the compilation fails as gcc compilation during the configuration check stage is using the -arch x86_64 option and the OS X version of R installed from R-2.9.2.dmg does not include the x86_64 headers although the Rconfig.h file does suggest that these headers are a supported architecture.
Comments
I had the same issue and worked around it as follows. (I assume this issue only arises on 32-bit machines.)
1) Run "ruby setup.rb config -- --with-R-dir=/Library/Frameworks/R.framework/Resources" as per instructions.
2) Manually edit ext/Makefile and remove -arch x86_64 wherever it appears (it was in my Makefile in 3 places). This should just leave -arch i386.It should then compile. Note if you run "ruby setup.rb config" again this re-generates the Makefile, and you will need to edit this again.





Use gem 0.5.1 or ruby1.9.