QT install has wrong internal environment variables

Bug #358088 reported by budge
2
Affects Status Importance Assigned to Milestone
qt4-x11 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: qt4-qmake

I can't build QT4 project Makefiles with qmake due to internal weirdness. I use the default install locations, and install via synaptic. Here are some examples of the kind of brokenness I'm encountering:

I initially get errors regarding QMAKESPEC, and when I try to set the QMAKESPEC and build, I get something like

>QT_INSTALL_PREFIX=/usr qmake -spec linux-g++
Could not find mkspecs for your QMAKESPEC(linux-g++) after trying:
 /usr/bin/mkspecs

> qmake -query QT_INSTALL_PREFIX
/usr/bin

> qmake -query QT_INSTALL_BINS
/usr/bin/bin

some Qt variables can be set via qmake -set VARIABLE, but these two (at least) appear to be hard-coded. It looks like the install directory on the original system was /usr/bin, whose value is hard coded into the binary. Then the package is distributed such that the files live in the correct places, but the hard-coded variables now can't find them. Just a guess as I'm no Qt expert.

I'm running the Ubuntu Jaunty 9.04 Beta release. The Qt version is 4.5.0 and qmake is 2.01a.

I believe that the value for QT_INSTALL_PREFIX should be /usr for this Qt distribution, and I believe that QMAKESPEC should point to one of the directories in /usr/share/qt4/mkspecs. Although I've noted qt4-qmake as the problem, I'm not at all sure that this will not extend to other qt4 packages.

Revision history for this message
Terence Simpson (tsimpson) wrote :

This works fine for me:
$ qmake -query QT_INSTALL_PREFIX
/usr
$ qmake -query QT_INSTALL_BINS
/usr/bin

qt4-qmake 4.5.0-0ubuntu4

Revision history for this message
budge (brian-budge) wrote :

Wow, crazy. I don't have anything strange in my environment that I know of. I installed from CD only a few days ago, and just installed Qt. Recommendations? I'm considering just installing from source, but I'm a bit worried about breaking other package dependencies according to apt-get/synaptic. Do these binaries come from different servers? I suppose I forgot to mention that I'm running x86-64. Is that the case with you as well?

Revision history for this message
Terence Simpson (tsimpson) wrote :

no, I'm on x86.
The binaries should all be the same on every server you download from, just make sure you are fully up-to-date.
$ apt-cache policy qt4-qmake
qt4-qmake:
  Installed: 4.5.0-0ubuntu4
  Candidate: 4.5.0-0ubuntu4
  Version table:
 *** 4.5.0-0ubuntu4 0
        500 http://gb.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

Revision history for this message
budge (brian-budge) wrote :

Okay, mine says:

> apt-cache policy qt4-qmake
qt4-qmake:
  Installed: 4.5.0-0ubuntu4
  Candidate: 4.5.0-0ubuntu4
  Version table:
 *** 4.5.0-0ubuntu4 0
        500 http://us.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

Can anyone verify that this works for x86-64? I know you say it should be the same on every server, but my hunch is that when the x86-64 build was actually *built* the wrong destination directory was specified, so it would be equally wrong on every server. It seems strange that this could only be broken on my machine. I could be completely wrong. If so, can anyone tell me how it might be that the install_prefix could become broken *after* install, and how this could happen even after Qt is reinstalled?

Revision history for this message
Terence Simpson (tsimpson) wrote :

If you open up quassel or konversation and connect to IRC, then join the #kubuntu-devel channel you may get some answers from a user on AMD64. irc://irc.ubuntu.com/#kubuntu-devel

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.