Bug 631652

Summary: qmake missing FTBS build of qjson 0.71 on F14
Product: [Fedora] Fedora Reporter: Eli Wapniarski <eli>
Component: qtAssignee: Than Ngo <than>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: extras-orphan, itamar, jreznik, kevin, ltinkl, rdieter, rnovacek, smparrish, than, thomasj
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-09-08 11:09:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 631423    

Description Eli Wapniarski 2010-09-08 04:57:30 UTC
I'm the maintainer for qjson 0.71

I just received a report from FTBS that it could not build qjson 0.71 in F14. The bug report is:

https://bugzilla.redhat.com/show_bug.cgi?id=631423

The build log shows:

CMake Error at /usr/share/cmake/Modules/FindQt4.cmake:1151 (MESSAGE):
  Qt qmake not found!

qt-devel is listed as a "BuildRequires" in the spec file.

Is this a problem with the qt-devel package or am I missing something?

Comment 1 Kevin Kofler 2010-09-08 11:09:23 UTC
You should BR qt4-devel rather than qt-devel, since qt-devel is (used to be) provided by qt3-devel as well, and yum now prefers that because it has fewer dependencies. We're dropping the Provides: qt-devel from qt3-devel at least from F14 on, as per bug 623106. But still, you should always have used qt4-devel, it was just luck that you haven't hit this yet. (And, on the other hand, qt4 is just a virtual Provides of the qt package, so filing bugs against qt4 is wrong. Yes, it's complicated. ;-) )

*** This bug has been marked as a duplicate of bug 623106 ***

Comment 2 Eli Wapniarski 2010-09-08 16:48:27 UTC
I've just looked in:

http://download.fedora.redhat.com/pub/fedora/linux/updates/testing/14/x86_64/

and

http://download.fedora.redhat.com/pub/fedora/linux/updates/13/x86_64/


Both packagages are qt-devel not qt4-devel

Comment 3 Rex Dieter 2010-09-08 16:55:48 UTC
hint,

$ rpm -q --whatprovides qt4-devel
qt-devel-4.6.3-8.fc13.x86_64


:)

Comment 4 Kevin Kofler 2010-09-08 17:01:18 UTC
And rpm -q --whatprovides qt-devel returns:
qt3-devel-3.3.8b-29.fc13.i686
qt-devel-4.6.3-8.fc13.i686

Comment 5 Eli Wapniarski 2010-09-08 17:07:35 UTC
So. If BuildRequires:  qt-devel >= 4.0 is in the spec file, why do I get

CMake Error at /usr/share/cmake/Modules/FindQt4.cmake:1151 (MESSAGE):
  Qt qmake not found!

When it is provided by qt-devel >= 4.0?

Comment 6 Rex Dieter 2010-09-08 17:10:18 UTC
Partly because qt has an epoch, this works too,
BuildRequires: qt-devel >= 1:4.0

Comment 7 Kevin Kofler 2010-09-08 17:14:28 UTC
Because
qt3-devel-3.3.8b Provides: qt-devel = 1:3.3.8b
qt-devel-4.6.3 Provides by identity qt-devel = 1:4.6.3
1:3.3.8b > 4.0 (because 4.0 = 0:4.0)
1:4.6.3 > 4.0
so both match and yum picks qt3-devel due to it having fewer dependencies (the latest behavior change in yum; before, it would pick qt-devel due to the shorter name).

You should use:
BuildRequires: qt4-devel
which is provided only by qt-devel, not qt3-devel, and which is provided without Epoch, so e.g.:
BuildRequires: qt4-devel > 4.6
actually does what you expect it to do. With qt-devel, you'd have to write:
BuildRequires: qt-devel > 1:4.6
to require at least 4.6, just qt-devel > 4.6 would always match.

And in addition, qt4-devel will continue working when we will have Qt 5.

Comment 8 Kevin Kofler 2010-09-08 17:15:59 UTC
Oh, and actually, you probably want >= 4.0 rather than > 4.0, too (likewise for the >= 4.6 in my examples).

Comment 9 Eli Wapniarski 2010-09-08 17:23:00 UTC
That's what's in the spec file

BuildRequires:  qt-devel >= 4.0

Comment 10 Eli Wapniarski 2010-09-08 17:27:49 UTC
Sorry guys...

This is beginning to sound to much like Fisbin (Its a Star Trek reference).

This is starting to get to complicated for the likes of me.

Probably at the beginning of the week I will be orphaning stuff. I will post an alert on mailing list. Hopefully others will pick up the packages.

Keep up the good work.

Comment 11 Kevin Kofler 2010-09-08 17:28:53 UTC
> That's what's in the spec file
>
> BuildRequires:  qt-devel >= 4.0

And that's wrong. It should be:
BuildRequires:  qt4-devel

Comment 12 Eli Wapniarski 2010-09-12 06:36:45 UTC
On reflection... I managed to fix the issue that I had with the package that I'm maintaining with a reletively simple fix.

Be that as it may. It would be helpful if the package name and version reflected the information required in the buildrequires line of any given spec file. It would avoid dumb questions / bug reports like this one