[Kde-bindings] Re: Notes on building on Mac OS X

Arno Rehn arno at arnorehn.de
Wed Mar 2 16:46:25 UTC 2011


On Wednesday 02 March 2011 06:46:15 Ben Skelton wrote:
> Thanks Arno, I've done a clean build of smokeqt and it builds fine.
The fix was meant for the framework version of Qt. Did you try it with that as 
well?

> In building qtruby I ran into a few problems:
> 
> 1.  libqtruby4shared.dylib, rubyqtwebkit, qtscript, qttest, rubyphonon,
> rubyqwt, qtruby4
> 
> needed to apply -DHAVE_STRUCT_TIMESPEC -DHAVE_STRUCT_TIMEZONE pretty much
> everywhere
This should actually be in some of the ruby header files.
$ grep TIMEZONE /usr/include/ruby-1.9.1/* -R
/usr/include/ruby-1.9.1/i686-linux/ruby/config.h:#define HAVE_STRUCT_TIMEZONE 1
/usr/include/ruby-1.9.1/i686-linux/ruby/config.h:#define HAVE_VAR_TIMEZONE 1
etc..

What do you get when you grep for these defines?

> 2. QDeclarative module
> 
> cmake did not include the libQtDeclarative.dylib in the call to the linker.
> All the smokeqt libraries were there, but the make complained that it
> could not find qdeclarative symbols.
Might be a bug in the cmake scripts.
> 
> Once those are done qtruby builds!
> 
> qtruby is installed on my machine at
> /Users/benskelton/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/.
> There are two files in that directory 'Qt.rb' and 'Qt4.rb'. Both of these
> are require calls to the real qtruby.rb. This is installed on my machine
> in
> /Users/benskelton/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/Qt.
> I needed to change both Qt.rb and Qt4.rb from
> 
> > require 'qtruby4'
> 
> to
> 
> > require 'Qt/qtruby4'
This is wrong. It should actually require the qtruby4.so library, not the 
Qt/qtruby4.rb file. On OS X there was a problem, as far as I know, with the 
library having the extension .dylib, not .so.
What you need is this:

/usr/lib/ruby/site_ruby/1.9.1/i686-linux/qtruby4.so 

If it has the .dylib extension, try making a symlink from it to qtruby4.so. If 
this doesn't work, we'll have to think of something.

One solution was to build the library as a 'MODULE' (instead of 'SHARED') in 
cmake, but then we can't link against it anymore. But first try to simply 
symlink it :)

-- 
Arno Rehn
arno at arnorehn.de



More information about the Kde-bindings mailing list