[OE-core] [PATCH] go, go-common: Add missing quotes in shell variable assignment
Richard Purdie
richard.purdie at linuxfoundation.org
Fri Feb 1 10:20:10 UTC 2019
On Thu, 2019-01-31 at 12:43 +0000, Phil Blundell wrote:
> Otherwise we will lose if ${BUILD_CC} happens to contain a space.
>
> Signed-off-by: Phil Blundell <pb at pbcl.net>
> ---
> meta/recipes-devtools/go/go-common.inc | 2 +-
> meta/recipes-devtools/go/go_1.9.bb | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-devtools/go/go-common.inc b/meta/recipes-
> devtools/go/go-common.inc
> index 11d55c4d36..d6dc455813 100644
> --- a/meta/recipes-devtools/go/go-common.inc
> +++ b/meta/recipes-devtools/go/go-common.inc
> @@ -29,5 +29,5 @@ export GOCACHE = "off"
> export CGO_ENABLED = "1"
>
> do_compile_prepend() {
> - BUILD_CC=${BUILD_CC}
> + BUILD_CC="${BUILD_CC}"
> }
> diff --git a/meta/recipes-devtools/go/go_1.9.bb b/meta/recipes-
> devtools/go/go_1.9.bb
> index ec5a314e7d..e121e2790f 100644
> --- a/meta/recipes-devtools/go/go_1.9.bb
> +++ b/meta/recipes-devtools/go/go_1.9.bb
> @@ -9,7 +9,7 @@ export CXX_FOR_TARGET = "${CXX}"
> do_compile() {
> export GOBIN="${B}/bin"
> export TMPDIR="$GOTMPDIR"
> - export CC=$BUILD_CC
> + export CC="$BUILD_CC"
>
> cd src
> ./make.bash
>
Whilst this looks like a fine idea in principle, something doesn't like
it and the regression tests fail:
ERROR: go-native-1.11.4-r0 do_compile: Function failed: do_compile (log file is located at /home/pokybuild/yocto-worker/no-x11/build/build/tmp/work/x86_64-linux/go-native/1.11.4-r0/temp/log.do_compile.15400)
ERROR: Logfile of failure stored in: /home/pokybuild/yocto-worker/no-x11/build/build/tmp/work/x86_64-linux/go-native/1.11.4-r0/temp/log.do_compile.15400
Log data follows:
| DEBUG: Executing shell function do_compile
| Building Go cmd/dist using /home/pokybuild/yocto-worker/no-x11/build/build/tmp/work/x86_64-linux/go-native/1.11.4-r0/go1.4/go.
| go tool dist: cannot invoke C compiler "gcc ": exec: "gcc ": executable file not found in $PATH
|
| Go needs a system C compiler for use with cgo.
| To set a C compiler, set CC=the-compiler.
| To disable cgo, set CGO_ENABLED=0.
|
https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/244/steps/7/logs/step1b
Cheers,
Richard
More information about the Openembedded-core
mailing list