Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 6

Qt-interest Archive, February 2007
qmake/Makefile/configure problem


Message 1 in thread

Hello all,

I am trying to install Qt 4.2 on OS X 10.4.8, Dual G5 Mac for a  
friend who previously attempted several installs. I have an app that  
builds successfully on my machine with qmake -project, then qmake,  
then make. On his machine, however, the build fails because the  
system looks for uic in a directory that no longer exists that I  
suspect is where my friend had previously installed the system.  
Inspection of Makefile has several occurrences of this directory in  
it. Comparison of Makefile on my machine shows that the directory  
should be the default location of the installation, namely /usr/local/ 
Trolltech/Qt-4.2.2. I have done several reinstalls and configures. I  
have done make confclean. I have deleted OS X preference files for  
Trolltech in the user's Library directory. With the latest configure,  
I did ./configure -prefix /usr/local/Trolltech/Qt-4.2.2 to specify  
explicitly the path to the installation. I have checked the  
users .profile and his PATH variable which look OK (that is,  
includes /usr/local/Trolltech/Qt-4.2.2 and not the bogus directory).  
I manually deleted all previous installations before reinstalling. In  
spite of all this, his Makefile still wants to look for uic in this  
directory that does not exist.

Is there some persistent variable that was set previously by Qt that  
I must change?

Thanks in advance.

Stan Warford

--
 [ signature omitted ] 

Message 2 in thread

On 22.02.07 10:05:13, Stan Warford wrote:
> have done several reinstalls and configures. I have done make confclean. I have 
> deleted OS X preference files for Trolltech in the user's Library directory. 
> With the latest configure, I did ./configure -prefix 
> /usr/local/Trolltech/Qt-4.2.2 to specify explicitly the path to the 
> installation. I have checked the users .profile and his PATH variable which 
> look OK (that is, includes /usr/local/Trolltech/Qt-4.2.2 and not the bogus 
> directory). I manually deleted all previous installations before reinstalling. 
> In spite of all this, his Makefile still wants to look for uic in this 
> directory that does not exist.
> 
> Is there some persistent variable that was set previously by Qt that I must 
> change?

The Qt4 install dir is hardcoded into the qmake binary. Try running
qmake -query QT_INSTALL_PREFIX

That should tell you the installation prefix that is built into the
qmake binary you use.

Andreas

-- 
 [ signature omitted ] 

Message 3 in thread

Andreas Pakulat <apaku@xxxxxx> wrote on 02/22/2007 11:15:33 AM:

# > Is there some persistent variable that was set previously by Qt that I
must
# > change?
#
# The Qt4 install dir is hardcoded into the qmake binary. Try running
# qmake -query QT_INSTALL_PREFIX
#
# That should tell you the installation prefix that is built into the
# qmake binary you use.

You might also do a "which qmake" to ensure that you've not got some
rogue qmake binary hanging around somewhere on the system...

--
 [ signature omitted ] 

Message 4 in thread

OK. Here is what happens with the query:

qmake -query QT_INSTALL_PREFIX
/usr/local/Trolltech/Qt-4.2.2

which is as it should be. And here is the result
of the which command:

which qmake
/usr/local/Trolltech/Qt-4.2.2/bin/qmake

also as it should be. Here is the error message:

netblock-72-25-117-171:~/MyPrograms/ch05/Chap05B johnheuler$ qmake - 
project
netblock-72-25-117-171:~/MyPrograms/ch05/Chap05B johnheuler$ qmake
netblock-72-25-117-171:~/MyPrograms/ch05/Chap05B johnheuler$ make
/Users/johnheuler/bin/uic Chap05B.ui -o .uic/debug-shared/ui_Chap05B.h
make: /Users/johnheuler/bin/uic: Command not found
make: *** [.uic/debug-shared/ui_Chap05B.h] Error 127

so it is looking for uic in /Users/johnheuler/bin, which does not  
even exist, as
shown here:

