On Tuesday 06 January 2004 23:26, Alexander Kellett wrote:
> On Tuesday 06 January 2004 21:36, Bauduin Raphael wrote:
> > Greg Brondo wrote:
> > > Is there any mature bindings (like Python has) for KDE/QT and Ruby?
> >
> > The best candidate is the package Richard DAle is working on.
> > Maybe it'll be part of KDE 3.2 that will be release soon, I don't know.
> > I'm looking forward to it  :-)
>
> prerelease available at http://ww.lypanov.net/bindings.html if
> you want a working qt only binding already...
>
> (its just a working known snapshot i made - 400kb tarball)

unforunately after a bit of investigation
it seems that in order for programs using
these bindings to even start without an
immediate segfault --enable-pthread
is needed. qt 3.1 doesn't do this otoh
with the same bindings. i still need to
verify that the old tarballs also don't
work with latest ruby, but somewhere
along the line i think qt 3.2.3 (iirc) or
maybe even ruby's behaviour changed 
somehow and since that moment i get
the following backtrace on program
startup:
	#0  0x410d1785 in __pthread_unlock () from /lib/libpthread.so.0
	#1  0x410ced75 in pthread_mutex_unlock () from /lib/libpthread.so.0
	#2  0x40259bc9 in _dl_open () from /lib/libc.so.6
	#3  0x40100e88 in dlopen_doit () from /lib/libdl.so.2
	#4  0x4000adc6 in _dl_catch_error_internal () from /lib/ld-linux.so.2
	#5  0x40101286 in _dlerror_run () from /lib/libdl.so.2
	#6  0x40100ed4 in dlopen@@GLIBC_2.1 () from /lib/libdl.so.2
	#7  0x400448ee in dln_load () from /usr/lib/libruby18.so.1.8
	...

using "export LD_DEBUG=libs" shows the
following:
	...
        888: calling init: /usr/lib/libGL.so.1
        888: /usr/lib/libGL.so.1: error: relocation error: undefined symbol: pthread_key_create (fatal)
        888: calling init: /usr/lib/ruby/site_ruby/1.8/i686-linux-gnu/qtruby.so
	
	Program received signal SIGSEGV, Segmentation fault.
	[Switching to Thread 16384 (LWP 888)]
	0x410d6785 in __pthread_unlock () from /lib/libpthread.so.0
	...

but further up i notice a large pause when 

       888:     calling init: /lib/libpthread.so.0
       888:    (no debugging symbols found)...(no debugging symbols found)...[New Thread 16384 (LWP 888)]

takes place.
it seems strange that pthread is seemingly starting a new thread...

okay. enough rambling and onto some possible solutions.
1) --enable-pthread becomes default
2) i *somehow* figure out what --enable-pthread is changing
    in the environment and try to manually perform those
    operations before ld'ing pthread/qt/qtruby (i.e, add a dummy
    wrapper which sets up pthread locking or something...)

option 1 is fine for me but for one thing. it breaks the
the gnome2 bindings which would also like to mess with
for gstreamer + kde integration ;-)

[ if anyone wants the program that shows these
  problems with the gnome2 bindings i'll gladly
  forward / upload ]

thanks for listening :)
Alex
-- 
Beauty, n.:
	The power by which a woman charms a lover and terrifies a husband.
		-- Ambrose Bierce