|
List Info
Thread: build problems, part III, and runtime problems, part I
|
|
| build problems, part III, and runtime
problems, part I |

|
2007-12-27 15:54:09 |
|
After decoding the unresolved symbols from wxruby2.so using c++filt, and comparing with the symbols provided by wxGTK, it became clear that wxGTK was using wchar_t whereas wxruby2.so was using char. So I rebuilt wxGTK, turning off unicode. That worked. No more unresolved symbols. What gives? Should the wxruby code have been built using wchar_t, and if so, how?
However, now I get the following:
% ruby -rubygems nothing.rb /home/rwa/linux-packages/ruby-1.8.6/lib/ruby/site_ruby/1.8/i686-linux/wxruby2.so: [BUG] Segmentation fault
the crash is in rb_hash_aref. I saw that I was not the only one to run into this from recent mailing list discussion.
The issue appears to be that swig_ruby_trackings has a bogus value. In my case it always happens to be 4. It appears it is supposed to point to valid storage.
The relevant function appears to be this one:
SWIGRUNTIME void SWIG_RubyInitializeTrackings(void)
where swig_ruby_trackings is looked up, and if it comes back nil, a new one is created. Except that, for reasons I don't understand, it comes back 4, not 0. When this gets dereferenced after a series of calls from Init_wxRubyConstants, segfault. Any help? This seems like a real bug, and I'm starting to wonder if this package is usable at all.
|
| Re: build problems, part III, and
runtime problems, part I |
  United Kingdom |
2007-12-27 16:36:02 |
Robert Anderson wrote:
> So I rebuilt wxGTK, turning off unicode. That
worked. No more
> unresolved symbols. What gives? Should the wxruby
code have been
> built using wchar_t, and if so, how?
I'm sorry but I don't understand this. Unfortunately I'm
away and don't
have a Linux box here - but, wxruby2 should *only* work with
a unicode
build; all of the conversions from wxString to ruby Strings
assume that
wxGTK has been built with unicode support.
> However, now I get the following:
>
> % ruby -rubygems nothing.rb
>
/home/rwa/linux-packages/ruby-1.8.6/lib/ruby/site_ruby/1.8/i
686-linux/wxruby2.so:
> [BUG] Segmentation fault
>
> the crash is in rb_hash_aref. I saw that I was not the
only one to
> run into this from recent mailing list discussion.
Could you refer me the discussion please?
>
> The issue appears to be that swig_ruby_trackings has a
bogus value.
> In my case it always happens to be 4. It appears it is
supposed to
> point to valid storage.
>
> The relevant function appears to be this one:
>
> SWIGRUNTIME void SWIG_RubyInitializeTrackings(void)
This is code that's generated by SWIG, not immediately part
of wxRuby.
What version of SWIG are you using? (`swig -version`) The
most recently
released version of SWIG came out after wxRuby 1.9.2 in
November and
hasn't yet been tested with it. I'd strongly suggest using
version
1.3.31 for now.
> This seems like a real bug, and I'm starting to wonder
if this package
> is usable at all.
Clearly not for you, clearly yes for lots of other people.
There's
something that's different about your environment that's
causes serious
bugs; let's figure out what it is.
alex
_______________________________________________
wxruby-users mailing list
wxruby-users rubyforge.org
ht
tp://rubyforge.org/mailman/listinfo/wxruby-users
|
|
| Re: build problems, part III, and
runtime problems, part I |

|
2007-12-27 16:52:10 |
|
On Dec 27, 2007 2:36 PM, Alex Fenton < alex  pressure.t o">alex pressure.to> wrote:
Robert Anderson wrote: > So I rebuilt wxGTK, turning off unicode. That worked. No more > unresolved symbols. What gives? Should the wxruby code have been > built using wchar_t, and if so, how?
I'm sorry but I don't understand this. Unfortunately I'm away and don't have a Linux box here - but, wxruby2 should *only* work with a unicode build; all of the conversions from wxString to ruby Strings assume that
wxGTK has been built with unicode support. Somehow my build is configured otherwise. I don't understand the mechanisms for how this is configure, so I don't know how it got out of whack.
Here's the evidence:
nm obj/App.o | grep wxStringBase8InitWithEPK | c++filt U wxStringBase::InitWith(char const*, unsigned int, unsigned int)
whereas I would assume a unicode build would be using wchar_t instead of char.
> However, now I get the following: > > % ruby -rubygems
nothing.rb > /home/rwa/linux-packages/ruby-1.8.6/lib/ruby/site_ruby/1.8/i686-linux/wxruby2.so: > [BUG] Segmentation fault > > the crash is in rb_hash_aref. I saw that I was not the only one to
> run into this from recent mailing list discussion.
Could you refer me the discussion please?
> > The issue appears to be that swig_ruby_trackings has a bogus value. > In my case it always happens to be 4. It appears it is supposed to > point to valid storage. > > The relevant function appears to be this one:
> > SWIGRUNTIME void SWIG_RubyInitializeTrackings(void)
This is code that's generated by SWIG, not immediately part of wxRuby. What version of SWIG are you using? (`swig -version`) The most recently
released version of SWIG came out after wxRuby 1.9.2 in November and hasn39;t yet been tested with it. I'd strongly suggest using version 1.3.31 for now.
% swig -version
SWIG Version
1.3.33
Should I downgrade?
|
| Re: build problems, part III, and
runtime problems, part I |

|
2007-12-27 17:49:14 |
|
On Dec 27, 2007 3:12 PM, Alex Fenton < alex  pressure.t o">alex pressure.to> wrote:
>
> % swig -version > > SWIG Version 1.3.33 > > Should I downgrade?
Yes, definitely, to 1.3.31 please. SWIG versions are notoriously incompatible even between minor versions, and wxRuby hincludesas
numerous hacks to work around SWIG bugs.
Then you should be able to do rake reswig && rake
If this improves things I will update the wiki to make it clearer that there is the specific version dependency
Unfor tunately this gives the same result for the 1.9.2 tarball: segfault in rb_hash_aref, when the hash has address 0x4.
I tried to build the svn sources, but ended up here:
g++ -c -I/home/rwa/linux-packages/wxGTK-
2.8.7-static/lib/wx/include/gtk2-ansi-release-static-2.8 -I/home/rwa/linux-packages/wxGTK-2.8.7-static/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -D__WXGTK__ -g -O2 -Wno-unused-function -I /home/rwa/linux-packages/gems/rake-
0.8.0/bin -I /home/rwa/linux-packages/gems/rake-0.8.0/lib -I /home/rwa/linux-packages/ruby-1.8.6/lib/ruby/site_ruby/1.8 -I /home/rwa/linux-packages/ruby-1.8.6/lib/ruby/site_ruby/1.8/i686-linux -I /home/rwa/linux-packages/ruby-
1.8.6/lib/ruby/site_ruby -I /home/rwa/linux-packages/ruby-1.8.6/lib/ruby/1.8 -I /home/rwa/linux-packages/ruby-1.8.6/lib/ruby/1.8/i686-linux -I . -I /home/rwa/Distributions/wxruby-svn/doc/lib -o obj/URLDataObject.o src/URLDataObject.cpp
In file included from src/URLDataObject.cpp:2092: src/URLDataObject.h:19: base `Swig: irector9; with only non-default constructor in class without a constructor rake aborted! Command failed with status (1): [g++ -c -I/home/rwa/linux-packages/wxGTK-...]
|
[1-4]
|
|