Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread

 

By: Youhei Kondou
RE: Qt 4.5/Ruby 1.9 [ reply ]  
2009-03-15 07:43
Finally, problem 1) is solved.
(( problem 2) was already solved: http://rubyforge.org/forum/message.php?msg_id=65734 ))

It's only LD_LIBRARY_PATH problem.
I set this one:
export LD_LIBRARY_PATH=/opt/ruby-1.9.1/lib:/opt/qtsdk-2009.01/qt/lib:$LD_LIBRARY_PATH

then build succeeds, and all commands work correctly.
/opt/ruby-1.9.1/bin/rbqtapi -v
QtRuby 2.0.2 using Qt-4.5.0
/opt/ruby-1.9.1/bin/ruby -e "require 'Qt';puts Qt::Object.new"
#<Qt::Object:0x00000000ab8470>

By: Davor Ocelic
RE: Qt 4.5/Ruby 1.9 [ reply ]  
2009-03-12 20:12

One thing that has to be checked is the behavior of OpenGL with qt 4.5.

I didn't have a chance yet to dive deeper into it, but on one system I've noticed 2 opengl-related problems with ruby 1.9.1 and qt 4.5:

1) During run a message like "Incomplete GL buffer" shows up

2) On application exit, everything exits except some part of opengl, so the prompt is not returned back to the user but stays "hanging".

This was on a system that had some other opengl trouble, so I'm not sure, but it's worth running one or two opengl examples just for test after build.

Cya,
-doc

By: Richard Dale
RE: Qt 4.5/Ruby 1.9 [ reply ]  
2009-03-12 20:05
Yes, a new release of QtRuby for Qt 4.5 that builds with Ruby 1.9.1 and is licensed under the LGPL, will be released very shortly.

By: Youhei Kondou
RE: Qt 4.5/Ruby 1.9 [ reply ]  
2009-03-12 14:34
problems 1) still occurs, but 2) is solved.

I understood why [/opt/ruby-1.9.1/bin/rbqtapi -v] shows: 'qtruby using Qt-4.4.3'
rbqtapi's Shebang line is:
#!/usr/bin/env ruby

I think, shebang line should use cmake's RUBY_EXECUTABLE value like below:
#!/opt/ruby-1.9.1/bin/ruby

By: Youhei Kondou
RE: Qt 4.5/Ruby 1.9 [ reply ]  
2009-03-07 05:47
Hello,
I try these instructions under thecondition:
----------------
./configure --prefix=/opt/ruby-1.9.1 --enable-shared
make
make install
----------------
install Qt4.5 SDK to '/opt/qtsdk-2009.01' by installer
----------------
cmake QtRuby with:
-DCMAKE_INSTALL_PREFIX=/opt/ruby-1.9.1
-DRUBY_EXECUTABLE=/opt/ruby-1.9.1/bin/ruby
-DRUBY_LIBRARY=/opt/ruby-1.9.1/lib/libruby.so.1.9.1
-DRUBY_INCLUDE_PATH=/opt/ruby-1.9.1/include/ruby-1.9.1
-DQT_QMAKE_EXECUTABLE=/opt/qtsdk-2009.01/qt/bin/qmake
...
----------------

then build of QtRuby succeed, but 2 problems occur.

1) on irb, require 'Qt' fails with message:
LoadError: /opt/ruby-1.9.1/lib/ruby/site_ruby/1.9.1/x86_64-linux/qtruby4.so: undefined symbol: IdToClassNameMap - /opt/ruby-1.9.1/lib/ruby/site_ruby/1.9.1/x86_64-linux/qtruby4.so
from /opt/ruby-1.9.1/lib/ruby/site_ruby/1.9.1/Qt4.rb:5:in `require'
from /opt/ruby-1.9.1/lib/ruby/site_ruby/1.9.1/Qt4.rb:5:in `rescue in <top (required)>'
from /opt/ruby-1.9.1/lib/ruby/site_ruby/1.9.1/Qt4.rb:1:in `<top (required)>'
from (irb):7:in `require'
from (irb):7
from /opt/ruby-1.9.1/bin/irb:12:in `<main>'

2) [/opt/ruby-1.9.1/bin/rbuic4 -v] shows:
Qt User Interface Compiler version 4.5.0
and [/opt/ruby-1.9.1/bin/rbrcc -version] shows:
Ruby Resource Compiler for Qt version 4.5.0
but, [/opt/ruby-1.9.1/bin/rbqtapi -v] shows:
qtruby using Qt-4.4.3


By: Davor Ocelic
RE: Qt 4.5/Ruby 1.9 [ reply ]  
2009-03-04 19:52
Hello,

Qtruby as it exists in kde.org's kdebindings
repository works completely well with Qt 4.5
and Ruby 1.9.1.

In short, to get it working, install Qt and Ruby versions you want, then compile the bindings by checking out the SVN repository:

svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebindings
svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs

and following the instructions in kdebindings/CMakeLists.txt.qtruby .

That file needs a small patch which I submitted to the kde-bindings just the other day, but until it's committed to SVN, get it from here:

http://techpubs.spinlocksolutions.com/ruby/kdebindings-SVN-03032009-CMakeLists.txt.qtruby.patch


In addition, for Ruby 1.9, you'll just have to adjust the paths as follows (a copy from another earlier post of mine on the subject):


1) Find your ruby 1.9's config.h. Example:
/usr/local/include/ruby-1.9.1/x86_64-linux/ruby/config.h

2) Symlink the file to ruby/config.h in the include path. Example:
ln -sf /usr/local/include/ruby-1.9.1/x86_64-linux/ruby/config.h \
/usr/local/include/ruby-1.9.1/ruby/config.h

3) In CMakeLists.txt.qtruby (or actually in CMakeLists.txt, if you copy .qtruby one over it), change -DRUBY_INCLUDE_PATH to suit 1.9 include
path instead of 1.8. Example:
cmake ..... \
-DRUBY_INCLUDE_PATH=/usr/local/include/ruby-1.9.1 \


It's also possible to build qtruby Debian packages based on Ruby 1.9.1, Qt 4.5 and qtruby bindings from SVN.
(Ruby 1.9.1 debian packaging is kept at svn://svn.debian.org/pkg-ruby/ruby1.9, Qt 4.5 is in Debian/Ubuntu unstable, and for kde4bindings package, start with existing debian/ from the earlier version and basically throw out most of the build to only keep qtruby.)

The work of getting qtruby work with Ruby 1.9.1 was done by Jan Dvorak (Mr Napalm), Richard Dale and me, and as far as I know Qt 4.5 worked without special changes.

Regards,
Davor Ocelic
Spinlock Solutions
http://www.spinlocksolutions.com/

By: Christoffer LervÄg
Qt 4.5/Ruby 1.9 [ reply ]  
2009-03-03 21:03
Now that Qt 4.5 has been released (and not too long ago Ruby 1.9.1), are there any plans to publish a new version of qtruby to take advantage of these releases?