From patchwork Tue Aug 25 10:41:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Beno=C3=AEt_Th=C3=A9baudeau?= X-Patchwork-Id: 510438 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id E385C1401E7 for ; Tue, 25 Aug 2015 20:41:53 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2BC06A4998; Tue, 25 Aug 2015 10:41:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ItBuDMiLSJ0j; Tue, 25 Aug 2015 10:41:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id D74AFA498E; Tue, 25 Aug 2015 10:41:49 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 1EA4E1C0E8B for ; Tue, 25 Aug 2015 10:41:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id EC27893214 for ; Tue, 25 Aug 2015 10:41:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sNMyp6UNjAAR for ; Tue, 25 Aug 2015 10:41:47 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from authsmtp.register.it (authsmtp70.register.it [195.110.101.54]) by whitealder.osuosl.org (Postfix) with ESMTP id A9FDA931FC for ; Tue, 25 Aug 2015 10:41:46 +0000 (UTC) Received: from rad-ubuntu.home ([2.1.45.99]) by paganini34 with id 8yhf1r01E28PCii01yhkRt; Tue, 25 Aug 2015 12:41:44 +0200 X-Rid: benoit@wsystem.com@2.1.45.99 From: =?UTF-8?q?Beno=C3=AEt=20Th=C3=A9baudeau?= To: buildroot@buildroot.org Date: Tue, 25 Aug 2015 12:41:38 +0200 Message-Id: <1440499298-39957-1-git-send-email-benoit@wsystem.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Cc: =?UTF-8?q?Beno=C3=AEt=20Th=C3=A9baudeau?= Subject: [Buildroot] [PATCH] pacakge/qt5/qt5base: fix build with ccache X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Building with ccache failed with: Running configuration tests... Failed to process makespec for platform 'devices/linux-buildroot-g++' Project ERROR: Compiler /host/usr/bin/ccache /host/usr/bin/-g++ not found. Check the value of CROSS_COMPILE -device-option Could not read qmake configuration file /build/qt5base-5.5.0/mkspecs/devices/linux-buildroot-g++/qmake.conf. Error processing project file: /dev/null This was caused by Buildroot setting this in qt5base-5.5.0/mkspecs/devices/linux-buildroot-g++/qmake.conf: QMAKE_CXX = $${BR_CCACHE} $${CROSS_COMPILE}g++ But qt5base-5.5.0/mkspecs/features/device_config.prf expects QMAKE_CXX to be a valid (absolute or QMAKE_PATH_ENV-relative) path to an existing file, which is not possible if using ccache as above. Add a patch removing these tests since the toolchain is already tested by Buildroot, which allows to keep using ccache. Signed-off-by: Benoît Thébaudeau --- .../qt5/qt5base/0009-fix-build-with-ccache.patch | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 package/qt5/qt5base/0009-fix-build-with-ccache.patch diff --git a/package/qt5/qt5base/0009-fix-build-with-ccache.patch b/package/qt5/qt5base/0009-fix-build-with-ccache.patch new file mode 100644 index 0000000..04d41a4 --- /dev/null +++ b/package/qt5/qt5base/0009-fix-build-with-ccache.patch @@ -0,0 +1,60 @@ +Fix build with ccache + +Building with Buildroot and ccache failed with: + + Running configuration tests... + Failed to process makespec for platform 'devices/linux-buildroot-g++' + Project ERROR: Compiler /host/usr/bin/ccache /host/usr/bin/-g++ not found. Check the value of CROSS_COMPILE -device-option + Could not read qmake configuration file /build/qt5base-5.5.0/mkspecs/devices/linux-buildroot-g++/qmake.conf. + Error processing project file: /dev/null + +This was caused by Buildroot setting this in +qt5base-5.5.0/mkspecs/devices/linux-buildroot-g++/qmake.conf: + + QMAKE_CXX = $${BR_CCACHE} $${CROSS_COMPILE}g++ + +But qt5base-5.5.0/mkspecs/features/device_config.prf expects QMAKE_CXX +to be a valid (absolute or QMAKE_PATH_ENV-relative) path to an existing +file, which is not possible if using ccache as above. + +Remove these tests since the toolchain is already tested by Buildroot, +which allows to keep using ccache. + +Signed-off-by: Benoît Thébaudeau +--- + mkspecs/features/device_config.prf | 23 ----------------------- + 1 file changed, 23 deletions(-) + +diff --git a/mkspecs/features/device_config.prf b/mkspecs/features/device_config.prf +index cd3a0cf..ef16540 100644 +--- a/mkspecs/features/device_config.prf ++++ b/mkspecs/features/device_config.prf +@@ -14,28 +14,5 @@ host_build { + + # Provide a function to be used by mkspecs + defineTest(deviceSanityCheckCompiler) { +- equals(QMAKE_HOST.os, Windows): \ +- sfx = .exe +- else: \ +- sfx = +- +- # Check if the binary exists with an absolute path. Do this check +- # before the CROSS_COMPILE empty check below to allow the mkspec +- # to derive the compiler path from other device options. +- exists($$QMAKE_CXX$$sfx):return() +- +- # Check for possible reasons of failure +- # check if CROSS_COMPILE device-option is set +- isEmpty(CROSS_COMPILE):error("CROSS_COMPILE needs to be set via -device-option CROSS_COMPILE=") +- +- # Check if QMAKE_CXX points to an executable. +- ensurePathEnv() +- for (dir, QMAKE_PATH_ENV) { +- exists($$dir/$${QMAKE_CXX}$$sfx): \ +- return() +- } +- +- # QMAKE_CXX does not point to a compiler. +- error("Compiler $$QMAKE_CXX not found. Check the value of CROSS_COMPILE -device-option") + } +