 |
Forums |
Admin Discussion Forums: help Start New Thread
By: Mette Jørgensen
RE: undefined symbol: RSTRING_PTR with ruby 1 [ reply ] 2009-03-12 10:54
|
rsruby-0.5.1 is working perfectly.
Thanks.
But another funny thing is that this morning rsruby-0.5.1.1 was complaining about RARRAY_LEN instead of RSTRING_PTR so it seems that ruby finally realized that RSTRING_PTR was defined in ruby.h So it seems like Johnny was on the right track :-)
|
By: Mette Jørgensen
RE: undefined symbol: RSTRING_PTR with ruby 1 [ reply ] 2009-03-11 09:04
|
Thanks a lot.
I will try to use rsruby 0.5.1
Here is the relevant lines of ruby.h in case you can find a typing error or something
#define ELTS_SHARED FL_USER2
struct RString {
struct RBasic basic;
long len;
char *ptr;
union {
long capa;
VALUE shared;
} aux;
};
#define RSTRING_PTR(s) (RSTRING(s)->ptr)
#define RSTRING_LEN(s) (RSTRING(s)->len)
struct RArray {
struct RBasic basic;
long len;
union {
long capa;
VALUE shared;
} aux;
VALUE *ptr;
};
|
By: Alex Gutteridge
RE: undefined symbol: RSTRING_PTR with ruby 1 [ reply ] 2009-03-10 16:47
|
Thanks for your help with this Johnny.
I'll just comment that regressing to version 0.5.1 (gem or tarball) should fix this problem. There aren't any real new features you would be missing out on, since the latest version just has the changes required to compile with ruby 1.9 (and look to have to broken 1.8.4).
|
By: Mette Jørgensen
RE: undefined symbol: RSTRING_PTR with ruby 1 [ reply ] 2009-03-10 16:19
|
I haven't used pastie.org before so I'm not sure how to use it. But I tried to paste in my code. It is the one starting with:
/**********************************************************************
ruby.h -
The test script is in the end after the "##" I added line 340+341 to ruby.h
Here is the error I get:
> test_rsruby.rb
/usr/bin/ruby: symbol lookup error: /usr/lib/ruby/gems/1.8/gems/rsruby-0.5.1.1/lib/rsruby_c.so: undefined symbol: RSTRING_PTR
And my ruby version:
> ruby -v
ruby 1.8.4 (2005-12-24) [x86_64-linux]
|
By: Mette Jørgensen
undefined symbol: RSTRING_PTR with ruby 1.8.4 [ reply ] 2009-03-09 15:54
|
Hey
I'm using ruby 1.8.4 and gets the following error when I'm trying to initialize the RSRuby object:
irb(main):003:0> r=RSRuby.instance
irb1.8: symbol lookup error: /usr/lib/ruby/gems/1.8/gems/rsruby-0.5.1.1/lib/rsruby_c.so: undefined symbol: RSTRING_PTR
Any ideas on how to fix the problem?
Best
Mette
|
|
 |