Bug 91573 - python binding doesn't build if multiple QT versions (eg. qt qt-mt) are available
Summary: python binding doesn't build if multiple QT versions (eg. qt qt-mt) are avail...
Status: RESOLVED FIXED
Alias: None
Product: bindings
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kde-bindings
URL:
Keywords:
: 92022 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-10-18 07:58 UTC by Valentine Sinitsyn
Modified: 2005-01-11 01:59 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Makefile patch (1.24 KB, patch)
2004-10-27 06:03 UTC, Valentine Sinitsyn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Valentine Sinitsyn 2004-10-18 07:58:40 UTC
Version:            (using KDE KDE 3.3.1)
Installed from:    Compiled From Sources
Compiler:          gcc-3.3.4 Standard GCC compiler from Slackware Linux 0.0
OS:                Linux

When I tried to compile kdebindings-3.3.1, I received the following error message from Python (SIP generator):

Error: qt and qt-mt libraries are both available. Choose one by -l switch

I'm using Slackware Linux 10.0 with KDE 3.2.3 installed. It seems that the problem occurs because /usr/lib/qt/lib contain two files: libqt-mt.so (multithreaded version) and libqt.so, which is just the symlink to libqt-mt.so and SIP ask the user to specify one of them to use. Unfortunately, I have found no ways to do this except hacking into generated Makefile in python directory and putting "configure.py -lqt-mt" there. I expected LIBS variable to do this job, but it's not the case.

Steps to reproduce:
1. Grab & unpack kdebindings-3.3.1
2. cd kdebindings-3.3.1; ./configure --prefix=/whatever/you/want
3. make

Expected results:
All bindings are built smoothly

Actual results:
Compiling SIP fails with abovementionaed message
Comment 1 Valentine Sinitsyn 2004-10-18 08:12:35 UTC
Sorry, the correct error message is as follows:

These Qt libraries were found: qt qt-mt. Use the -l argument to explicitly specify which you want to use.
Comment 2 Richard Dale 2004-10-18 11:26:29 UTC
On Monday 18 October 2004 06:58, Valentine Sinitsyn wrote:
> I'm using Slackware Linux 10.0 with KDE 3.2.3 installed. It seems that the
> problem occurs because /usr/lib/qt/lib contain two files: libqt-mt.so
> (multithreaded version) and libqt.so, which is just the symlink to
> libqt-mt.so and SIP ask the user to specify one of them to use.
Well this is a bug in Slackware, not kdebindings! Have you tried reporting it 
to the Slackware maintainers? There are no Qt configuration options to create 
the symlink and KDE expects to always use -lqt-mt.

-- Richard

Comment 3 Valentine Sinitsyn 2004-10-18 12:16:36 UTC
Yes, I was suspecting something like this, but unfortunately Slackware is not the only distro to have this symlink. At least one another distribution I use (it is ASPLinux9, based on Red Hat Linux 9) also has this symlink. If KDE expects to always use -lqt-mt, why not say so in kdebindings-3.3.1/python/Makefile.am:24 (by just adding "-l qt-mt" to the list of configure.py parameters as I did)? This will suppress this error message in "non-standard" distributions.
Comment 4 Valentine Sinitsyn 2004-10-27 06:03:45 UTC
Created attachment 8048 [details]
Makefile patch

This is the proposed patch for this problem. Applies as 'cd kdebindings-3.3.1
&& patch -p0 <kdebindings-3.3.1.patch'. It will say your sip/config.py to use
qt-mt on any system, regardless standard and non-standard symlinks this system
has
Comment 5 Eric Sandall 2004-11-10 18:07:09 UTC
How is this a Slackware bug (or any distro's) if kdebindings doesn't follow the specified LDFLAGS and/or LIBS?
Comment 6 Amilcar do Carmo Lucas 2004-11-10 18:18:14 UTC
*** Bug 92022 has been marked as a duplicate of this bug. ***
Comment 7 Simon Edwards 2004-11-13 11:07:24 UTC
The Makefile.am in the kdebindings python directory now explicitly requests qt-mt.
Comment 8 Eric Sandall 2005-01-11 00:05:45 UTC
Will that break systems that are trying to use qtopia or qt-embedded?
Comment 9 Eric Sandall 2005-01-11 01:59:02 UTC
BTW, kdebindings now compiles successfully with python, thanks. :)