Skip to contentSkip to conversation

package/openjdk: sets AWK

PATCH New Fabrice Fontaine 2 participants 2 messages Jun 4, 2019 – Jun 8, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/openjdk: sets AWK

AWK must be set to $(HOST_DIR)/bin/gawk otherwise build fails on:
/bin/bash: gawk: command not found

When build fails, config.log contains the following line:

configure:13709: checking for gawk
configure:13725: found /home/buildroot/autobuild/run/instance-3/output/host/bin/gawk configure:13736: result: gawk
[...]
ac_cv_prog_AWK=gawk

Fixes:
- http://autobuild.buildroot.org/results/43c5d08f599e8f44b59a576d243ae1c7b27de7a3

---
 package/openjdk/openjdk.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/openjdk/openjdk.mk +2 -1
index 318e4bade3..2002da7386 100644
@@ -46,12 +46,13 @@ OPENJDK_DEPENDENCIES += libffi
 endif
 
 # OpenJDK ignores some variables unless passed via the environment.
-# These variables are PATH, LD, CC, CXX, and CPP.
+# These variables are PATH, AWK, LD, CC, CXX, and CPP.
 # OpenJDK defaults ld to the ld binary but passes -Xlinker and -z as
 # arguments during the linking process, which causes compilation failures.
 # To fix this issue, LD is set to point to gcc.
 OPENJDK_CONF_ENV = \
 	PATH=$(BR_PATH) \
+	AWK=$(HOST_DIR)/bin/gawk \
 	CC=$(TARGET_CC) \
 	CPP=$(TARGET_CPP) \
 	CXX=$(TARGET_CXX) \
Signature · 1 line
2.14.1
#1 lore raw

PATCH 1/1 package/openjdk: sets AWK

Quoted 10 lines · Fabrice Fontaine

AWK must be set to $(HOST_DIR)/bin/gawk otherwise build fails on:
/bin/bash: gawk: command not found

When build fails, config.log contains the following line:

configure:13709: checking for gawk
configure:13725: found /home/buildroot/autobuild/run/instance-3/output/host/bin/gawk configure:13736: result: gawk
[...]
ac_cv_prog_AWK=gawk

... which is correct.

Except that the PATH in configure is different from the PATH in make, because
we forget to set it...

So instead, could you try setting $(TARGET_MAKE_ENV) in OPENJDK_BUILD_CMDS and
see if that helps?

Regards,
Arnout

Quoted 29 lines

Fixes:
- http://autobuild.buildroot.org/results/43c5d08f599e8f44b59a576d243ae1c7b27de7a3

---
 package/openjdk/openjdk.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/openjdk/openjdk.mk +2 -1
index 318e4bade3..2002da7386 100644
@@ -46,12 +46,13 @@ OPENJDK_DEPENDENCIES += libffi
 endif
 
 # OpenJDK ignores some variables unless passed via the environment.
-# These variables are PATH, LD, CC, CXX, and CPP.
+# These variables are PATH, AWK, LD, CC, CXX, and CPP.
 # OpenJDK defaults ld to the ld binary but passes -Xlinker and -z as
 # arguments during the linking process, which causes compilation failures.
 # To fix this issue, LD is set to point to gcc.
 OPENJDK_CONF_ENV = \
 	PATH=$(BR_PATH) \
+	AWK=$(HOST_DIR)/bin/gawk \
 	CC=$(TARGET_CC) \
 	CPP=$(TARGET_CPP) \
 	CXX=$(TARGET_CXX) \