[meta-virtualization] Problems building under go.

Mark Asselstine asselsm at gmail.com
Wed May 1 16:19:47 PDT 2019


Ken,

Adding the list back as someone else might see something I am missing...

Ideally and example which builds off of core-image-minimal or similar
would be useful. I did the following on master and was able to get and
run hello.go

1) Configure a new build
. ./oe-init-build-env ~/builds/go-now

2) Update the default local.conf
cat >> EOF << conf/local.conf
IMAGE_INSTALL_append += " go git git-perltools go-runtime go-runtime-staticdev"
EOF

3) Build
bitbake core-image-minimal

4) Run
qemu-system-x86_64 -enable-kvm -m 2G -kernel
tmp/deploy/images/qemux86/bzImage -drive
file=tmp/deploy/images/qemux86/core-image-minimal-qemux86.ext4,media=disk,if=vir
tio,format=raw -nographic -serial mon:stdio -append "console=ttyS0
root=/dev/vda rw"

5) On the running target run the following commands:
udhcpc eth0
go get -insecure github.com/golang/example/hello
cd go/src/github.com/golang/example/hello/
go run hello.go

And the result...
root at qemux86:~/go/src/github.com/golang/example/hello# go run hello.go
Hello, Go examples!

So the runtime of GO seems fine. As for your initial email you mention
that you have build issues within the bitbake environment, again there
are many examples of working GO recipes, is it possible for you to
provide me with one which is failing?


Mark

On Fri, Apr 26, 2019 at 11:42 AM Ken Bassford
<kbassford at apertussolutions.com> wrote:
>
> Hi Mark,
>
> Sorry for not getting back to you sooner.  I've been concentrating on another problem as of late, why my OpenKMIP server cannot talk with the Go based client I'm using.
>
> I'm fundamentally suspicious of the Go installation itself as it cannot pull stuff in using "go get".  The GOROOT and GOPATH are set correctly, so I presume something my build is not set correctly.  The bitbake file for my layer appears as follows ...
>

....

>
> It should be noted that this image is based upon the "core-image-lsb-sdk" image.
>
> I figure I have to fix that before moving on to problems building the other modules (which may become a moot point as the kmip-go and it's dependencies do not seem to have as much functionality as go-kmip, and contains far less dependencies).
>
> Any pointers you can provide would be welcome.
>
> Sincerely,
> Ken Bassford
> Apertus Solutions
>
> ---- On Wed, 24 Apr 2019 15:25:19 -0400 Mark Asselstine <asselsm at gmail.com> wrote ----
>
>  > On Tue, Apr 23, 2019 at 10:31 AM Ken Bassford
>  > <kbassford at apertussolutions.com> wrote:
>  > >
>  > > Hello Folks,
>  > >
>  > > I am currently attempting to bring in 16 Go modules ("kmip-go" plus all dependencies) into my OpenXT project and a select few are having problems compiling.  The modules that fail, fail during do_compile_ptest_base with a "vet config not found".  I have attempted to use the PTEST_ENABLED_${PN} = "0" or PTEST_ENABLED = "0" flags to no avail as these settings are being ignored.  The modules in question are "github.com/mattn/go-isatty" and "github.com/uber-go/multierr".
>  > >
>  > > I am hoping that one or more of you in this audience that are familiar with compiling golang modules in a OpenXT bitbake environment might be able to point me in the right direction.
>  >
>  > I don't know much about these modules but I do have my fingers in the
>  > go classes so I might be able to help. Can you type out the
>  > instructions I might be able to follow to reproduce this, ie. which
>  > layers and recipes go boom?
>  >
>  > MarkA
>  >
>  >
>  > >
>  > > Thanks in advance.
>  > >
>  > > Sincerely,
>  > > Ken Bassford
>  > > Apertus Solutions
>  > >
>  > > --
>  > > _______________________________________________
>  > > meta-virtualization mailing list
>  > > meta-virtualization at yoctoproject.org
>  > > https://lists.yoctoproject.org/listinfo/meta-virtualization
>  >
>
>


More information about the meta-virtualization mailing list