[Kde-bindings] qtruby-1.0.4 build and install

Richard Dale Richard_Dale at tipitina.demon.co.uk
Sun Oct 17 10:17:28 UTC 2004


On Sunday 17 October 2004 10:42, Han Holl wrote:
> Hi Richard,
>
> I just downloaded qtruby-1.0.4, and I suspect that for someone new to
> qtruby and smoke the building and installing instructions are not quite
> complete or clear.
> Here's what happens: you unpack the archive, and cd to the root directory.
> You do a ls. Ah, fine, there's an INSTALL and a README file.
> Unfortunately, both are as good as useless, or maybe worse, misleading.
Perhaps README.build should be renamed as INSTALL

> Some searching (some people might have given up by now) yields a file
> qtruby/README.build. This actually has some useful information, but it also
> has it's problems:
> CVS Snapshot
> ------------
>
> If building from a CVS snapshot, this initial make command in needed:
>
> $ make -f Makefile.cvs
>
> Hey, I'm not building from a CVS snapshot, am I ? I followed the qtruby
> link from the RAA.
>
> Well, if nothing else works, maybe I _am_ working from a CVS snapshot.
> Then it makes sense to do 'make -f Makefile.cvs' in the same directory that
> I found the README.build file, but alas, there's no Makefile.cvs there.
>
> Ok, let's try it in the root directory:
>
> This Makefile is only for the CVS repository
> This will be deleted before making the distribution
>
> *** Creating acinclude.m4
> *** Creating list of subdirectories
> *** Creating Makefile.am
> *** Creating configure.files
> *** Creating configure.in
> *** Creating aclocal.m4
> *** Creating configure
> *** Creating config.h template
> *** Creating Makefile templates
> libsmokekde_la_LDFLAGS: variable `KDE_RPATH' is used but `KDE_RPATH' is
> undefined
> libsmokeqt_la_LDFLAGS: variable `KDE_RPATH' is used but `KDE_RPATH' is
> undefined
> make[1]: *** [cvs] Error 1
> make: *** [all] Error 2
Yes, that's wrong - I've accidently included the KDE version of Smoke with 
QtRuby when you only need the Qt one.

> Oops, errors!. But at least I've got a configure file now. So I might try
> ./configure --with-smoke="qt"
> now. Yes that seems to work.
>
> Then what ? The README.build proceeds with:
> $ cd qtruby/rubylib/qtruby
> $ ruby extconf.rb --with-smoke-dir=/opt/kde3 \
>       --with-qt-dir=/home/duke/src/kde/HEAD/qt-copy
> $ make
> $ make install
>
> Does this mean that we do _not_ do 'make; make install' in the root
> directory? And what do I use for --with-smoke-dir=???. If I do 'locate
> libsmoke' I get: /usr/lib/libsmokeqt.so.1.0.0
> /usr/lib/libsmokeqt.so.1
> /usr/lib/libsmokeqt.la
> which seems a place that should be easy to find, so let's try:
>
> cd qtruby/rubylib/qtruby
> ruby  extconf.rb --with-qt-dir=$QTDIR
>
> This seems to work, so I'll try:
> make
> make install
>
> install -c -p -m 0755 qtruby.so /usr/lib/ruby/site_ruby/1.8/i686-linux-gnu
> install -c -p -m 0644 ./lib/Qt/Qt.rb /usr/lib/ruby/site_ruby/1.8/Qt
> install -c -p -m 0644 ./lib/Qt/qtruby.rb /usr/lib/ruby/site_ruby/1.8/Qt
>
> If I do ls -l  /usr/lib/ruby/site_ruby/1.8/i686-linux-gnu
> I get (edited):
> -rwxr-xr-x    1 root     root         1150 Oct  8 20:08 qtruby.la
> -rwxr-xr-x    1 root     root       812635 Oct 17 10:59 qtruby.so
> lrwxrwxrwx    1 root     root    15 Oct  8 20:17 qtruby.so.0
> ->qtruby.so.0.0.0 -rwxr-xr-x    1 root     root       167193 Oct  8 20:08
> qtruby.so.0.0.0 -rwxr-xr-x    1 root     root          825 Sep 13 23:06
> qui.la
> lrwxrwxrwx    1 root     root           12 Oct  8 22:55 qui.so ->
> qui.so.0.0.0 lrwxrwxrwx    1 root     root           12 Oct  8 22:55
> qui.so.0 -> qui.so.0.0.0
> -rwxr-xr-x    1 root     root        13773 Sep 13 23:06 qui.so.0.0.0
>
> So I've got a new qtruby.so, but the old one is also still there, and I'm
> not entirely sure which version ruby will dynamically link to. Also, on my
> system 'locale libsmoke' worked, because I've got the kdebinding rpm
> installed, but what about people who don't have that ?
> And the other stuff, qui.so and the programs like rbuic, rbqtsh and rbqtapi
> haven't been rebuild at all.
I'm pretty sure if I fix the smoke/kde problem by removing it. It should be a 
matter of:

$ make -f Makefile.cvs
$ ./configure
$ make
$ make install

> Luckily, there's also some stuff for Mac OS X, which gives hints about the
> rest of the build process.
Well, that more work than you really need if the above works correctly.

> So I continue with:
> cd ../designer/rbuic/
> qmake -makefile
> make
> cd ../uilib/
> ruby extconf.rb --with-qtruby-include=../../qtruby --with-qt-dir=$QTDIR
> make
>
> And here my luck ends:
> g++ -fPIC -g -O2  -fPIC   -I. -I/usr/lib/ruby/1.8/i686-linux-gnu
> -I/usr/lib/ruby/1.8/i686-linux-gnu -I.  -I/usr/lib/qt-3.1/include
> -I/usr/kerberos/include -I../../../../smoke -I../../qtruby  -c qui.cpp
> gcc -shared  -L'/usr/lib' -L'/usr/lib/qt-3.1/lib' -o qui.so qui.o
> -bundle_loader ../../qtruby/qtruby.bundle -lsmokeqt -lqui -lqt-mt -lstdc++
> -lruby  -ldl -lcrypt -lm   -lc
> gcc: ../../qtruby/qtruby.bundle: No such file or directory
> make: *** [qui.so] Error 1
Yes, .bundle files only exist on Mac OS X..

> So maybe I should have done a 'make' in the root directory after all ?
> Let's try.
> cd /usr/src/ruby/qtruby-1.0.4
> make
>
> [ lots of output snipped ]
> gcc -shared  -L'/usr/lib' -L'/usr/lib/qt-3.1/lib' -o qui.so qui.o
> -bundle_loader ../../qtruby/qtruby.bundle -lsmokeqt -lqui -lqt-mt -lstdc++
> -lruby  -ldl -lcrypt -lm   -lc
> gcc: ../../qtruby/qtruby.bundle: No such file or directory
> make[5]: *** [qui.so] Error 1
>
> Sorry for the lousy formatting.
> I'm kind of stuck now.
>
> Maybe I shouldn't have started with 'make -f Makefile.cvs' after all ?
No that was correct - I would do that again.

> I hope you agree that installing is kind of complicated right now. What
> would be nice is a small README explaining the role off the different
> components (like qtruby.so, qtruby.rb libsmoke and so on).
> I think the first time around, I build and installed an new smoke library,
> but never acutally used that because I had an earlier version installed.
> This didn't seem to do any harm though.
Yes, I agree more work is needed. A pre-built Intel binary rpm might be the 
easiest thing.

I'd better fix the smoke/kde problem right away, and think about these other 
things.

-- Richard



More information about the Kde-bindings mailing list