0

I would like to build Qt, The command qmake -query returns an old Qt installation (5.7)

I searched at .config to look for some qmake.conf or qt.conf. I found the trolltech.conf file and QtProject folder. those two dont't contain any line returned by qmake -query.

I uninstalled qt4-qmake and qt5-qmake packages without success. The command is still returning the same output.

I tried to unset variables with qmake -unset VARIABLE but, it has effect only in variables i set with qmake -set VARIABLE VALUE.

I'm on Linux/Ubuntu 16.04 LTS and i would like to know how to do that qmake to do not point any Qt installation. Thank you !

HebeleHododo
  • 3,620
  • 1
  • 29
  • 38
jdtotow
  • 95
  • 1
  • 5
  • QMake default variables are built-in, do you call newly builded qmake or old one installed on your system? – e.jahandar Dec 19 '16 at 12:22
  • Do you want to build Qt from sources or build your own app on specific Qt version? If you want to select a specific Qt version from multiple options you could use qtchooser, see http://stackoverflow.com/questions/39735998/make-qmake-use-qt5-by-default/39738181#39738181 – talamaki Dec 19 '16 at 14:05
  • @talamaki, i would like to build Qt from source and not an app. – jdtotow Dec 19 '16 at 15:33
  • @e.jahandar by default the old one is called, witch package to uninstall so that to do not have qmake anymore. Then i will restart from scratch – jdtotow Dec 19 '16 at 15:37
  • qmake normally embeds qt installation variables into itself, do you installed it via make install? – e.jahandar Dec 19 '16 at 15:48
  • @e.jahandar no i installed from an installer – jdtotow Dec 19 '16 at 15:50
  • the command `dpkg -S /usr/bin/qmake` gave me qtchooser as output , normally i `sudo apt-get purge qtchoose` it should also remove `qmake` then i won't have anymore qmake. Is it right ? – jdtotow Dec 19 '16 at 16:05
  • qtchooser is wrapper to real qmake, you have to remove libqt5(4)-dev, but if you install qt by make && make install (also with --prefix=/usr) the installed qt will be overwritten – e.jahandar Dec 19 '16 at 16:12

1 Answers1

1

It's on you to invoke the correct qmake. It doesn't "just happen" by magic. Qt is meant to have multiple versions installed in parallel.

Alas, to build Qt itself you shouldn't be invoking qmake manually anyway. A Qt build, on all platforms, consists of two or three commands:

  1. configure ...
  2. make -j# / gmake -j# / jom -j# / nmake.
  3. make -j# install / etc.
Kuba hasn't forgotten Monica
  • 95,931
  • 16
  • 151
  • 313