All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: Arnout Vandecappelle <arnout@mind.be>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] package/pkg-golang.mk: add osusergo and netgo tags in static builds
Date: Wed, 16 Nov 2022 09:57:20 -0300	[thread overview]
Message-ID: <CAOMZO5CqhKB5nAeZW6jg888SPu7T3PbbqtmaOaAwmHgaAkPSLw@mail.gmail.com> (raw)
In-Reply-To: <20220918122239.189147-1-arnout@mind.be>

Hi Arnout,

On Sun, Sep 18, 2022 at 9:23 AM Arnout Vandecappelle <arnout@mind.be> wrote:
>
> CGO (the Go language C bindings) normally links dynamically with the C
> libraries. It seems that passing -extldflags=-static is not sufficient
> to make sure they link statically. As a result, a build using CGO will
> fail with
>
> runtime.gcdata: missing Go type information for global symbol .dynsym: size 72
>
> There are two modules in the standard Go library that can use CGO:
> os/user and net. Both of these have pure Go versions, however, which can
> be selected with the osusergo and netgo tags. Since these two are
> standard library modules that get used in almost all Go programs, pass
> those flags in the common infrastructure.
>
> It's not entirely clear if this is always the case or only depending on
> the specific way CGO is used. In the former case, we could instead
> disable CGO globally if static libs are enabled. However, it turns out
> that this doesn't solve the problem completely anyway (delve still fails
> to link, with different errors). Also, it is possible that other cgo
> modules do still work. Therefore, just stick to adding the osusergo and
> netgo tags.
>
> Fixes:
>  - crucible:
>    http://autobuild.buildroot.net/results/c2f/c2f29f55b461899e8e15c0494578304e6f74bf51/

I am still getting reports about crucible failure.

Do you plan to apply this patch?

Thanks
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2022-11-16 12:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-18 12:22 [Buildroot] [PATCH] package/pkg-golang.mk: add osusergo and netgo tags in static builds Arnout Vandecappelle
2022-09-18 12:23 ` Arnout Vandecappelle
2022-11-16 12:57 ` Fabio Estevam [this message]
2023-04-16 19:59 ` Yann E. MORIN
2023-04-23 10:32 ` Peter Korsgaard

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=CAOMZO5CqhKB5nAeZW6jg888SPu7T3PbbqtmaOaAwmHgaAkPSLw@mail.gmail.com \
    --to=festevam@gmail.com \
    --cc=arnout@mind.be \
    --cc=buildroot@buildroot.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.