[fxruby-users] 1.8.6 and kwargs

Joel VanderWerf vjoel at path.berkeley.edu
Sat Apr 7 01:05:46 EDT 2007


Lyle Johnson wrote:
> On 4/6/07, Joel VanderWerf <vjoel at path.berkeley.edu> wrote:
> 
>> It looks like we still have to require 'fox16/kwargs' or else:
>>
>> $ ruby dirlist.rb
>> dirlist.rb:12:in `initialize': wrong argument type Hash (expected Data)
>> (TypeError)
>>          from dirlist.rb:12:in `initialize'
>>          from dirlist.rb:55:in `new'
>>          from dirlist.rb:55:in `run'
>>          from dirlist.rb:64
>>
>> Or did something go wrong in the gem update?
> 
> Seems OK here -- what do you get when you type:
> 
>     ruby -e "require 'fox16'; puts Fox.fxrubyversion"

Good question. That was _one_ problem:

$ ruby -e "require 'fox16'; puts Fox.fxrubyversion"
1.6.2

After cleaning out the old stuff, there's still a problem: installing 
the gem doesn't install the .so. It looks like something in the 
makefile. Here's the output of the gem install:


$ cat gem_make.out
ruby extconf.rb install fxruby
checking for sys/time.h... yes
checking for signal.h... yes
... <snip> ...
checking for gluNewQuadric() in -lGLU... yes
creating Makefile

make
gcc -I. -I. -I/usr/local/lib/ruby/1.8/i686-linux -I. -DHAVE_SYS_TIME_H 
-DHAVE_SIGNAL_H -I/usr/local/include/fxscintilla 
-I/usr/local/include/fox-1.6  -fPIC -g -O2 -O0 -Iinclude  -c librb.c
... <snip> ...
gcc -shared -rdynamic -Wl,-export-dynamic   -L'/usr/local/lib' 
-Wl,-R'/usr/local/lib' -L'/usr/local/lib' -Wl,-R'/usr/local/lib' -o 
fox16.so librb.o core_wrap.o dc_wrap.o dialogs_wrap.o frames_wrap.o 
fx3d_wrap.o FXRbApp.o FXRbDataTarget.o FXRbGLViewer.o FXRuby.o 
iconlist_wrap.o icons_wrap.o image_wrap.o impl.o label_wrap.o 
layout_wrap.o list_wrap.o markfuncs.o mdi_wrap.o menu_wrap.o 
table_wrap.o text_wrap.o treelist_wrap.o ui_wrap.o 
unregisterOwnedObjects.o  -lFOX-1.6 -lGLU -lGL -lX11 -lXext -ltiff 
-ljpeg -lz -lpng -lstdc++  -ldl -lcrypt -lm   -lc

make install
make: Nothing to be done for `install'.

make clean



So the .so gets built but never installed. Why is this happening? I 
think it's because the makefile has these lines:

RUBYLIBDIR = 
/usr/local/lib/ruby/gems/1.8/gems/fxruby-1.6.8/ext/fox16$(target_prefix)
RUBYARCHDIR = 
/usr/local/lib/ruby/gems/1.8/gems/fxruby-1.6.8/ext/fox16$(target_prefix)

and so install is a no-op because the .so is already where it's supposed 
to be.

I don't understand why extconf.rb would be generating things this way. 
It's not normal for gems. For example, the ncurses gem's extconf.rb 
generates these lines:

RUBYLIBDIR = 
/usr/local/lib/ruby/gems/1.8/gems/ncurses-0.9.1/lib$(target_prefix)
RUBYARCHDIR = 
/usr/local/lib/ruby/gems/1.8/gems/ncurses-0.9.1/lib$(target_prefix)

And so the install succeeds.

When I install fxruby from tarball, everything is ok. The Makefile has 
reasonable settings for RUBYLIBDIR/RUBYARCHDIR.

-- 
       vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407


More information about the fxruby-users mailing list