netblock-72-25-117-171:~ johnheuler$ pwd
/Users/johnheuler
netblock-72-25-117-171:~ johnheuler$ ls
Desktop                         Pictures
Desktop DB                      Public
Desktop DF                      Sites
Documents                       doc
Library                         dot-profile
Movies                          mkspecs
Music                           qt-mac-opensource-src-4.2.2.tar
MyPrograms

Here is the value of PATH from the set command:

PATH=/usr/local/Trolltech/Qt-4.2.2/bin:/bin:/sbin:/usr/bin:/usr/sbin

Here is the content of the .pro file:

######################################################################
# Automatically generated by qmake (2.01a) Thu Feb 22 22:14:55 2007
######################################################################

TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .

# Input
HEADERS += MainWindow.h
FORMS += Chap05B.ui
SOURCES += main.cpp MainWindow.cpp

Here are the first lines from Makefile:

######################################################################## 
#####
# Makefile for building: Chap05B.app/Contents/MacOS/Chap05B
# Generated by qmake (2.01a) (Qt 4.2.2) on: Thu Feb 22 22:14:59 2007
# Project:  Chap05B.pro
# Template: app
# Command: /usr/local/Trolltech/Qt-4.2.2/bin/qmake -macx -o Makefile  
Chap05B.pro
######################################################################## 
#####

Here are some variable definitions from ####### Compiler, tools and  
options:

CFLAGS        = -pipe -g -Wall -W -F/Users/johnheuler/lib  $(DEFINES)
CXXFLAGS      = -pipe -g -Wall -W -F/Users/johnheuler/lib  $(DEFINES)
  ... snip ...
INCPATH       = -I../../../mkspecs/macx-g++ -I. -I/Users/johnheuler/ 
include/QtCore -I/Users/johnheuler/include/QtGui -I/Users/johnheuler/ 
include I/Users/johnheuler/include -I. -I.moc/debug-shared -I.uic/ 
debug-shared

Here are a few lines from ####### Sub-libraries:

/Users/johnheuler/bin/moc:
         (cd /Users/johnheuler/src/moc && $(MAKE))
... snip ...
compiler_uic_clean:
         -$(DEL_FILE) .uic/debug-shared/ui_Chap05B.h
.uic/debug-shared/ui_Chap05B.h: Chap05B.ui
         /Users/johnheuler/bin/uic Chap05B.ui -o .uic/debug-shared/ 
ui_Chap05B.h

I don't know how to interpret these lines from Makefile.

So, why the heck can't make find uic in /usr/local/Trolltech/Qt-4.2.2/ 
bin?????????

Any more suggestions on how to track this down would be greatly  
appreciated.

Thanks,
Stan

On Feb 22, 2007, at 10:47 AM, Gordon.Schumacher@xxxxxxxxxxx wrote:

> Andreas Pakulat <apaku@xxxxxx> wrote on 02/22/2007 11:15:33 AM:
>
> # > Is there some persistent variable that was set previously by Qt  
> that I
> must
> # > change?
> #
> # The Qt4 install dir is hardcoded into the qmake binary. Try running
> # qmake -query QT_INSTALL_PREFIX
> #
> # That should tell you the installation prefix that is built into the
> # qmake binary you use.
>
> You might also do a "which qmake" to ensure that you've not got some
> rogue qmake binary hanging around somewhere on the system...

--
 [ signature omitted ] 

Message 5 in thread

On 22.02.07 23:09:36, Stan Warford wrote:
> OK. Here is what happens with the query:
> 
> qmake -query QT_INSTALL_PREFIX
> /usr/local/Trolltech/Qt-4.2.2
> 
> which is as it should be. And here is the result
> of the which command:
> 
> which qmake
> /usr/local/Trolltech/Qt-4.2.2/bin/qmake
 
