Wxruby - compile trouble on 64bit linux (ubuntu)

hi,
i’d like to give an report how i managed to get wxruby-1.9.8 installed
on ubuntu 8.04.
think this could be usefull for others.

after several errors during wxruby compilation i decided to get rid of
wxwidgets-libs and swig that came with / were installed via
ubuntu-packet-manager.
i got ahold of the mentioned versions of swig and wxwidgets and
installed them from source.

but this did NOT change the error (something with AboutDialog.o and
unreferenced Symbol).

what did the trick for me finally was to change
wxruby-1.9.8/rake/rakeconfigure.rb and add there some “-fPIC” to

— snip —

Flags to be passed to the C++ compiler

$cppflags = [ $wx_cppflags, $ruby_cppflags,
$extra_cppflags, $ruby_includes , “-fPIC”].join(’ ')

Flags to be passed to the linker

$ldflags = [ $ruby_ldflags, $extra_ldflags, “-fPIC” ].join(’ ')

— snap —

did not find another solution to pass this arguments when invoking
rake…

big thanks to the ppl working on development of wxruby.

regards

rene

Hi Rene

Rene P. wrote:

          $extra_cppflags, $ruby_includes , "-fPIC"].join(' ')

Flags to be passed to the linker

$ldflags = [ $ruby_ldflags, $extra_ldflags, “-fPIC” ].join(’ ')

— snap —

Thanks for taking the time to write in about this. It’s mentioned on the
wiki here:

http://wxruby.rubyforge.org/wiki/wiki.pl?HowToBuildWxWidgets

but I agree we should make that easier to find. I plan to write an
INSTALL.txt to go with the source tar.gz which covers this sort of
thing.

did not find another solution to pass this arguments when invoking rake…

wxRuby gets its flags and options to pass to the C compiler from
wxWidgets and Ruby, I think if wxWidgets is built with -fPIC, so will
wxRuby, without having to change the rakefile.

Were you building against a static or dynamic wxWidgets?

big thanks to the ppl working on development of wxruby.

thanks
Alex

Actually Alex,

wxRuby’s build process won’t receive from wx-config, or ruby.h, I had to
do
the same hack myself when I did the x86 build of wxRuby gem. No matter
what
I tried, I couldn’t get -fPIC in there, and I tried everything.

How can I get to the TextCtrl part of a SpinCtrl? If I call disable on
the
SpinCtrl it disables the arrows, but not the TextCtrl (under Windows
XP).
How can I disable the TextCtrl part?

Eric R.

Am 17.09.2008 um 04:55 schrieb Mario S.:

Actually Alex,

wxRuby’s build process won’t receive from wx-config, or ruby.h, I
had to do the same hack myself when I did the x86 build of wxRuby
gem. No matter what I tried, I couldn’t get -fPIC in there, and I
tried everything.

reproduceable - i recompiled wxwidgets explicitely with ‘-fPIC’,
but compilation of wxruby failed nevertheless. - until the mentioned
changes were made to rakeconfigure.rb

rene

__
take care not to get sucked into /dev/null !

Eric R. wrote:

How can I get to the TextCtrl part of a SpinCtrl? If I call disable on the
SpinCtrl it disables the arrows, but not the TextCtrl (under Windows XP).
How can I disable the TextCtrl part?

I’m not really sure - at the moment, I can’t seem to get the TextCtrl to
accept input in a simple SpinCtrl. Do you have a sample programme you
could show?

This question seems to have come up on the wxWidgets / wxPython list but
I can’t find a definitive answer. You could try searching those further
by looking for wxSpinCtrl etc

alex