From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Geoff Levand <geoff@infradead.org>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] flannel riscv64 build failure
Date: Sun, 2 Jun 2024 11:42:38 +0200 [thread overview]
Message-ID: <Zlw-jsAvHNP_HO2g@landeda> (raw)
In-Reply-To: <f01af2e5-4683-47e2-86d9-737f07279724@infradead.org>
Geoff, All,
On 2024-06-02 16:28 +0900, Geoff Levand spake thusly:
> On 5/20/24 13:06, Thomas Petazzoni wrote:
> > riscv64 | flannel-0.25.1 | http://autobuild.buildroot.net/results/d2be77d8b9236db45c4f3a558f3198f199c0c568
> I posted about the riscv64 build failure to the flannel project, and one developer said
> it might be due to buildroot setting CGO_ENABLED=1 for the riscv64 build.
> The report is here:
> https://github.com/flannel-io/flannel/issues/1988
>
> I'm not sure if setting CGO_ENABLED=0 just for the flannel build will solve the problem,
> nor do I how to do that. Any help will be appreciated.
You may want to test something along the lines of:
diff --git a/package/flannel/flannel.mk b/package/flannel/flannel.mk
index 317ad14ba3..4279c5bb99 100644
--- a/package/flannel/flannel.mk
+++ b/package/flannel/flannel.mk
@@ -12,6 +12,14 @@ FLANNEL_LICENSE_FILES = LICENSE
FLANNEL_LDFLAGS = -X github.com/flannel-io/flannel/version.Version=$(FLANNEL_VERSION)
+# Upstream only supports CGO on x86_64 (aka amd64):
+# https://github.com/flannel-io/flannel/issues/1988#issuecomment-2141483747
+# https://github.com/flannel-io/flannel/blob/v0.25.1/Makefile#L11
+# So force it disabled for anything but x86_64, where we keep the default
+ifeq ($(BR2_x86_64),)
+FLANNEL_GO_ENV += CGO_ENABLED=0
+endif
+
# Install flannel to its well known location.
define FLANNEL_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/bin/flannel $(TARGET_DIR)/opt/bin/flanneld
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2024-06-02 9:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-02 7:28 [Buildroot] flannel riscv64 build failure Geoff Levand
2024-06-02 9:42 ` Yann E. MORIN [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zlw-jsAvHNP_HO2g@landeda \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=geoff@infradead.org \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox