[Kde-bindings] adventures with smoke and qtruby (kdebindings 3.2.3)

Richard Dale Richard_Dale at tipitina.demon.co.uk
Tue Jun 22 07:56:27 UTC 2004


On Tuesday 22 June 2004 06:11, jm wrote:
> Decided to give qtruby on macosx a rest for the moment and after have a
> week off work for exams found a linux box that I can use for
> experimenting on.
I did get the QtRuby sources to build and run on Mac OS X - they need 
packaging up as an Xcode project, and a binary dmg image would be easiest.

> I did the following to get where I'm up to.
>
> altered configure thus,
>
> 31966c31966,31967
> < DO_NOT_COMPILE="$DO_NOT_COMPILE dcopjava qtruby korundum"
> ---
>
>  > #DO_NOT_COMPILE="$DO_NOT_COMPILE dcopjava qtruby korundum"
>  > DO_NOT_COMPILE="$DO_NOT_COMPILE dcopjava korundum"
>
> found that qtruby/rubylib/qtruby/Qt.cpp complained about vasprintf().
> Fixed this by putting
> #define _GNU_SOURCE
>
> ABOVE #include <stdio.h>
Thats fixed in the HEAD branch for KDE 3.3.

> couldn't find rule to make smoke, see following,
>
> /bin/sh ../../../libtool --silent --mode=link --tag=CXX g++
> -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500
> -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W
> -Wpointer-arith -Wwrite-strings -O2 -fno-exceptions -fno-check-new
> -fno-common    -o libqtrubyinternal.la   Qt.lo handlers.lo
> make[5]: *** No rule to make target `../../../smoke/qt/libsmokeqt.la',
> needed by `qtruby.la'.  Stop.
>
> changed to smoke directory and ran make change back to top level
> directory and run make again. Now end up with
>
> /bin/sh ../../../../libtool --silent --mode=compile --tag=CXX g++
> -DHAVE_CONFIG_H -I. -I. -I../../../.. -I/opt/jmx/include
> -I/opt/qt-x11-free-3.3.2//include -I.  -DUIC -DQT_INTERNAL_XML
> -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wnon-virtual-dtor -Wno-long-long
> -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align
> -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings
> -O2 -fno-exceptions -fno-check-new -fno-common  -c -o embed.lo
> embed.cpp
> embed.cpp: In function `static void Uic::embed(QTextStream &, const
> char *, const QStringList &)':
> embed.cpp:195: ambiguous overload for `int & ? const QString : const
> char[3]'
> embed.cpp:195: candidates are: operator ?:(bool, QString, QString)
> <builtin>
> embed.cpp:195:                 operator ?:(bool, string,
> basic_string<char,string_char_traits<char>,__default_alloc_template<true
> ,0> >) <builtin>
> embed.cpp:195:                 operator ?:(bool, const char *, const
> char *) <builtin>
> make[5]: *** [embed.lo] Error 1
> make[5]: Leaving directory
> `/home/jmiller/qtplay/kdebindings-3.2.3/qtruby/rubylib/designer/rbuic'
> make[4]: *** [all-recursive] Error 1
> make[4]: Leaving directory
> `/home/jmiller/qtplay/kdebindings-3.2.3/qtruby/rubylib/designer'
> make[3]: *** [all-recursive] Error 1
> make[3]: Leaving directory
> `/home/jmiller/qtplay/kdebindings-3.2.3/qtruby/rubylib'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory
> `/home/jmiller/qtplay/kdebindings-3.2.3/qtruby'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/jmiller/qtplay/kdebindings-3.2.3'
> make: *** [all] Error 2
>
> also ran make from within qtruby directory with same results.
Thats been fixed in the HEAD branch too, change the error line in embed.cpp to 
this:
<< (e->numColors ? e->cname + "_ctable" : QString::fromLatin1( "[]" ) ) << ", 
"

> Worked around this by installing smoke and, from with in
> qtruby/rubylib/qtruby, running
>
> ruby extconf.rb --with-smoke-dir=/opt/jmx --with-qt-dir=$QTDIR
> make
> sudo make install
>
> Finally, running one of the examples gives,
>
> .../kdebindings-3.2.3/qtruby/rubylib/examples/qt-examples/hello$
> ./main.rb
> /usr/local/lib/ruby/site_ruby/1.8/i686-linux/Qt.so: ruby: undefined
> symbol: Init_Qt - /usr/local/lib/ruby/site_ruby/1.8/i686-linux/Qt.so
> (LoadError)
>          from ./main.rb:3
>
> Any hints on how to attack this problem?
It should be looking for the function Init_qtruby() in qtruby.so - not 
Init_Qt() in Qt.so. Qt.rb and Qt/qtruby.rb should also have been installed. 

The installables used to be Qt.so and Qt/Qt.rb, but that was changed because 
the KDE build system didn't like upper case letters in library names and we 
renamed 'Qt.so' as 'qtruby.so'.

-- Richard



More information about the Kde-bindings mailing list