Summary: | qmake-utils.eclass: qmake ignores QMAKE_CXX, runs g++ directly | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sergei Trofimovich (RETIRED) <slyfox> |
Component: | Eclasses | Assignee: | Qt Bug Alias <qt> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | alexey+gentoo, gentoo, johannes.geiss, kentnl, sam, tolgaucar44, whissi |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://bugreports.qt.io/browse/QTBUG-66404 | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=717680 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 243502 |
Description
Sergei Trofimovich (RETIRED)
2020-05-29 17:35:47 UTC
If I understand qmake correctly minimal reproducer is: """ $ touch a.pro $ qmake -makefile QMAKE_CXX=x86_64-pc-linux-gnu-g++ QMAKE_HOST_CXX=x86_64-pc-linux-gnu-g++ Project ERROR: Cannot run compiler 'g++'. Output: =================== =================== Maybe you forgot to setup the environment? """ (In reply to Sergei Trofimovich from comment #0) > I don't have g++ and it should not matter. Eclass tries to override it with > QMAKE_CXX="$(tc-getCXX)", but qmake somehow ignores it. The override used to work a few Qt versions ago but upstream may have changed something that broke it without us noticing. (In reply to Sergei Trofimovich from comment #1) > If I understand qmake correctly minimal reproducer is: > > """ > $ touch a.pro > $ qmake -makefile QMAKE_CXX=x86_64-pc-linux-gnu-g++ Just to be clear, we will not change qmake's default behavior outside of portage. It will still invoke g++ by default. Ebuilds that use eqmake5 should respect CXX however (and that's what this bug is about). (In reply to Davide Pesavento from comment #3) > (In reply to Sergei Trofimovich from comment #1) > > If I understand qmake correctly minimal reproducer is: > > > > """ > > $ touch a.pro > > $ qmake -makefile QMAKE_CXX=x86_64-pc-linux-gnu-g++ > Just to be clear, we will not change qmake's default behavior outside of > portage. It will still invoke g++ by default. Ebuilds that use eqmake5 > should respect CXX however (and that's what this bug is about). Sounds perfect. Maybe backport this?: https://codereview.qt-project.org/c/qt/qtbase/+/255135/2/configure I think the default comes from /usr/lib64/qt5/mkspecs/common/g++-base.conf: QMAKE_CXX = $${CROSS_COMPILE}g++ If I change it manually qmak seems to accept new compiler. But I don't know how to pass CROSS_COMPILE directly. Environment variable or an argument to -makefile does not seem to work. *** Bug 731762 has been marked as a duplicate of this bug. *** *** Bug 809116 has been marked as a duplicate of this bug. *** |