Mac: Moved from Qt5 back to Qt4: Makefile picking up wrong lib dir; but kit & including seems ok [SOLVED]
-
Hi,
Did you delete the .pro.user file from your project ? If not, close Qt Creator, remove it and open your project again. You'll have to configure it again but you won't have the old settings lurking back
-
I tried that as well. No luck. Just did it again, removed everything in my build did, ran qmake, and here's the result in the makefile:
LIBS = $(SUBLIBS) -F/Library/Frameworks -L/Library/Frameworks -lssl -lcrypto -framework Foundation -framework Appkit -framework QtMacExtras -F/Users/jan/Qt5.0.2/5.0.2/clang_64/lib -framework AppKit -framework QtWidgets -F/Users/jan/Qt5.0.2/5.0.2/clang_64/qtbase/lib -framework QtGui -framework QtCore -framework QtScript -framework QtSql -framework QtNetwork
The culprits are still there. I'm looking at the right directory; I'm manually removing the files, and I see the makefile appear when I run qmake.
Edit: All versions of the pro.user files was removed before this.
-
What is the path of the qmake that is used with your current kit ?
-
/Developer/Tools/Qt/qmake, which is indeed the qt4.x location
From the "Details" pane in Preferences->Build & Run ->Qt Versions:
Name:
Qt 4.8.5 (Tools)
ABI:
x86-macos-generic-mach_o-64bit
Source:
/
mkspec:
macx-g++
qmake:
/Developer/Tools/Qt/qmake
Default:
debug
Version:
4.8.5
QMAKE_VERSION
2.01a
QT_HOST_BINS
/Developer/Tools/Qt
QT_HOST_DATA
/usr/local/Qt4.8
QT_HOST_PREFIX
/
QT_INSTALL_BINS
/Developer/Tools/Qt
QT_INSTALL_CONFIGURATION
/Library/Preferences/Qt
QT_INSTALL_DATA
/usr/local/Qt4.8
QT_INSTALL_DEMOS
/Developer/Examples/Qt/Demos
QT_INSTALL_DOCS
/Developer/Documentation/Qt
QT_INSTALL_EXAMPLES
/Developer/Examples/Qt/
QT_INSTALL_HEADERS
/usr/include
QT_INSTALL_IMPORTS
/Developer/Applications/Qt/imports
QT_INSTALL_LIBS
/Library/Frameworks
QT_INSTALL_PLUGINS
/Developer/Applications/Qt/plugins
QT_INSTALL_PREFIX
/
QT_INSTALL_TRANSLATIONS
/Developer/Applications/Qt/translations
QT_VERSION
4.8.5 -
I've run a find . -type f -exec grep -l "5.0.2" {} + in my project directory; I find no instances. I did the same in /usr/local/Qt4.8, where the makespecs are located. Same.
-
What is the output of:
@
qmake -v
@ -
@~/Library/Preferences > /Developer/Tools/Qt/qmake -v
QMake version 2.01a
Using Qt version 4.8.5 in /Library/Frameworks@(That's the qmake I'm pointing to in my Creator settings as well)
-
This is all very weird. Every part of configuration you mention looks correct.
-
To say the least. And very frustrating at my end.
-
Can you do a build from the command line ?
-
Never done that before. Copied the stuff from build settings in Creator, ran
@/Developer/Tools/Qt/qmake /Users/jan/Dev/TubulatorQt_4.8/src/TubulatorQt.pro -r -spec macx-g++ CONFIG+=x86_64@
which still generates the same #### line in the makefile:
@LIBS = $(SUBLIBS) -F/Library/Frameworks -L/Library/Frameworks -lssl -lcrypto -framework Foundation -framework Appkit -framework QtMacExtras -F/Users/jan/Qt5.0.2/5.0.2/clang_64/lib -framework AppKit -framework QtWidgets -F/Users/jan/Qt5.0.2/5.0.2/clang_64/qtbase/lib -framework QtGui -framework QtCore -framework QtScript -framework QtSql -framework QtNetwork @ -
looks like your are running qmake from 5.0.2 Oo
Do you have any Q environment variable set in your console ?
-
But two posts above, qmake -v tells me it's 4.8.5. Same binary location.
Environment variables: Not that I know of. What would I check for?
-
This could give you some nice results:
@
env | grep Q
@ -
@> env | grep Q
OLDPWD=/Users/jan/Dev/TubulatorQt_4.8
PWD=/Users/jan/Dev/TubulatorQt_4.8/build-TubulatorQt-Qt_4_8_Desktop-Debug@ -
I'm out of ideas ;)
Oh wait, just one more thing: see if you have a file named qt.conf anywhere on your OS. You can also take a look at Qt makespecs, maybe there are some problems there, but that would be insane.
-
Thanks anyway ;-)
Lots of qt.conf files, but none global (belongs to projects), and all only specifiy the plugins path.
I deleted the make specs before installing anew yesterday, so I doub't there'll be any references to an old Qt install location there.
-
Tried installing and uninstalling 5.0.2. As I suspected - no luck after that either.
Am I really forced to move to another computer?
-
What does a
@find / -name qmake@
return ?
-
Fixed it! I took a long, hard look at my .pro file, starting commenting things out and running quake to how it affected the Makefile.
The culprit was this line:
@LIBS += -framework Foundation -framework Appkit -framework QtMacExtras@
First off, QtMacExtras does not exist as a separate module in Qt 4 (AFAIK), so away it went. That wixed the complaint about missing QtWidgets module and include of 5.0.2 stuff.
What I still don't understand is
-
Why I wasn't getting a complaint about an unknown module instead of a reference to Qt5.0.2 stuff.
-
How the system would pick Qt5.0.2 as a candidate of where the module would be located. I have searched my system intensively, and I find NO references to 5.0.2. I would understand refs to 5.2.0, because that's installed and being used - but not 5.0.2.
-