Closed royemmerich closed 7 years ago
In the meantime I have cloned this repo and am attempting to do a build.
github.com-googleapis-gax-go.bb
claims to require google.golang.org/grpc
:
src/github.com/googleapis/gax-go/call_option.go:36:2: cannot find package "google.golang.org/grpc" in any of:
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/x86_64-linux/usr/lib/arm-phytec-linux-gnueabi/go/src/google.golang.org/grpc (from $GOROOT)
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/github.com-googleapis-gax-go/1.0-r0/github.com-googleapis-gax-go-1.0/src/google.golang.org/grpc (from $GOPATH)
I have added google.golang.org-grpc.bb
:
DESCRIPTION = "google.golang.org/grpc"
GO_IMPORT = "google.golang.org/grpc"
inherit go
SRC_URI = "git://github.com/grpc/grpc-go;protocol=https;destsuffix=${PN}-${PV}/src/${GO_IMPORT}"
SRCREV = "6914ab1e338c92da4218a23d27fcd03d0ad78d46"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=a4bad33881612090c6035d8393175996"
FILES_${PN} += "${GOBIN_FINAL}/*"
DEPENDS+="\
github.com-gogo-protobuf \
"
But now I don't know how to solve the following error message:
ERROR: google.golang.org-grpc-1.0-r0 do_compile: Function failed: do_compile (log file is located at /home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/google.golang.org-grpc/1.0-r0/temp/log.do_compile.3582)
ERROR: Logfile of failure stored in: /home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/google.golang.org-grpc/1.0-r0/temp/log.do_compile.3582
Log data follows:
| DEBUG: Executing shell function do_compile
| GOARCH="arm"
| GOBIN=""
| GOEXE=""
| GOHOSTARCH="amd64"
| GOHOSTOS="linux"
| GOOS="linux"
| GOPATH="/home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/google.golang.org-grpc/1.0-r0/google.golang.org-grpc-1.0:/home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/phyboard-regor-am335x-1/usr/lib/arm-phytec-linux-gnueabi/go"
| GORACE=""
| GOROOT="/home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/x86_64-linux/usr/lib/arm-phytec-linux-gnueabi/go"
| GOTOOLDIR="/home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/x86_64-linux/usr/lib/arm-phytec-linux-gnueabi/go/pkg/tool/linux_amd64"
| CC="arm-phytec-linux-gnueabi-gcc"
| GOGCCFLAGS="-fPIC -marm -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build217878831=/tmp/go-build -gno-record-gcc-switches"
| CXX="arm-phytec-linux-gnueabi-g++"
| CGO_ENABLED="0"
| src/google.golang.org/grpc/codec.go:40:2: cannot find package "github.com/golang/protobuf/proto" in any of:
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/x86_64-linux/usr/lib/arm-phytec-linux-gnueabi/go/src/github.com/golang/protobuf/proto (from $GOROOT)
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/google.golang.org-grpc/1.0-r0/google.golang.org-grpc-1.0/src/github.com/golang/protobuf/proto (from $GOPATH)
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/phyboard-regor-am335x-1/usr/lib/arm-phytec-linux-gnueabi/go/src/github.com/golang/protobuf/proto
| src/google.golang.org/grpc/status/status.go:49:2: cannot find package "google.golang.org/genproto/googleapis/rpc/status" in any of:
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/x86_64-linux/usr/lib/arm-phytec-linux-gnueabi/go/src/google.golang.org/genproto/googleapis/rpc/status (from $GOROOT)
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/google.golang.org-grpc/1.0-r0/google.golang.org-grpc-1.0/src/google.golang.org/genproto/googleapis/rpc/status (from $GOPATH)
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/phyboard-regor-am335x-1/usr/lib/arm-phytec-linux-gnueabi/go/src/google.golang.org/genproto/googleapis/rpc/status
| src/google.golang.org/grpc/credentials/oauth/oauth.go:42:2: cannot find package "golang.org/x/oauth2" in any of:
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/x86_64-linux/usr/lib/arm-phytec-linux-gnueabi/go/src/golang.org/x/oauth2 (from $GOROOT)
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/google.golang.org-grpc/1.0-r0/google.golang.org-grpc-1.0/src/golang.org/x/oauth2 (from $GOPATH)
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/phyboard-regor-am335x-1/usr/lib/arm-phytec-linux-gnueabi/go/src/golang.org/x/oauth2
| src/google.golang.org/grpc/credentials/oauth/oauth.go:43:2: cannot find package "golang.org/x/oauth2/google" in any of:
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/x86_64-linux/usr/lib/arm-phytec-linux-gnueabi/go/src/golang.org/x/oauth2/google (from $GOROOT)
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/google.golang.org-grpc/1.0-r0/google.golang.org-grpc-1.0/src/golang.org/x/oauth2/google (from $GOPATH)
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/phyboard-regor-am335x-1/usr/lib/arm-phytec-linux-gnueabi/go/src/golang.org/x/oauth2/google
| src/google.golang.org/grpc/credentials/oauth/oauth.go:44:2: cannot find package "golang.org/x/oauth2/jwt" in any of:
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/x86_64-linux/usr/lib/arm-phytec-linux-gnueabi/go/src/golang.org/x/oauth2/jwt (from $GOROOT)
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/google.golang.org-grpc/1.0-r0/google.golang.org-grpc-1.0/src/golang.org/x/oauth2/jwt (from $GOPATH)
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/phyboard-regor-am335x-1/usr/lib/arm-phytec-linux-gnueabi/go/src/golang.org/x/oauth2/jwt
| src/google.golang.org/grpc/reflection/serverreflection.go:64:2: cannot find package "github.com/golang/protobuf/protoc-gen-go/descriptor" in any of:
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/x86_64-linux/usr/lib/arm-phytec-linux-gnueabi/go/src/github.com/golang/protobuf/protoc-gen-go/descriptor (from $GOROOT)
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/google.golang.org-grpc/1.0-r0/google.golang.org-grpc-1.0/src/github.com/golang/protobuf/protoc-gen-go/descriptor (from $GOPATH)
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/phyboard-regor-am335x-1/usr/lib/arm-phytec-linux-gnueabi/go/src/github.com/golang/protobuf/protoc-gen-go/descriptor
| src/google.golang.org/grpc/examples/helloworld/mock/mock_helloworld/hw_mock.go:7:2: cannot find package "github.com/golang/mock/gomock" in any of:
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/x86_64-linux/usr/lib/arm-phytec-linux-gnueabi/go/src/github.com/golang/mock/gomock (from $GOROOT)
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/google.golang.org-grpc/1.0-r0/google.golang.org-grpc-1.0/src/github.com/golang/mock/gomock (from $GOPATH)
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/phyboard-regor-am335x-1/usr/lib/arm-phytec-linux-gnueabi/go/src/github.com/golang/mock/gomock
| src/google.golang.org/grpc/grpclog/glogger/glogger.go:42:2: cannot find package "github.com/golang/glog" in any of:
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/x86_64-linux/usr/lib/arm-phytec-linux-gnueabi/go/src/github.com/golang/glog (from $GOROOT)
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/google.golang.org-grpc/1.0-r0/google.golang.org-grpc-1.0/src/github.com/golang/glog (from $GOPATH)
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/phyboard-regor-am335x-1/usr/lib/arm-phytec-linux-gnueabi/go/src/github.com/golang/glog
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/google.golang.org-grpc/1.0-r0/temp/log.do_compile.3582)
ERROR: Task 3921 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/go/google.golang.org-grpc.bb, do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1066 tasks of which 1065 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
No currently running tasks (1065 of 3928)
Summary: 1 task failed:
/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/go/google.golang.org-grpc.bb, do_compile
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
How does one tell the google.golang.org-grpc.bb
recipe where to look for the github.com/golang/protobuf/proto
directory?
It would help if I was using the correct dependency:
DEPENDS+="\
github.com-golang-protobuf \
"
I've made further progress but am stuck on another issue which I'll report about later if I can't solve it.
Hi,
It seems that influxdb is running on my raspberrypi...
I haven't tested much so far cause I proceeded to telegraf.
Except running influxdbd
- which gave me the start screen with the logo ASCII - Art
Currently working only at my own docker recipe. The other stuff I should have. If you go to the deps of telegraf well - Godebs of telegraf you will get a little horror cause it has a lot more depends than influxdb.
I found out that in meta-virtualization there is a docker recipe but also there are other go recipes. Well - but they are not compatible to the naming of oe-meta-go. It will not recognize the already installed go compiler.
So you can not use it cause you will run into a conflict with the go version from oe-meta-go.
Also I found that I do not like the naming scheme from meta-virtualization: github.com-sirupsen-logrus.bb is there just go-logrus.bb
In this case not problematic but: if you do the recipes for influxdb... You find that you need:
github.com-gogo-protobuf.bb and github.com-golang-protobuf.bb
Here the story of the naming of meta-virtualization becomes a foot.
Two different things. Without the repo owner result in the same name.
I guess the go people always use the repo to identify the package. (I am not a go programmer - did not do a single line yet - just btw. )
Also the recipes are a lot more complicated.
I wrote actually a tool for creating recipes it is also in the repo here
it takes a file where each line is the repo and a secondary (now unused string - actually ment for the commit like in the depends file)
To your question:
How does one tell the google.golang.org-grpc.bb recipe where to look for the github.com/golang/protobuf/proto directory?
You need a recipe for golang protobuf:
GO_IMPORT = "google.golang.org/grpc" specifies where it will go see my protobuf recipe
The proto dir comes from the repo itself.
btw: the worst recipe I have so far.
Unfortunately I can't get your layer to compile out of the box on my system. I'm trying to figure out why but haven't yet been successful. Any tips greatly appreciated.
Here is the error I'm seeing:
ERROR: github.com-googleapis-gax-go-1.0-r0 do_compile: Function failed: do_compile (log file is located at /home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/github.com-googleapis-gax-go/1.0-r0/temp/log.do_compile.16416)
ERROR: Logfile of failure stored in: /home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/github.com-googleapis-gax-go/1.0-r0/temp/log.do_compile.16416
Log data follows:
| DEBUG: Executing shell function do_compile
| GOARCH="arm"
| GOBIN=""
| GOEXE=""
| GOHOSTARCH="amd64"
| GOHOSTOS="linux"
| GOOS="linux"
| GOPATH="/home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/github.com-googleapis-gax-go/1.0-r0/github.com-googleapis-gax-go-1.0:/home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/phyboard-regor-am335x-1/usr/lib/arm-phytec-linux-gnueabi/go"
| GORACE=""
| GOROOT="/home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/x86_64-linux/usr/lib/arm-phytec-linux-gnueabi/go"
| GOTOOLDIR="/home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/x86_64-linux/usr/lib/arm-phytec-linux-gnueabi/go/pkg/tool/linux_amd64"
| CC="arm-phytec-linux-gnueabi-gcc"
| GOGCCFLAGS="-fPIC -marm -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build779208933=/tmp/go-build -gno-record-gcc-switches"
| CXX="arm-phytec-linux-gnueabi-g++"
| CGO_ENABLED="0"
| src/github.com/googleapis/gax-go/call_option.go:36:2: cannot find package "google.golang.org/grpc" in any of:
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/x86_64-linux/usr/lib/arm-phytec-linux-gnueabi/go/src/google.golang.org/grpc (from $GOROOT)
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/github.com-googleapis-gax-go/1.0-r0/github.com-googleapis-gax-go-1.0/src/google.golang.org/grpc (from $GOPATH)
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/phyboard-regor-am335x-1/usr/lib/arm-phytec-linux-gnueabi/go/src/google.golang.org/grpc
| src/github.com/googleapis/gax-go/call_option.go:37:2: cannot find package "google.golang.org/grpc/codes" in any of:
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/x86_64-linux/usr/lib/arm-phytec-linux-gnueabi/go/src/google.golang.org/grpc/codes (from $GOROOT)
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/github.com-googleapis-gax-go/1.0-r0/github.com-googleapis-gax-go-1.0/src/google.golang.org/grpc/codes (from $GOPATH)
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/phyboard-regor-am335x-1/usr/lib/arm-phytec-linux-gnueabi/go/src/google.golang.org/grpc/codes
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/github.com-googleapis-gax-go/1.0-r0/temp/log.do_compile.16416)
ERROR: Task 3908 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/go/github.com-googleapis-gax-go.bb, do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1089 tasks of which 1088 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
No currently running tasks (1088 of 3915)
Summary: 1 task failed:
/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/go/github.com-googleapis-gax-go.bb, do_compile
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
ok thats strange I will have to check that when I am at home.
Probably it compiled for me without DEPENDS then O_o
You could try adding
DEPENDS+="\
grpc-go \
"
to github.com-googleapis-gax-go
Based on the error above, this is what I attempted (naively).
I changed github.com-googleapis-gax-go.bb
by adding the following to the bottom of the file:
DEPENDS +="\
grpc-go \
"
Which resulted in the following error:
ERROR: Unbuildable tasks were found.
These are usually caused by circular dependencies and any circular dependency chains found will be printed below. Increase the debug level to see a list of unbuildable tasks.
Identifying dependency loops (this may take a short while)...
ERROR:
Dependency loop #1 found:
Task 2621 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/grpc-go/grpc-go.bb, do_packagedata) (dependent Tasks ['grpc-go.bb, do_package'])
Task 3913 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/go/github.com-googleapis-gax-go.bb, do_package) (dependent Tasks ['github.com-googleapis-gax-go.bb, do_install', 'gcc-runtime, do_packagedata', 'pseudo, do_populate_sysroot', 'glibc, do_packagedata', 'rpm, do_populate_sysroot', 'grpc-go.bb, do_packagedata'])
Task 3910 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/go/github.com-googleapis-gax-go.bb, do_packagedata) (dependent Tasks ['github.com-googleapis-gax-go.bb, do_package'])
Task 3846 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/go/cloud.google.com-go.bb, do_package) (dependent Tasks ['gcc-runtime, do_packagedata', 'golang.org-x-net.bb, do_packagedata', 'github.com-googleapis-gax-go.bb, do_packagedata', 'pseudo, do_populate_sysroot', 'glibc, do_packagedata', 'rpm, do_populate_sysroot', 'cloud.google.com-go.bb, do_install'])
Task 3843 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/go/cloud.google.com-go.bb, do_packagedata) (dependent Tasks ['cloud.google.com-go.bb, do_package'])
Task 3500 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/go/golang.org-x-oauth2.bb, do_package) (dependent Tasks ['gcc-runtime, do_packagedata', 'golang.org-x-oauth2.bb, do_install', 'golang.org-x-net.bb, do_packagedata', 'pseudo, do_populate_sysroot', 'glibc, do_packagedata', 'cloud.google.com-go.bb, do_packagedata', 'rpm, do_populate_sysroot'])
Task 3497 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/go/golang.org-x-oauth2.bb, do_packagedata) (dependent Tasks ['golang.org-x-oauth2.bb, do_package'])
Task 2624 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/grpc-go/grpc-go.bb, do_package) (dependent Tasks ['glibc, do_packagedata', 'golang.org-x-net.bb, do_packagedata', 'gcc-runtime, do_packagedata', 'pseudo, do_populate_sysroot', 'golang.org-x-oauth2.bb, do_packagedata', 'rpm, do_populate_sysroot', 'github.com-golang-protobuf.bb, do_packagedata', 'grpc-go.bb, do_install', 'github.com-golang-glog.bb, do_packagedata'])
Dependency loop #2 found:
Task 2615 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/grpc-go/grpc-go.bb, do_install) (dependent Tasks ['pseudo, do_populate_sysroot', 'grpc-go.bb, do_compile'])
Task 2616 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/grpc-go/grpc-go.bb, do_populate_sysroot) (dependent Tasks ['grpc-go.bb, do_install'])
Task 3907 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/go/github.com-googleapis-gax-go.bb, do_configure) (dependent Tasks ['glibc, do_populate_sysroot', 'gcc-cross, do_populate_sysroot', 'grpc-go.bb, do_populate_sysroot', 'go-cross, do_populate_sysroot', 'gcc-runtime, do_populate_sysroot', 'github.com-googleapis-gax-go.bb, do_patch'])
Task 3908 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/go/github.com-googleapis-gax-go.bb, do_compile) (dependent Tasks ['github.com-googleapis-gax-go.bb, do_configure'])
Task 3904 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/go/github.com-googleapis-gax-go.bb, do_install) (dependent Tasks ['pseudo, do_populate_sysroot', 'github.com-googleapis-gax-go.bb, do_compile'])
Task 3905 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/go/github.com-googleapis-gax-go.bb, do_populate_sysroot) (dependent Tasks ['github.com-googleapis-gax-go.bb, do_install'])
Task 3840 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/go/cloud.google.com-go.bb, do_configure) (dependent Tasks ['golang.org-x-net.bb, do_populate_sysroot', 'github.com-googleapis-gax-go.bb, do_populate_sysroot', 'glibc, do_populate_sysroot', 'gcc-cross, do_populate_sysroot', 'go-cross, do_populate_sysroot', 'cloud.google.com-go.bb, do_patch', 'gcc-runtime, do_populate_sysroot'])
Task 3841 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/go/cloud.google.com-go.bb, do_compile) (dependent Tasks ['cloud.google.com-go.bb, do_configure'])
Task 3837 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/go/cloud.google.com-go.bb, do_install) (dependent Tasks ['pseudo, do_populate_sysroot', 'cloud.google.com-go.bb, do_compile'])
Task 3838 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/go/cloud.google.com-go.bb, do_populate_sysroot) (dependent Tasks ['cloud.google.com-go.bb, do_install'])
Task 3494 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/go/golang.org-x-oauth2.bb, do_configure) (dependent Tasks ['golang.org-x-net.bb, do_populate_sysroot', 'golang.org-x-oauth2.bb, do_patch', 'glibc, do_populate_sysroot', 'gcc-cross, do_populate_sysroot', 'go-cross, do_populate_sysroot', 'gcc-runtime, do_populate_sysroot', 'cloud.google.com-go.bb, do_populate_sysroot'])
Task 3495 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/go/golang.org-x-oauth2.bb, do_compile) (dependent Tasks ['golang.org-x-oauth2.bb, do_configure'])
Task 3491 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/go/golang.org-x-oauth2.bb, do_install) (dependent Tasks ['pseudo, do_populate_sysroot', 'golang.org-x-oauth2.bb, do_compile'])
Task 3492 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/go/golang.org-x-oauth2.bb, do_populate_sysroot) (dependent Tasks ['golang.org-x-oauth2.bb, do_install'])
Task 2618 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/grpc-go/grpc-go.bb, do_configure) (dependent Tasks ['golang.org-x-net.bb, do_populate_sysroot', 'github.com-golang-protobuf.bb, do_populate_sysroot', 'golang.org-x-oauth2.bb, do_populate_sysroot', 'glibc, do_populate_sysroot', 'gcc-cross, do_populate_sysroot', 'grpc-go.bb, do_patch', 'github.com-golang-glog.bb, do_populate_sysroot', 'gcc-runtime, do_populate_sysroot'])
Task 2619 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/grpc-go/grpc-go.bb, do_compile) (dependent Tasks ['grpc-go.bb, do_configure'])
ERROR: Command execution failed: 1
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.
O_o What the f... why does this compile for me?
Copied the dev recipes and put a file for go 1.8.1 well, lets say ... telegraf build ...
Just need to check if it runs and then cleanup... probably there are dependencies missing sometimes. I also stumpled over the one you mentioned ... don't know if it is fixed now...
Nope I still haven't solved it. I'm struggling to find where the circular dependency actually is.
By the way. In go-grpc.bb
you have the following:
GO_INSTALL = "\
${GO_IMPORT}/grpc/codes/... \
${GO_IMPORT}/grpc/credentials/... \
${GO_IMPORT}/grpc/grpclog/... \
${GO_IMPORT}/grpc/internal/... \
${GO_IMPORT}/grpc/metadata/... \
${GO_IMPORT}/grpc/naming/... \
${GO_IMPORT}/grpc/peer/... \
${GO_IMPORT}/grpc/transport/... \
${GO_IMPORT}/genproto/googleapis/... \
${GO_IMPORT}/genproto/protobuf/... \
"
What do the trailing three dots (...) at the end of each line mean?
Add all directories recursively... just a dash means without subdirs
It also complains when there are no buildable go files. So you have to exclude directories which do not build or contain no go files.
Seems to run ...
Well no config so far I am afraid...
Thanks for your help so far @cyborg-x1 but I still can't see what is going on. I'm going to opt for the pre-compiled ARM binaries from the Influxdata website as I have other fish to fry right now.
Sure ... I will clean up what I have now and push it tomorrow or so. I have fixed some recipes - also the one for where you had issues. But I need to add go 1.8.1 - actually I do not want to just copy the devtool section of oe-meta-go completely.
if you want you can try one more: use this as oe-meta-go: https://github.com/cyborg-x1/oe-meta-go and the latest version of meta-influx
Okay I'll give it a try. Thanks very much for your help.
My word @cyborg-x1 , it worked!!! What did you change?
Nice...
probably it was this one https://github.com/C-X1/meta-influx/commit/5a983bf2f236fedce7e404ca991034feb8e8d113
there where some dependencies missing in there, for myself I do not fully understand why it build for me in the first place. What ever... the rest was updating to go with 1.8.1
Currently the docker is not docker it is "just" the api for building telegraf
Great.
I have 2 further questions:
InfluxDB has a lovely Godep file which tells you the exact state of its dependencies, but what about the sub-dependencies (and sub-sub-...) ? How do you know:
Well I guess you can use any of them, the thing is I actually wanted to update all of those packages to the latest revision. Unfortunately, when doing the recipes with my "automated" tool, I missed the fact that I still was using the revision given in the go file instead of the head which my tool gathered through checking out the repos. So most of the dependencies of telegraf are well at the state of the godep file.
I think normally there is only more functionality not less. That is also the reason why I had to use 1.8.1 because through me changing the tool to "head", it downloaded some to the latest revisions then...
And well of course those need 1.8.1 ... You know, I like bleeding edge tech ... (if it works :grin: )
The go guys seem to use the latest revision most of the times, or well it is just how I expect this go install command to work - where you just give it the repository ... and it does some "magic". But maybe I understood that wrong - do you have Go experience? :smile:
I actually have the idea to make another tool for python which updates all recipes of a directory to the latest revision (and maybe directly tries to compile them afterwards) ... Yeah I know, I am a bit crazy :stuck_out_tongue_winking_eye:
Unfortunately I don't have any Golang experience, but I'm learning FAST 😄.
About just using the latest commit of all dependencies: I'd strongly advise against doing that, regardless of the programming language. After all, InfluxDB didn't create a Godep file just for fun.
Cutting edge may be fine for testing out the latest functionality but when you're looking for reproducibility in a large scale production environment, just taking the head isn't the way to go. There must be a more reliable method than that.
@cyborg-x1 I realised I'd forgotten to include the influx layer in my local.conf
file so I hadn't actually compiled it 😞 . I'm trying again now and unfortunately I have to report the following error:
ERROR: github.com-googleapis-gax-go-1.0-r0 do_compile: Function failed: do_compile (log file is located at /home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/github.com-googleapis-gax-go/1.0-r0/temp/log.do_compile.551)
ERROR: Logfile of failure stored in: /home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/github.com-googleapis-gax-go/1.0-r0/temp/log.do_compile.551
Log data follows:
| DEBUG: Executing shell function do_compile
| GOARCH="arm"
| GOBIN=""
| GOEXE=""
| GOHOSTARCH="amd64"
| GOHOSTOS="linux"
| GOOS="linux"
| GOPATH="/home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/github.com-googleapis-gax-go/1.0-r0/github.com-googleapis-gax-go-1.0:/home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/phyboard-regor-am335x-1/usr/lib/arm-phytec-linux-gnueabi/go"
| GORACE=""
| GOROOT="/home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/x86_64-linux/usr/lib/arm-phytec-linux-gnueabi/go"
| GOTOOLDIR="/home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/x86_64-linux/usr/lib/arm-phytec-linux-gnueabi/go/pkg/tool/linux_amd64"
| GCCGO="gccgo"
| GOARM=""
| CC="arm-phytec-linux-gnueabi-gcc"
| GOGCCFLAGS="-march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a8 --sysroot=/home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/phyboard-regor-am335x-1 -fPIC -marm -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build753805505=/tmp/go-build -gno-record-gcc-switches"
| CXX="arm-phytec-linux-gnueabi-g++"
| CGO_ENABLED="0"
| PKG_CONFIG="pkg-config"
| CGO_CFLAGS="-march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a8 --sysroot=/home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/phyboard-regor-am335x-1 -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/github.com-googleapis-gax-go/1.0-r0=/usr/src/debug/github.com-googleapis-gax-go/1.0-r0 -fdebug-prefix-map=/home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/phyboard-regor-am335x-1="
| CGO_CPPFLAGS=""
| CGO_CXXFLAGS="-march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a8 --sysroot=/home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/phyboard-regor-am335x-1 -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/github.com-googleapis-gax-go/1.0-r0=/usr/src/debug/github.com-googleapis-gax-go/1.0-r0 -fdebug-prefix-map=/home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/phyboard-regor-am335x-1="
| CGO_FFLAGS="-g -O2"
| CGO_LDFLAGS="-march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a8 --sysroot=/home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/phyboard-regor-am335x-1 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
| src/google.golang.org/grpc/status/status.go:49:2: cannot find package "google.golang.org/genproto/googleapis/rpc/status" in any of:
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/x86_64-linux/usr/lib/arm-phytec-linux-gnueabi/go/src/google.golang.org/genproto/googleapis/rpc/status (from $GOROOT)
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/github.com-googleapis-gax-go/1.0-r0/github.com-googleapis-gax-go-1.0/src/google.golang.org/genproto/googleapis/rpc/status (from $GOPATH)
| /home/phyvm/yocto_builds_PD16.2.0/build/tmp/sysroots/phyboard-regor-am335x-1/usr/lib/arm-phytec-linux-gnueabi/go/src/google.golang.org/genproto/googleapis/rpc/status
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/phyvm/yocto_builds_PD16.2.0/build/tmp/work/cortexa8hf-neon-phytec-linux-gnueabi/github.com-googleapis-gax-go/1.0-r0/temp/log.do_compile.551)
ERROR: Task 3909 (/home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/go/github.com-googleapis-gax-go.bb, do_compile) failed with exit code '1'
Currently working on that .... well to be more precise on grpc-go, the root of this evil
try the latest one... I guess it should be working now
Unfortunately still not luck:
ERROR: ParseError at /home/phyvm/yocto_builds_PD16.2.0/sources/poky/../meta-influx/recipes-go/grpc-go/grpc-go.bb:5: Could not inherit file classes/go.bbclass
Never had this one, is the go layer not there? it says it does not find the go class of oe-meta-go. Have you tried cleaning the go stuff?
Indeed, I forgot to re-insert the oe-meta-go
layer in bblayers.conf
. Once I did that it all seems to have worked, with the following warnings:
WARNING: github.com-stretchr-testify-1.0-r0 do_populate_lic: github.com-stretchr-testify: No generic license file exists for: DWTFYW in any provider
WARNING: github.com-burntsushi-toml-1.0-r0 do_populate_lic: github.com-burntsushi-toml: No generic license file exists for: DWTFYW in any provider
WARNING: github.com-bmizerany-pat-1.0-r0 do_populate_lic: github.com-bmizerany-pat: No generic license file exists for: DWTFYW in any provider
WARNING: go-collectd.org-1.0-r0 do_populate_lic: go-collectd.org: No generic license file exists for: DWTFYW in any provider
WARNING: github.com-uber-go-zap-1.0-r0 do_package_qa: QA Issue: /usr/lib/arm-phytec-linux-gnueabi/go/src/github.com/uber-go/zap/check_license.sh contained in package github.com-uber-go-zap-staticdev requires /bin/bash, but no providers found in RDEPENDS_github.com-uber-go-zap-staticdev? [file-rdeps]
WARNING: github.com-influxdata-influxdb-1.0-r0 do_package_qa: QA Issue: /usr/lib/arm-phytec-linux-gnueabi/go/src/github.com/influxdata/influxdb/build.py contained in package github.com-influxdata-influxdb-staticdev requires /usr/bin/python2.7, but no providers found in RDEPENDS_github.com-influxdata-influxdb-staticdev? [file-rdeps]
This is truly wonderful news! Thanks a ton for your help.
You mentioned something earlier about the InfluxDB config file. I presume I'll have to manually create one?
At the moment yes. I have not tried if it works yet, btw. I also have a recipe for grafanas go stuff (backend) - but I am missing the front end stuff in nodeJS (did not have time yet)
Well I tried launching it and it runs, but if there are issues, I don't know. If you put a config, tell me if it worked for you ;-)
Yip, it works for me too. However for production purposes we're rather going to use the pre-compiled influxdb binaries from the influxdata website.
Okay, no problem
Hi @cyborg-x1
I'm currently trying to achieve the same goal, namely compiling influxdb under yocto 2.1.2 for arm. I'd really appreciate some feedback on how far you've got and whether you've achieved any level of success?
So far I've pretty much been following the instructions from here and my directory structure looks as follows:
However the dependencies are driving me insane!
Any help is greatly appreciated.