# Wxruby - compile trouble on 64bit linux (ubuntu)

**URL:** <https://www.ruby-forum.com/t/wxruby-compile-trouble-on-64bit-linux-ubuntu/148670>\
**Category:** wxRuby\
**Created:** [September 16, 2008, 2:15am UTC](https://www.ruby-forum.com/t/wxruby-compile-trouble-on-64bit-linux-ubuntu/148670 "2008-09-16T02:15:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rperrier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/90ced4/32.png) [@rperrier](https://www.ruby-forum.com/u/rperrier)\
**Post date:** [September 16, 2008, 2:15am UTC](https://www.ruby-forum.com/t/wxruby-compile-trouble-on-64bit-linux-ubuntu/148670/1 "2008-09-16T02:15:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rperrier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/90ced4/32.png) [@rperrier](https://www.ruby-forum.com/u/rperrier)\
**Post date:** [September 16, 2008, 4:32pm UTC](https://www.ruby-forum.com/t/wxruby-compile-trouble-on-64bit-linux-ubuntu/148670/2 "2008-09-16T16:32:19Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![rperrier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/90ced4/32.png) [@rperrier](https://www.ruby-forum.com/u/rperrier)\
**Post date:** [September 17, 2008, 4:57am UTC](https://www.ruby-forum.com/t/wxruby-compile-trouble-on-64bit-linux-ubuntu/148670/3 "2008-09-17T04:57:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rperrier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/90ced4/32.png) [@rperrier](https://www.ruby-forum.com/u/rperrier)\
**Post date:** [September 17, 2008, 3:50pm UTC](https://www.ruby-forum.com/t/wxruby-compile-trouble-on-64bit-linux-ubuntu/148670/4 "2008-09-17T15:50:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rperrier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/90ced4/32.png) [@rperrier](https://www.ruby-forum.com/u/rperrier)\
**Post date:** [September 17, 2008, 1:52pm UTC](https://www.ruby-forum.com/t/wxruby-compile-trouble-on-64bit-linux-ubuntu/148670/5 "2008-09-17T13:52:45Z")

</div>

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 !

---

<div class="post-metadata">

**Author:** ![rperrier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/90ced4/32.png) [@rperrier](https://www.ruby-forum.com/u/rperrier)\
**Post date:** [September 18, 2008, 12:12pm UTC](https://www.ruby-forum.com/t/wxruby-compile-trouble-on-64bit-linux-ubuntu/148670/6 "2008-09-18T12:12:06Z")

</div>

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
