[OE-core] [PATCH 1/3] go: Add recipes for golang compilers and tools
Maciej Borzęcki
maciej.borzecki at rndity.com
Sun Feb 12 14:51:52 UTC 2017
On Tue, Feb 7, 2017 at 5:24 AM, Khem Raj <raj.khem at gmail.com> wrote:
> This is converging the recipes for go from
> meta-virtualization and oe-meta-go
>
> Add recipes for go 1.7
>
> go.bbclass is added to ease out writing
> recipes for go packages
I took these for a spin with current mender tree. Mender is somewhat
interesting as we build binaries for the target (Mender client) and
some extra tools for the host (mender-artifact tool). I was able to
build the client code successfully. I ran into some problems with
mender-artifact-native.
The native build problem stems from the fact that there's a single
go-native recipe, currently supporting only Go 1.4. Ideally
mender-artifact code could be built under Go 1.7 and newer with no
problem, 1.4 not so much. We already set PREFERRED_VERSION for both go
and go-native to 1.7% so bitbake proceeds with the build and logs:
NOTE: preferred version 1.7 of go-native not available (for item go-native)
NOTE: versions of go-native available: 1.4.3
However, in order to build a native Go 1.7 toolchain we would still
need to build Go 1.4. The limitation comes directly from the way Go is
built. You to have the so called 'bootstrap' Go (v1.4.2) in order to
build Go >= 1.5. Thus we end up in a situation where both
go-native_1.4 and go-native_1.7 would need to be built.
I don't know how make both go-native recipes build and depend on
another. Maybe someone with more Bitbake kung-fu can step in and
propose a method. In oe-meta-go this is fixed in somewhat trivial
manner. Namely, there's a go-bootstrap recipe
https://github.com/mem/oe-meta-go/tree/master/recipes-devtools/go With
this all 'usable' Go toolchains depend on go-bootstrap-native.
--
Maciej Borzecki
RnDity
More information about the Openembedded-core
mailing list