All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Anisse Astier <anisse@astier.eu>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2] package/go: disable cgo support with static libs
Date: Tue, 22 Nov 2022 18:21:55 +0100	[thread overview]
Message-ID: <20221122172155.GA3859771@scaer> (raw)
In-Reply-To: <20221121224955.951056-1-anisse@astier.eu>

Anisse, All,

On 2022-11-21 23:49 +0100, Anisse Astier spake thusly:
> 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/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>
> 
> Signed-off-by: Anisse Astier <anisse@astier.eu>
> ---
>  package/go/Config.in.host | 1 +
>  package/go/go.mk          | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/package/go/Config.in.host b/package/go/Config.in.host
> index ded02d3b3a..9e79a7dfd5 100644
> --- a/package/go/Config.in.host
> +++ b/package/go/Config.in.host
> @@ -23,6 +23,7 @@ config BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
>  	# Go doesn't support CGO linking on MIPS64x platforms
>  	# See: https://github.com/karalabe/xgo/issues/46
>  	depends on !BR2_mips64 && !BR2_mips64el
> +	depends on !BR2_STATIC_LIBS

Why don't we move the dependency on threads to this symbol, and...

>  # Host go packages should depend on BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS
>  config BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS
> diff --git a/package/go/go.mk b/package/go/go.mk
> index fd4caa2e5a..d54be8cd78 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),y:)

... then this condition would be just:
    ifeq ($(BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS),y)

I am not fond of the current situation, where parts of the conditions
are in Config.in, and the rest in go.mk.

Regards,
Yann E. MORIN.

>  HOST_GO_CGO_ENABLED = 1
>  else
>  HOST_GO_CGO_ENABLED = 0
> -- 
> 2.38.1
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  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

      parent reply	other threads:[~2022-11-22 17:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 22:49 [Buildroot] [PATCH v2] package/go: disable cgo support with static libs Anisse Astier
2022-11-22  6:36 ` Christian Stewart via buildroot
2022-11-22 17:21 ` 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=20221122172155.GA3859771@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=anisse@astier.eu \
    --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.