Details
-
Bug
-
Resolution: Done
-
P4: Low
-
5.5.0
-
None
-
Buildroot with ccache and Qt 5 enabled in the configuration.
-
fe1ba879610c73075b10f274bba338af53a6bd43
Description
Since the commit 3444e23652f69a0d61512b2d50874b125fdd4c8a, qtbase has failed to build with QMAKE_CXX being a composite expression, e.g. to use ccache as Buildroot does in its qmake.conf:
QMAKE_CXX = $${BR_CCACHE} $${CROSS_COMPILE}g++
The resulting error is:
Running configuration tests...
Failed to process makespec for platform 'devices/linux-buildroot-g++'
Project ERROR: Compiler <path_to_output_dir>/host/usr/bin/ccache <path_to_output_dir>/host/usr/bin/<cross_compile>-g++ not found. Check the value of CROSS_COMPILE -device-option
Could not read qmake configuration file <path_to_output_dir>/build/qt5base-5.5.0/mkspecs/devices/linux-buildroot-g++/qmake.conf.
Error processing project file: /dev/null
The previous test using system("which") could cope with the presence of both ccache and the C++ cross-compiler in QMAKE_CXX. The new test requires QMAKE_CXX to be a single valid (absolute or QMAKE_PATH_ENV-relative) path to an existing file. QMAKE_CXX should be flexible enough to support ccache.
The test could be changed to something like:
system($${QMAKE_CXX}$$sfx --version): return()
but I don't think that would be acceptable for Qt since that would not work for all compilers and platforms.
Or maybe the test could split QMAKE_CXX and run the current test on each of the resulting items.