-
Notifications
You must be signed in to change notification settings - Fork 719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
etcd: add recipe #616
etcd: add recipe #616
Conversation
This works ok, although there are some warnings:
I think someone with more expertise with the go bbclass and bb files could do a much better job with this then I did, but this is at least a working base. |
df46065
to
7497407
Compare
it fails to build on yocto Autobuilders see https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2064/steps/14/logs/stdio
|
Darn, I see this in our CI as well, but not when I just build normally. I'm thinking it may be related to the container env that our CI is running in. Still digging, I fired up the docker container that our build uses but it worked in there as well. I see some bugs that indicate something like "export GOPROXY=direct" may be needed but that's tough to inject into the etcd build env. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please look at network fetching issues.
I found a pretty lengthy discussion on this issue up at https://lists.openembedded.org/g/openembedded-core/topic/89464905#162517. It's not clear what the resolution was to this so for now I'm just going to add the original workaround in that discussion to the new etcd recipe. |
@kraj I sort of forgot about this PR. I did try and address your request on the network issue. Was my solution ok or was there a better way to do it? |
I dont know why I did not pick it up. Perhaps it failed elsewhere but I did not update the comments here. I have cherry-picked it for master-next and lets see what happens |
here is latest build failure - https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2594/steps/14/logs/stdio |
Wow, that's a lot of output. I think this is the error:
Which doesn't mean a whole lot to me. Certainly looks a lot like cespare/xxhash#54. So I'll see if I can figure out how to get that fix in. |
Yeah, fix went into v2.1.2 of xxhash and the compile error shows us using 2.1.1. Let me see if moving to the latest released etcd fixes this up. |
its better but still seeing something like below on arm64 ( rpi4-64bit ) builds
|
That latest failure is a bit confounding. Is there a way to recreate that issue without a "bitbake world"? The error seems to indicate that with rpi4-64bit, the command to strip out debug symbols from the generated binaries isn't working. I could hack a |
yeah this could be a generic issues with go binaries, I am not sure or perhaps something in compiler options that etcd is using to build itself. |
Yeah, some internet searching shows multiple issues over the years with go and stripping, although nothing concrete other then it seems to work in some situations and not others. Not stripping adds 9MB in size to the etcd app which is pretty negligible on the multi-GB emmc embedded systems we plan to put this on. So, for now lets just prevent the stripping. |
still fails https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2670/steps/15/logs/stdio |
Sigh...something different this time. Gobin? I'll dig in. Also, if there's an easy way to recreate what CI does, that would be great. I can't recreate any of the failures being seen by it when just building for my AST2600 OpenBMC image.
|
@kraj could you try submitting this one again? I've spent the last day looking at the error, and trying to recreate it but it really kind of looks like a CI machine issue with it's certificate:
That github repo is fine and a clone of it works fine manually. |
@kraj could you try submitting again to CI? I'm wondering if I should try putting this on the mailing list to see if anyone with more go expertise could look things over for me (I know next to nothing about go)? We are looking to use this etcd recipe (along with the work in #679) to start prototyping a yocto based distributed BMC design. |
Investigating the potential use of etcd within an OpenBMC distribution to manage data sharing and leader election in a multi-BMC system. Start off with a basic recipe to build the package. Signed-off-by: Andrew Geissler <[email protected]>
Fixes: | # github.com/cespare/xxhash/v2 | asm: xxhash_amd64.s:120: when dynamic linking, R15 is clobbered by a global | variable access and is used here: | 00092 (/home/pokybuild/yocto-worker/meta-oe/cespare/xxhash/[email protected]/xxhash_amd64.s:120) ADDQ R15, AX | asm: assembly failed Upstream-Status: Backport [etcd-io/etcd@f0f77fc] Limited PR with just this patch submitted via this PR: etcd-io/etcd#15556 Signed-off-by: Andrew Geissler <[email protected]>
queued for tonight's build. |
still fails on Yocto Autobuilders - https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2708/steps/15/logs/stdio |
Thanks @kraj , sorry this such a pain. I don't understand why CI sees this certificate issue but I can't recreate it. I'll probably have to try the mailing list to see if anyone has any thoughts.
The only reference to gobin I see is in
|
I also tried a build with --- a/meta-oe/recipes-extended/etcd/etcd_3.5.7.bb
+++ b/meta-oe/recipes-extended/etcd/etcd_3.5.7.bb
@@ -19,7 +19,7 @@ RDEPENDS:${PN}-dev = " \
bash \
"
-export GO111MODULE="on"
+export GO111MODULE="off"
inherit go but that does not work either. Downloads should not happen after |
Ahh, that's a good point on the network access during build. I see out in the etcd repo, they go look for this gobin repo as a part of the build process at https://github.com/etcd-io/etcd/blob/release-3.5/scripts/test_lib.sh#L308. I'll see if I can figure something out. Maybe it's as easy as just installing gobin in our do_fetch step. |
This tool is installed as a part of the build process (build.sh sources test_lib.sh) This tool has been removed in the latest etcd main branch. Installing it as a part of the build process breaks bitbake (it doesn't allow downloading of packages once in the build steps). This tool is not needed to build etcd (it appears to be used for some optional test cases). The following upstream commit removes the use of gobin in the main branch, but it's not clear to me if the alternative of just running "go install" will fix this issue. Fundamentally etcd allows package install during build and bitbake does not: etcd-io/etcd@900fc8d Upstream-Status: Inappropriate Signed-off-by: Andrew Geissler <[email protected]>
Turns out the gobin install during the build isn't even needed. I verified etcd has removed the use of gobin (an archived repo) in the main branch upstream. So I just added a patch that removes it in my latest push here. |
makes sense, I have picked it up for next round again. |
@geissonator thanks for sticking with me. Finally this PR is merged at 4cd2006 |
Ahh, great, thanks for all the help @kraj! |
@geissonator It fails in do_install when multilib is enabled and libdir is e.g. /usr/lib64:
Why do we need these binaries in both libdir and bindir? Using libdir instead of hardcoding /usr/lib/ in do_install:append should fix this. The error from ls is unrelated, just side-effect of "bad" check for ${B}/${GO_BUILD_BINDIR}/ content in https://git.openembedded.org/openembedded-core/tree/meta/classes-recipe/go.bbclass#n135 |
* I don't know anything about etcd including why we need these binaries duplicated in libdir and bindir, but use ${libdir} instead of hardcoded /usr/lib to fix do_install with multilib enabled when libdir is /usr/lib64 and it was failing with: DEBUG: Executing shell function do_install ls: cannot access 'etcd/3.5.7-r0/build/bin/linux_arm64/': No such file or directory install: cannot stat 'etcd/3.5.7-r0/image/usr/lib/go/src/go.etcd.io/etcd/v3/bin/etcd': No such file or directory WARNING: exit code 1 from a shell command. * the error from ls is unrelated, fixed in: https://lists.openembedded.org/g/openembedded-core/message/181269 * also reported on github: openembedded#616 Signed-off-by: Martin Jansa <[email protected]> Signed-off-by: Khem Raj <[email protected]>
Thanks @shr-project this patch looks ok |
* I don't know anything about etcd including why we need these binaries duplicated in libdir and bindir, but use ${libdir} instead of hardcoded /usr/lib to fix do_install with multilib enabled when libdir is /usr/lib64 and it was failing with: DEBUG: Executing shell function do_install ls: cannot access 'etcd/3.5.7-r0/build/bin/linux_arm64/': No such file or directory install: cannot stat 'etcd/3.5.7-r0/image/usr/lib/go/src/go.etcd.io/etcd/v3/bin/etcd': No such file or directory WARNING: exit code 1 from a shell command. * the error from ls is unrelated, fixed in: https://lists.openembedded.org/g/openembedded-core/message/181269 * also reported on github: openembedded/meta-openembedded#616 Signed-off-by: Martin Jansa <[email protected]> Signed-off-by: Khem Raj <[email protected]>
Investigating the potential use of etcd within an OpenBMC distribution to manage data sharing and leader election in a multi-BMC system. Start off with a basic recipe to build the package.
Signed-off-by: Andrew Geissler [email protected]