Skip to contentSkip to conversation

package/qt5base: fix build when system awk is mawk, not gawk

PATCH New Yann E. MORIN 3 participants 4 messages Dec 5, 2018 – Dec 6, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/qt5base: fix build when system awk is mawk, not gawk

Commit c2ea056a1b (package/qt5/qt5base: use ccache for building host code) introduced a tweak to qt5's mkspec file, to define the compilers (C and C++) to use to build qmake.

In doing so, it changed the variables in that file, from this layout:
VAR = value

to this:
VAR=value

During its configuration phase, qt5 will parse that file using the system awk.

However, the system awk is not necessarily GNU awk; some systems, especially Debian ones, use mawk as the default awk implementation.

mawk does not behave the same as GNU awk, and this causes qt5 to extract empty values, and thus leads to build failures.

Fix that by replacing the variables with similar layout, keeping the spaces around the equal signs.

Fixes:

    http://autobuild.buildroot.org/results/cb5/cb555a124bb3bdb9c5a3465673c21022d94cf2ca/
---
 package/qt5/qt5base/qt5base.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
package/qt5/qt5base/qt5base.mk +3 -3
index ec3d7042f1..98297d87db 100644
@@ -273,9 +273,9 @@ endif
 
 # This allows to use ccache when available
 define QT5BASE_CONFIGURE_HOSTCC
-	$(SED) 's,^QMAKE_COMPILER\s*=.*,QMAKE_COMPILER=$(HOSTCC),' $(@D)/mkspecs/common/g++-base.conf
-	$(SED) 's,^QMAKE_CC\s*=.*,QMAKE_CC=$(HOSTCC),' $(@D)/mkspecs/common/g++-base.conf
-	$(SED) 's,^QMAKE_CXX\s*=.*,QMAKE_CXX=$(HOSTCXX),' $(@D)/mkspecs/common/g++-base.conf
+	$(SED) 's,^QMAKE_COMPILER\s*=.*,QMAKE_COMPILER = $(HOSTCC),' $(@D)/mkspecs/common/g++-base.conf
+	$(SED) 's,^QMAKE_CC\s*=.*,QMAKE_CC = $(HOSTCC),' $(@D)/mkspecs/common/g++-base.conf
+	$(SED) 's,^QMAKE_CXX\s*=.*,QMAKE_CXX = $(HOSTCXX),' $(@D)/mkspecs/common/g++-base.conf
 endef
 
 define QT5BASE_CONFIGURE_CMDS
Signature · 1 line
2.14.1
#1 lore raw

PATCH 1/1 package/qt5base: fix build when system awk is mawk, not gawk

Hello,

Quoted 22 lines · Yann E. MORIN

Commit c2ea056a1b (package/qt5/qt5base: use ccache for building host code) introduced a tweak to qt5's mkspec file, to define the compilers (C and C++) to use to build qmake.

In doing so, it changed the variables in that file, from this layout:
VAR = value

to this:
VAR=value

During its configuration phase, qt5 will parse that file using the system awk.

However, the system awk is not necessarily GNU awk; some systems, especially Debian ones, use mawk as the default awk implementation.

mawk does not behave the same as GNU awk, and this causes qt5 to extract empty values, and thus leads to build failures.

Fix that by replacing the variables with similar layout, keeping the spaces around the equal signs.

Quoted 7 lines

Fixes:

    http://autobuild.buildroot.org/results/cb5/cb555a124bb3bdb9c5a3465673c21022d94cf2ca/

Thanks a lot Yann for the research/investigation!

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 package/qt5base: fix build when system awk is mawk, not gawk

Hi Yann, all,

Quoted 30 lines · Thomas Petazzoni

Hello,

Quoted 27 lines · Yann E. MORIN

Commit c2ea056a1b (package/qt5/qt5base: use ccache for building host code) introduced a tweak to qt5's mkspec file, to define the compilers (C and C++) to use to build qmake.

In doing so, it changed the variables in that file, from this layout:
VAR = value

to this:
VAR=value

During its configuration phase, qt5 will parse that file using the system awk.

However, the system awk is not necessarily GNU awk; some systems, especially Debian ones, use mawk as the default awk implementation.

mawk does not behave the same as GNU awk, and this causes qt5 to extract empty values, and thus leads to build failures.

Fix that by replacing the variables with similar layout, keeping the spaces around the equal signs.

Fixes:

https://urldefense.proofpoint.com/v2/url?u=http-3A__autobuild.buildroot.org_results_cb5_cb555a124bb3bdb9c5a3465673c21022d94cf2ca_&d=DwICAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=lqdeeSSEes0GFDDl656eViXO7breS55ytWkhpk5R81I&m=S86BonA9k4UF7AG3ANLOEQcjguj5mvG5hEL4MrugAKw&s=vGDbSOkH-rPmnukIWusRAMfV7JGOSP3N68M7J9Q1FnM&e=

In fact "reported by BR autobuilder" :)

Quoted 7 lines
Quoted 3 lines
Cc Alexey Brodkin <[email protected]>
Cc Thomas Petazzoni <[email protected]>

Thanks a lot Yann for the research/investigation!

Indeed thanks a lot for this super fast investigation and the fix!

-Alexey

#3 lore raw

PATCH 1/1 package/qt5base: fix build when system awk is mawk, not gawk

In reply to Yann E. MORIN

Hello,

Quoted 25 lines · Yann E. MORIN

Commit c2ea056a1b (package/qt5/qt5base: use ccache for building host code) introduced a tweak to qt5's mkspec file, to define the compilers (C and C++) to use to build qmake.

In doing so, it changed the variables in that file, from this layout:
VAR = value

to this:
VAR=value

During its configuration phase, qt5 will parse that file using the system awk.

However, the system awk is not necessarily GNU awk; some systems, especially Debian ones, use mawk as the default awk implementation.

mawk does not behave the same as GNU awk, and this causes qt5 to extract empty values, and thus leads to build failures.

Fix that by replacing the variables with similar layout, keeping the spaces around the equal signs.

Fixes:

    http://autobuild.buildroot.org/results/cb5/cb555a124bb3bdb9c5a3465673c21022d94cf2ca/
Quoted 7 lines
---
 package/qt5/qt5base/qt5base.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com