[Qt-jambi-interest] Compiling under SUSE 11.2, phonon problems

Francis Galiegue fgaliegue at gmail.com
Mon Dec 28 21:31:09 CET 2009


On Mon, Dec 28, 2009 at 8:15 PM, Aekold Helbrass <helbrass at gmail.com> wrote:
[...]
>>
>> I know the solution, I'm working on it and will post a patch series
>> when I am done. This patch series will allow, among other niceties, to
>> build qt-jambi _with your installed Qt version_.
>
> Can you give some more details? I didn't compiled Qt myself, just
> installed from SUSE 11.2 rpms, and SUSE's src.rpm package for QtJambi
> builds fine, but without phonon and sqlite.
>

Well, both are plugins. And the culprit code is in qt-jambi's
LibraryEntry.java, mainly this part:

----
    private boolean doesQtPluginExist(String name, String subdir) {
        StringBuilder path = new StringBuilder();
        path.append(props.getProperty(null, QTDIR));
        path.append("/plugins/");
        path.append(subdir);
        path.append("/");
        path.append(LibraryEntry.formatPluginName(name, debug));
        return new File(path.toString()).exists();
    }
----

This builds the plugin path only according to the QTDIR environment
variable ("QTDIR" here is a string constant having the value of the
QTDIR environment variable). But this is just wrong with bundled Qt
packages from distributions (including devel ones). Witness my setup
(I run amd64 unstable gentoo):

----
fg at erwin ~/src/qt-jambi $ which qmake
/usr/bin/qmake # this is the installed qmake
fg at erwin ~/src/qt-jambi $ qmake -query QT_INSTALL_PLUGINS
/usr/lib64/qt4/plugins
fg at erwin ~/src/qt-jambi $ echo $QTDIR
#Nothing
----

Now, if you have compiled QTDIR according to the qt-jambi compile
guide, the output is quite different:

----
fg at erwin ~/src/qt-jambi $ export QTDIR=/home/fg/src/qt46stable/
fg at erwin ~/src/qt-jambi $ export PATH=$QTDIR/bin:$PATH
fg at erwin ~/src/qt-jambi $ which qmake
/home/fg/src/qt46stable/bin/qmake
fg at erwin ~/src/qt-jambi $ qmake -query QT_INSTALL_PLUGINS
/home/fg/src/qt46stable/plugins
fg at erwin ~/src/qt-jambi $
----

Compare the output of the second series of command with the first one.

Basically, with your version, QTDIR is set to /usr, so qt-jambi tries
to look for "/usr//plugins/<pluginnamehere>". And, of course, that
never works.

I'm surprised at all that a source RPM exists at all for SuSE, given
that limitation. And this is what I'm working on: instead of relying
on QTDIR alone, I rely on qmake. As you can see, qmake _can_ tell us
where plugins are installed and can fetch them correctly in any
situation.

Try running "qmake -query" in your environment and compare the result
of it with what the current code outputs.

-- 
Francis Galiegue, fgaliegue at gmail.com
"It seems obvious [...] that at least some 'business intelligence'
tools invest so much intelligence on the business side that they have
nothing left for generating SQL queries" (Stéphane Faroult, in "The
Art of SQL", ISBN 0-596-00894-5)




More information about the Qt-jambi-interest mailing list