Check the rest of the Qt variables compiled in qmake:
QT_INSTALL_PREFIX
QT_INSTALL_DATA
QT_INSTALL_DOCS
QT_INSTALL_HEADERS
QT_INSTALL_LIBS
QT_INSTALL_BINS
QT_INSTALL_PLUGINS
QT_INSTALL_TRANSLATIONS
QT_INSTALL_CONFIGURATION
QT_INSTALL_EXAMPLES
QT_INSTALL_DEMOS
QMAKE_MKSPECS

Andreas

-- 
 [ signature omitted ] 

Message 6 in thread

OK. Here it is.

netblock-72-25-117-171:~ johnheuler$ qmake -query QT_INSTALL_PREFIX
/usr/local/Trolltech/Qt-4.2.2
netblock-72-25-117-171:~ johnheuler$ qmake -query QT_INSTALL_PREFIX
/usr/local/Trolltech/Qt-4.2.2
netblock-72-25-117-171:~ johnheuler$ qmake -query QT_INSTALL_DATA
/usr/local/Trolltech/Qt-4.2.2
netblock-72-25-117-171:~ johnheuler$ qmake -query QT_INSTALL_DOCS
/usr/local/Trolltech/Qt-4.2.2/doc
netblock-72-25-117-171:~ johnheuler$ qmake -query QT_INSTALL_HEADERS
/usr/local/Trolltech/Qt-4.2.2/include
netblock-72-25-117-171:~ johnheuler$ qmake -query QT_INSTALL_LIBS
/usr/local/Trolltech/Qt-4.2.2/lib
netblock-72-25-117-171:~ johnheuler$ qmake -query QT_INSTALL_BINS
/usr/local/Trolltech/Qt-4.2.2/bin
netblock-72-25-117-171:~ johnheuler$ qmake -query QT_INSTALL_PLUGINS
/usr/local/Trolltech/Qt-4.2.2/plugins
netblock-72-25-117-171:~ johnheuler$ qmake -query  
QT_INSTALL_TRANSLATIONS
/usr/local/Trolltech/Qt-4.2.2/translations
netblock-72-25-117-171:~ johnheuler$ qmake -query  
QT_INSTALL_CONFIGURATION
/Library/Preferences/Qt
netblock-72-25-117-171:~ johnheuler$ qmake -query QT_INSTALL_EXAMPLES
/usr/local/Trolltech/Qt-4.2.2/examples
netblock-72-25-117-171:~ johnheuler$ qmake -query QT_INSTALL_DEMOS
/usr/local/Trolltech/Qt-4.2.2/demos
netblock-72-25-117-171:~ johnheuler$ qmake -query QMAKE_MKSPECS
/usr/local/Trolltech/Qt-4.2.2/mkspecs
netblock-72-25-117-171:~ johnheuler$

How does it look?

Stan Warford

On Feb 22, 2007, at 11:57 PM, Andreas Pakulat wrote:

> On 22.02.07 23:09:36, Stan Warford wrote:
>> OK. Here is what happens with the query:
>>
>> qmake -query QT_INSTALL_PREFIX
>> /usr/local/Trolltech/Qt-4.2.2
>>
>> which is as it should be. And here is the result
>> of the which command:
>>
>> which qmake
>> /usr/local/Trolltech/Qt-4.2.2/bin/qmake
>
> Check the rest of the Qt variables compiled in qmake:
> QT_INSTALL_PREFIX
> QT_INSTALL_DATA
> QT_INSTALL_DOCS
> QT_INSTALL_HEADERS
> QT_INSTALL_LIBS
> QT_INSTALL_BINS
> QT_INSTALL_PLUGINS
> QT_INSTALL_TRANSLATIONS
> QT_INSTALL_CONFIGURATION
> QT_INSTALL_EXAMPLES
> QT_INSTALL_DEMOS
> QMAKE_MKSPECS
>
> Andreas

--
 [ signature omitted ] 

Message 7 in thread

On 23.02.07 00:24:45, Stan Warford wrote:
> OK. Here it is.

Looks good too. The last thing that comes to my mind: Does the source
directory contain a .qmake.cache file? If so remove that one and see if
it helps.

Andreas

-- 
 [ signature omitted ]