Re: Integrating Golang
Leo Schwab <lschwab@...>
On Thu, Apr 17, 2014 at 1:49 AM, Martin Donnelly <martin.donnelly@...> wrote:
On 05/03/2014 21:55, Leo Schwab wrote:We cobbled together our own recipes to build the Go compilerHas anyone else done any work here? Is there anything that I canI posted an RFC patch set last year but it didn't get any traction and
(available upon request), which seem to be working well enough. We
didn't need to make any changes to the recipes building the GCC
What I was more interested in learning was how people were integrating
the building of Go applications into Yocto. Specifically: 'go get
foo' will build 'foo' and, in the process, fetch and build all its
dependencies. This conflicts directly with Yocto's duties -- fetching
and building dependencies.
My current not-solution is rather ugly: Create a repository that is a
standard Go build environment pre-populated with the app source code
and all of its dependencies. The idea is that 'go get foo' will find
everything it needs already there and won't try and fetch anything
else. Then create a simple Yocto recipe that fetches this repository
and builds it using 'go get ...'. The repository itself is maintained
via rather delicate use of git-subtree.
This gets the job done, and prevents Go and Yocto having a fight about
who fetches what and how, but it's damned ugly...