Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Anisse Astier" <anisse@astier.eu>
To: "Baruch Siach" <baruch@tkos.co.il>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH RFC] package/go: disable cgo support with static libs
Date: Mon, 21 Nov 2022 23:42:43 +0100	[thread overview]
Message-ID: <0e155b6d-1710-49c4-abc1-89d4550c974c@app.fastmail.com> (raw)
In-Reply-To: <878rk4g6jz.fsf@tarshish>

Hi Baruch,

Lun 21 nov 2022, à 07:27, Baruch Siach via buildroot a écrit :
> Hi Anisse,
> 
> On Sun, Nov 20 2022, Anisse Astier wrote:
> > The go stdlib "plugin" package relies on dlfcn.h which isn't available
> > when we have BR2_STATIC_LIBS=y.
> >
> > This should fix this build error from autobuilders:
> >
> > /buildroot/i686-hostgo-fail/build/host-go-1.19.3/src/plugin/plugin_dlopen.go:11:10: fatal error: dlfcn.h: No such file or directory
> >    11 | #include <dlfcn.h>
> >
> > The more longterm approach would be to ask upstream for a build tag to
> > disable the plugin package, akin to the osusergo or netgo tags:
> >
> > https://github.com/golang/go/issues/23265
> >
> > While it would be quite simple, I don't think a buildroot patch for this
> > without upstream support would be ideal.
> 
> Your sign-off here is missing.
> 
> > ---
> >  package/go/go.mk | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/package/go/go.mk b/package/go/go.mk
> > index fd4caa2e5a..1c3cfa94d4 100644
> > --- a/package/go/go.mk
> > +++ b/package/go/go.mk
> > @@ -87,7 +87,7 @@ HOST_GO_TARGET_ENV = \
> >  # set, build in cgo support for any go programs that may need it.  Note that
> >  # any target package needing cgo support must include
> >  # 'depends on BR2_TOOLCHAIN_HAS_THREADS' in its config file.
> > -ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
> > +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS)$(BR2_STATIC_LIBS),yn)
> 
> This will not work as you intend. $(BR2_STATIC_LIBS) resolve to an empty
> string when BR2_STATIC_LIBS is not set. You want something like:
> 
> ifeq ($(BR2_TOOLCHAIN_HAS_THREADS):$(BR2_STATIC_LIBS),y:)
> 
> baruch
> 

Thanks for your review, this will be in v2.

Regards,

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

  reply	other threads:[~2022-11-21 22:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-20 18:19 [Buildroot] [PATCH RFC] package/go: disable cgo support with static libs Anisse Astier
2022-11-21  6:27 ` Baruch Siach via buildroot
2022-11-21 22:42   ` Anisse Astier [this message]
2022-11-21 21:17 ` Yann E. MORIN
2022-11-21 22:43   ` Anisse Astier

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=0e155b6d-1710-49c4-abc1-89d4550c974c@app.fastmail.com \
    --to=anisse@astier.eu \
    --cc=baruch@tkos.co.il \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox