* [Buildroot] [PATCH 1/7] package/skopeo: add missing dependency on host go arch support
2024-08-01 8:45 [Buildroot] [PATCH 0/7] package/go: handle CGO linking for the host yann.morin
@ 2024-08-01 8:45 ` yann.morin
2024-08-19 21:33 ` Thomas Petazzoni via buildroot
2024-08-01 8:45 ` [Buildroot] [PATCH 2/7] package/go: expose host CGO linking support yann.morin
` (6 subsequent siblings)
7 siblings, 1 reply; 11+ messages in thread
From: yann.morin @ 2024-08-01 8:45 UTC (permalink / raw)
To: buildroot; +Cc: yann.morin
From: "Yann E. MORIN" <yann.morin@orange.com>
Fixes: 619b83a4438667cdb4cc8a7dddc79dbf6d84ec2a
Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
---
package/skopeo/Config.in.host | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/skopeo/Config.in.host b/package/skopeo/Config.in.host
index 4a63a0829c..b3a1c155f7 100644
--- a/package/skopeo/Config.in.host
+++ b/package/skopeo/Config.in.host
@@ -1,5 +1,6 @@
config BR2_PACKAGE_HOST_SKOPEO
bool "host skopeo"
+ depends on BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS
help
skopeo is a command line utility that performs various
operations on container images and image repositories.
--
2.34.1
____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 2/7] package/go: expose host CGO linking support
2024-08-01 8:45 [Buildroot] [PATCH 0/7] package/go: handle CGO linking for the host yann.morin
2024-08-01 8:45 ` [Buildroot] [PATCH 1/7] package/skopeo: add missing dependency on host go arch support yann.morin
@ 2024-08-01 8:45 ` yann.morin
2024-09-03 20:44 ` Arnout Vandecappelle via buildroot
2024-08-01 8:45 ` [Buildroot] [PATCH 3/7] package/delve: needs CGO linking for host yann.morin
` (5 subsequent siblings)
7 siblings, 1 reply; 11+ messages in thread
From: yann.morin @ 2024-08-01 8:45 UTC (permalink / raw)
To: buildroot; +Cc: yann.morin, Thomas Perale, Christian Stewart, Anisse Astier
From: "Yann E. MORIN" <yann.morin@orange.com>
Even when configured for cross-compilation, the go compiler is always
able to build natively as well, and this is was we use in Buildroot to
build host go packages. This implies that when the target has
limitations, those limitations thus also apply to the host builds.
This means that, when there is no CGO linking support for the target,
the compiler is built without CGO linking support, and thus CGO linking
is also not available for the host builds.
Of course, when there is no go support for the target, the CGO linking
support only depends on the host architecture.
Add a new Kconfig symbol that repesent whether CGO linking is available
for the host; host packages can then depend on that symbol, like the
target variants do on the corresponding target symbol.
Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Cc: Thomas Perale <thomas.perale@mind.be>
Cc: Christian Stewart <christian@aperture.us>
Cc: Anisse Astier <anisse@astier.eu>
---
docs/manual/adding-packages-golang.adoc | 3 ++-
package/go/Config.in.host | 12 ++++++++++++
package/go/go.mk | 7 ++++---
3 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/docs/manual/adding-packages-golang.adoc b/docs/manual/adding-packages-golang.adoc
index 3ddbe57afe..aa25426591 100644
--- a/docs/manual/adding-packages-golang.adoc
+++ b/docs/manual/adding-packages-golang.adoc
@@ -49,7 +49,8 @@ infrastructure should depend on +BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS+
because Buildroot will automatically add a dependency on +host-go+
to such packages.
If you need CGO support in your package, you must add a dependency on
-+BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS+.
++BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS+; for host packages,
+add a dependency on +BR2_PACKAGE_HOST_GO_HOST_CGO_LINKING_SUPPORTS+.
The main macro of the Go package infrastructure is
+golang-package+. It is similar to the +generic-package+ macro. The
diff --git a/package/go/Config.in.host b/package/go/Config.in.host
index 11ce6df369..eefca03b02 100644
--- a/package/go/Config.in.host
+++ b/package/go/Config.in.host
@@ -36,6 +36,18 @@ config BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS
default y
depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE3_ARCH_SUPPORTS
+# CGO linking for the host. Since we use the same compiler for target
+# and host, if the target can't do CGO linking, then the host can't.
+# But if the target is not supported by Go, then the host can do CGO
+# linking (except when it itself does not support CGO linking).
+config BR2_PACKAGE_HOST_GO_HOST_CGO_LINKING_SUPPORTS
+ bool
+ default y if BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
+ default y if !BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
+ depends on BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS
+ depends on BR2_HOSTARCH != "mips64"
+ depends on BR2_HOSTARCH != "mips64el"
+
# Go packages should select BR2_PACKAGE_HOST_GO
config BR2_PACKAGE_HOST_GO
bool
diff --git a/package/go/go.mk b/package/go/go.mk
index 660c7a9bad..7e0dfc5880 100644
--- a/package/go/go.mk
+++ b/package/go/go.mk
@@ -91,10 +91,11 @@ else
HOST_GO_CGO_ENABLED = 0
endif
else # !BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
-# If the target arch does not support go, host-go can still be used to build
-# packages for the host, and enable cgo. No need to set all the arch stuff
-#since we will not be cross-compiling.
+ifeq ($(BR2_PACKAGE_HOST_GO_HOST_CGO_LINKING_SUPPORTS),y)
HOST_GO_CGO_ENABLED = 1
+else # !BR2_PACKAGE_HOST_GO_HOST_CGO_LINKING_SUPPORTS
+HOST_GO_CGO_ENABLED = 0
+endif # BR2_PACKAGE_HOST_GO_HOST_CGO_LINKING_SUPPORTS
endif # BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
# Ensure the toolchain is available, whatever the provider
HOST_GO_DEPENDENCIES += $(HOST_GO_DEPENDENCIES_CGO)
--
2.34.1
____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 3/7] package/delve: needs CGO linking for host
2024-08-01 8:45 [Buildroot] [PATCH 0/7] package/go: handle CGO linking for the host yann.morin
2024-08-01 8:45 ` [Buildroot] [PATCH 1/7] package/skopeo: add missing dependency on host go arch support yann.morin
2024-08-01 8:45 ` [Buildroot] [PATCH 2/7] package/go: expose host CGO linking support yann.morin
@ 2024-08-01 8:45 ` yann.morin
2024-08-01 8:45 ` [Buildroot] [PATCH 4/7] package/moby-buildkit: " yann.morin
` (4 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: yann.morin @ 2024-08-01 8:45 UTC (permalink / raw)
To: buildroot; +Cc: yann.morin, Christian Stewart
From: "Yann E. MORIN" <yann.morin@orange.com>
The target variant depends on CGO linking, so propagate it to the host
variant as well.
Fixes: http://autobuild.buildroot.org/results/530/530e95c3b1f8dd0494075735a401be89e0cb9938/
Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Cc: Christian Stewart <christian@aperture.us>
---
package/delve/Config.in.host | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/delve/Config.in.host b/package/delve/Config.in.host
index 0938ab0659..305198f1ab 100644
--- a/package/delve/Config.in.host
+++ b/package/delve/Config.in.host
@@ -1,6 +1,7 @@
config BR2_PACKAGE_HOST_DELVE
bool "host delve"
depends on BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS
+ depends on BR2_PACKAGE_HOST_GO_HOST_CGO_LINKING_SUPPORTS
select BR2_PACKAGE_HOST_GO
help
Delve is a debugger for the Go programming language.
--
2.34.1
____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 0/7] package/go: handle CGO linking for the host
@ 2024-08-01 8:45 yann.morin
2024-08-01 8:45 ` [Buildroot] [PATCH 1/7] package/skopeo: add missing dependency on host go arch support yann.morin
` (7 more replies)
0 siblings, 8 replies; 11+ messages in thread
From: yann.morin @ 2024-08-01 8:45 UTC (permalink / raw)
To: buildroot; +Cc: Yann E . MORIN, Anisse Astier, Christian Stewart, Thomas Perale
From: "Yann E. MORIN" <yann.morin@orange.com>
Hello All!
This series adds the necessary pieces to expose whether the go compiler
has CGO linking support for the host.
The overall issue with the go compiler, is that we have a single one
that can build for the target *and* for the host. Any limitation due to
the target thus leak to the host. This is notably the case for CGO
linking.
This series fixes that by adding a Kconfig symbol that represents
whether CGO linking for the host is available. Then, it goes on to fix a
few existing packages to add the new dependency.
Host variants of target packages that need CGO linking were found with:
$ git grep -l BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS \
|while read f; do
[ -e "${f}.host" ] && echo "${f}"
done
Which returns a rather short list:
package/delve/Config.in
package/moby-buildkit/Config.in
package/runc/Config.in
And thus they are all three fixed.
There are only two host-only packages:
$ git grep -l host-golang-package package/*/'**'.mk \
|while read f; do
grep -q -E '\(golang' "${f}" || echo "${f}"
done
package/mender-artifact/mender-artifact.mk
package/skopeo/skopeo.mk
Skopeo is fixed in this series, as this is what prompted this work; so
it leaves mender-artifact to check. I have no idea how to check whether
a package needs CGO linking, though, so this is left as an exercise for
any interested party... This is however rather theoretical, as the only
hosts that do not support CGO linking (based on the target conditions)
would be mips64 or mips64el hosts, and it is very doubtful Buildroot
ever ran, runs, or will ever run on such hosts [0]; static-only or
thread-less hosts are also not widely deployed either...
[0] git grep -E 'HOSTARCH.*mips64' returns nothing before this series,
so we have no special condition for running on mips64, which is a
bit surprising...
Regards,
Yann E. MORIN.
The following changes since commit e321e81cf921346ec2d4cd1a9439016c7b2d3fb5
configs/beaglebone: bump Linux to 6.6.32-ti-rt-arm32-r7 and U-Boot to 2024.07 (2024-07-30 23:44:30 +0200)
are available as patches in this mail series,
for you to apply patches up to 5cb88f8337a63230f90e02423005ba169e307549
package/skopeo: bump version (2024-08-01 10:36:24 +0200)
----------------------------------------------------------------
Yann E. MORIN (7):
package/skopeo: add missing dependency on host go arch support
package/go: expose host CGO linking support
package/delve: needs CGO linking for host
package/moby-buildkit: needs CGO linking for host
package/runc: needs CGO linking for host
package/skopeo: needs CGO linking for host
package/skopeo: bump version
docs/manual/adding-packages-golang.adoc | 3 ++-
package/delve/Config.in.host | 1 +
package/go/Config.in.host | 12 ++++++++++++
package/go/go.mk | 7 ++++---
package/moby-buildkit/Config.in.host | 1 +
package/runc/Config.in.host | 1 +
package/skopeo/Config.in.host | 2 ++
package/skopeo/skopeo.hash | 2 +-
package/skopeo/skopeo.mk | 2 +-
9 files changed, 25 insertions(+), 6 deletions(-)
--
____________
.-----------------.--------------------: _ :------------------.
| Yann E. MORIN | Real-Time Embedded | __/ ) | /"\ ASCII RIBBON |
| | Software Designer | _/ - /' | \ / CAMPAIGN |
| +33 638.411.245 '--------------------: (_ `--, | X AGAINST |
| yann.morin (at) orange.com |_=" ,--' | / \ HTML MAIL |
'--------------------------------------:______/_____:------------------'
____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 4/7] package/moby-buildkit: needs CGO linking for host
2024-08-01 8:45 [Buildroot] [PATCH 0/7] package/go: handle CGO linking for the host yann.morin
` (2 preceding siblings ...)
2024-08-01 8:45 ` [Buildroot] [PATCH 3/7] package/delve: needs CGO linking for host yann.morin
@ 2024-08-01 8:45 ` yann.morin
2024-08-01 8:45 ` [Buildroot] [PATCH 5/7] package/runc: " yann.morin
` (3 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: yann.morin @ 2024-08-01 8:45 UTC (permalink / raw)
To: buildroot; +Cc: yann.morin, Christian Stewart
From: "Yann E. MORIN" <yann.morin@orange.com>
The target variant depends on CGO linking, so propagate it to the host
variant as well.
Fixes: http://autobuild.buildroot.org/results/d6d/d6d6747541b7de8b04598c4c9181693e015ccf44/
Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Cc: Christian Stewart <christian@aperture.us>
---
package/moby-buildkit/Config.in.host | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/moby-buildkit/Config.in.host b/package/moby-buildkit/Config.in.host
index d4eb0d74c3..f0d36f37a1 100644
--- a/package/moby-buildkit/Config.in.host
+++ b/package/moby-buildkit/Config.in.host
@@ -1,6 +1,7 @@
config BR2_PACKAGE_HOST_MOBY_BUILDKIT
bool "host moby-buildkit"
depends on BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS
+ depends on BR2_PACKAGE_HOST_GO_HOST_CGO_LINKING_SUPPORTS
select BR2_PACKAGE_HOST_GO
help
BuildKit is a toolkit for converting source code to build
--
2.34.1
____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 5/7] package/runc: needs CGO linking for host
2024-08-01 8:45 [Buildroot] [PATCH 0/7] package/go: handle CGO linking for the host yann.morin
` (3 preceding siblings ...)
2024-08-01 8:45 ` [Buildroot] [PATCH 4/7] package/moby-buildkit: " yann.morin
@ 2024-08-01 8:45 ` yann.morin
2024-08-01 8:45 ` [Buildroot] [PATCH 6/7] package/skopeo: " yann.morin
` (2 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: yann.morin @ 2024-08-01 8:45 UTC (permalink / raw)
To: buildroot; +Cc: yann.morin, Christian Stewart
From: "Yann E. MORIN" <yann.morin@orange.com>
The target variant depends on CGO linking, so propagate it to the host
variant as well.
Fixes: http://autobuild.buildroot.org/results/30b/30b81b6f84613296b9e1f162e5ddd7f25b89ba23/
Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Cc: Christian Stewart <christian@aperture.us>
---
package/runc/Config.in.host | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/runc/Config.in.host b/package/runc/Config.in.host
index 78193cb499..96b05d0a1f 100644
--- a/package/runc/Config.in.host
+++ b/package/runc/Config.in.host
@@ -1,6 +1,7 @@
config BR2_PACKAGE_HOST_RUNC
bool "host runc"
depends on BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS
+ depends on BR2_PACKAGE_HOST_GO_HOST_CGO_LINKING_SUPPORTS
select BR2_PACKAGE_HOST_GO
help
runC is a CLI tool for spawning and running containers
--
2.34.1
____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 6/7] package/skopeo: needs CGO linking for host
2024-08-01 8:45 [Buildroot] [PATCH 0/7] package/go: handle CGO linking for the host yann.morin
` (4 preceding siblings ...)
2024-08-01 8:45 ` [Buildroot] [PATCH 5/7] package/runc: " yann.morin
@ 2024-08-01 8:45 ` yann.morin
2024-08-01 8:45 ` [Buildroot] [PATCH 7/7] package/skopeo: bump version yann.morin
2024-09-03 21:15 ` [Buildroot] [PATCH 0/7] package/go: handle CGO linking for the host Arnout Vandecappelle via buildroot
7 siblings, 0 replies; 11+ messages in thread
From: yann.morin @ 2024-08-01 8:45 UTC (permalink / raw)
To: buildroot; +Cc: yann.morin
From: "Yann E. MORIN" <yann.morin@orange.com>
Fixes: http://autobuild.buildroot.org/results/35e/35ec43c0970f001e422d0b2ca6f8319deea2cde4/
Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
---
package/skopeo/Config.in.host | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/skopeo/Config.in.host b/package/skopeo/Config.in.host
index b3a1c155f7..334a12b6fc 100644
--- a/package/skopeo/Config.in.host
+++ b/package/skopeo/Config.in.host
@@ -1,6 +1,7 @@
config BR2_PACKAGE_HOST_SKOPEO
bool "host skopeo"
depends on BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS
+ depends on BR2_PACKAGE_HOST_GO_HOST_CGO_LINKING_SUPPORTS
help
skopeo is a command line utility that performs various
operations on container images and image repositories.
--
2.34.1
____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 7/7] package/skopeo: bump version
2024-08-01 8:45 [Buildroot] [PATCH 0/7] package/go: handle CGO linking for the host yann.morin
` (5 preceding siblings ...)
2024-08-01 8:45 ` [Buildroot] [PATCH 6/7] package/skopeo: " yann.morin
@ 2024-08-01 8:45 ` yann.morin
2024-09-03 21:15 ` [Buildroot] [PATCH 0/7] package/go: handle CGO linking for the host Arnout Vandecappelle via buildroot
7 siblings, 0 replies; 11+ messages in thread
From: yann.morin @ 2024-08-01 8:45 UTC (permalink / raw)
To: buildroot; +Cc: yann.morin
From: "Yann E. MORIN" <yann.morin@orange.com>
Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
---
package/skopeo/skopeo.hash | 2 +-
package/skopeo/skopeo.mk | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/skopeo/skopeo.hash b/package/skopeo/skopeo.hash
index d40585d52f..ee42f18b80 100644
--- a/package/skopeo/skopeo.hash
+++ b/package/skopeo/skopeo.hash
@@ -1,3 +1,3 @@
# Locally calculated
-sha256 0b788fc5725ac79327f7c29797821a2bafc1c3c87bbfcb2998c2a1be949e314d skopeo-1.13.3-go2.tar.gz
+sha256 fed91fd067605460ef33431163227471b1e85c8768203fc393345d6ffd645448 skopeo-1.16.0-go2.tar.gz
sha256 716a8b80635c394681e652823e1e42e411ad2d254e1f202403422d74f4b0b106 LICENSE
diff --git a/package/skopeo/skopeo.mk b/package/skopeo/skopeo.mk
index 58631629b3..f09009d88c 100644
--- a/package/skopeo/skopeo.mk
+++ b/package/skopeo/skopeo.mk
@@ -4,7 +4,7 @@
#
################################################################################
-SKOPEO_VERSION = 1.13.3
+SKOPEO_VERSION = 1.16.0
SKOPEO_SITE = $(call github,containers,skopeo,v$(SKOPEO_VERSION))
SKOPEO_LICENSE = Apache-2.0
--
2.34.1
____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [Buildroot] [PATCH 1/7] package/skopeo: add missing dependency on host go arch support
2024-08-01 8:45 ` [Buildroot] [PATCH 1/7] package/skopeo: add missing dependency on host go arch support yann.morin
@ 2024-08-19 21:33 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-08-19 21:33 UTC (permalink / raw)
To: yann.morin; +Cc: buildroot
On Thu, 1 Aug 2024 10:45:45 +0200
<yann.morin@orange.com> wrote:
> From: "Yann E. MORIN" <yann.morin@orange.com>
>
> Fixes: 619b83a4438667cdb4cc8a7dddc79dbf6d84ec2a
>
> Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
> ---
> package/skopeo/Config.in.host | 1 +
> 1 file changed, 1 insertion(+)
Applied to master after adding a reference to an autobuilder failure
fixed by this patch. Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Buildroot] [PATCH 2/7] package/go: expose host CGO linking support
2024-08-01 8:45 ` [Buildroot] [PATCH 2/7] package/go: expose host CGO linking support yann.morin
@ 2024-09-03 20:44 ` Arnout Vandecappelle via buildroot
0 siblings, 0 replies; 11+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2024-09-03 20:44 UTC (permalink / raw)
To: yann.morin, buildroot; +Cc: Thomas Perale, Christian Stewart, Anisse Astier
On 01/08/2024 10:45, yann.morin@orange.com wrote:
> From: "Yann E. MORIN" <yann.morin@orange.com>
>
> Even when configured for cross-compilation, the go compiler is always
> able to build natively as well, and this is was we use in Buildroot to
> build host go packages. This implies that when the target has
> limitations, those limitations thus also apply to the host builds.
>
> This means that, when there is no CGO linking support for the target,
> the compiler is built without CGO linking support, and thus CGO linking
> is also not available for the host builds.
>
> Of course, when there is no go support for the target, the CGO linking
> support only depends on the host architecture.
>
> Add a new Kconfig symbol that repesent whether CGO linking is available
> for the host; host packages can then depend on that symbol, like the
> target variants do on the corresponding target symbol.
>
> Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
> Cc: Thomas Perale <thomas.perale@mind.be>
> Cc: Christian Stewart <christian@aperture.us>
> Cc: Anisse Astier <anisse@astier.eu>
> ---
> docs/manual/adding-packages-golang.adoc | 3 ++-
> package/go/Config.in.host | 12 ++++++++++++
> package/go/go.mk | 7 ++++---
> 3 files changed, 18 insertions(+), 4 deletions(-)
>
> diff --git a/docs/manual/adding-packages-golang.adoc b/docs/manual/adding-packages-golang.adoc
> index 3ddbe57afe..aa25426591 100644
> --- a/docs/manual/adding-packages-golang.adoc
> +++ b/docs/manual/adding-packages-golang.adoc
> @@ -49,7 +49,8 @@ infrastructure should depend on +BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS+
> because Buildroot will automatically add a dependency on +host-go+
> to such packages.
> If you need CGO support in your package, you must add a dependency on
> -+BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS+.
> ++BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS+; for host packages,
> +add a dependency on +BR2_PACKAGE_HOST_GO_HOST_CGO_LINKING_SUPPORTS+.
>
> The main macro of the Go package infrastructure is
> +golang-package+. It is similar to the +generic-package+ macro. The
> diff --git a/package/go/Config.in.host b/package/go/Config.in.host
> index 11ce6df369..eefca03b02 100644
> --- a/package/go/Config.in.host
> +++ b/package/go/Config.in.host
> @@ -36,6 +36,18 @@ config BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS
> default y
> depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE3_ARCH_SUPPORTS
>
> +# CGO linking for the host. Since we use the same compiler for target
> +# and host, if the target can't do CGO linking, then the host can't.
> +# But if the target is not supported by Go, then the host can do CGO
> +# linking (except when it itself does not support CGO linking).
> +config BR2_PACKAGE_HOST_GO_HOST_CGO_LINKING_SUPPORTS
> + bool
> + default y if BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
> + default y if !BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
> + depends on BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS
> + depends on BR2_HOSTARCH != "mips64"
> + depends on BR2_HOSTARCH != "mips64el"
> +
> # Go packages should select BR2_PACKAGE_HOST_GO
> config BR2_PACKAGE_HOST_GO
> bool
> diff --git a/package/go/go.mk b/package/go/go.mk
> index 660c7a9bad..7e0dfc5880 100644
> --- a/package/go/go.mk
> +++ b/package/go/go.mk
> @@ -91,10 +91,11 @@ else
> HOST_GO_CGO_ENABLED = 0
> endif
> else # !BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
> -# If the target arch does not support go, host-go can still be used to build
> -# packages for the host, and enable cgo. No need to set all the arch stuff
> -#since we will not be cross-compiling.
> +ifeq ($(BR2_PACKAGE_HOST_GO_HOST_CGO_LINKING_SUPPORTS),y)
> HOST_GO_CGO_ENABLED = 1
> +else # !BR2_PACKAGE_HOST_GO_HOST_CGO_LINKING_SUPPORTS
> +HOST_GO_CGO_ENABLED = 0
There is still a weird situation here: if the host is mips64, then it's
possible that the host builds do _not_ support CGO, but target builds don't -
and we still pass CGO_ENABLED=1 for host builds. Of course, host packages that
rely on CGO should be excluded already in Config.in.host, but what if CGO is
optional?
My first intuition was that we should have a separate HOST_GO_HOST_CGO_ENABLED
for host builds, but the problem still exists for the go-src package itself,
since it has host and target in a single build. In fact, what will happen when
you build that package on a mips64 for a target that does support CGO?
Anyway, I think this patch is still progress, but a bit risky to still apply
to master just befor the release. So I applied to next instead.
Regards,
Arnout
> +endif # BR2_PACKAGE_HOST_GO_HOST_CGO_LINKING_SUPPORTS
> endif # BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
> # Ensure the toolchain is available, whatever the provider
> HOST_GO_DEPENDENCIES += $(HOST_GO_DEPENDENCIES_CGO)
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Buildroot] [PATCH 0/7] package/go: handle CGO linking for the host
2024-08-01 8:45 [Buildroot] [PATCH 0/7] package/go: handle CGO linking for the host yann.morin
` (6 preceding siblings ...)
2024-08-01 8:45 ` [Buildroot] [PATCH 7/7] package/skopeo: bump version yann.morin
@ 2024-09-03 21:15 ` Arnout Vandecappelle via buildroot
7 siblings, 0 replies; 11+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2024-09-03 21:15 UTC (permalink / raw)
To: yann.morin, buildroot; +Cc: Anisse Astier, Christian Stewart, Thomas Perale
On 01/08/2024 10:45, yann.morin@orange.com wrote:
> From: "Yann E. MORIN" <yann.morin@orange.com>
>
> Hello All!
>
> This series adds the necessary pieces to expose whether the go compiler
> has CGO linking support for the host.
>
> The overall issue with the go compiler, is that we have a single one
> that can build for the target *and* for the host. Any limitation due to
> the target thus leak to the host. This is notably the case for CGO
> linking.
>
> This series fixes that by adding a Kconfig symbol that represents
> whether CGO linking for the host is available. Then, it goes on to fix a
> few existing packages to add the new dependency.
>
> Host variants of target packages that need CGO linking were found with:
>
> $ git grep -l BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS \
> |while read f; do
> [ -e "${f}.host" ] && echo "${f}"
> done
>
> Which returns a rather short list:
>
> package/delve/Config.in
> package/moby-buildkit/Config.in
> package/runc/Config.in
>
> And thus they are all three fixed.
>
> There are only two host-only packages:
>
> $ git grep -l host-golang-package package/*/'**'.mk \
> |while read f; do
> grep -q -E '\(golang' "${f}" || echo "${f}"
> done
> package/mender-artifact/mender-artifact.mk
> package/skopeo/skopeo.mk
>
> Skopeo is fixed in this series, as this is what prompted this work; so
> it leaves mender-artifact to check. I have no idea how to check whether
> a package needs CGO linking, though, so this is left as an exercise for
> any interested party... This is however rather theoretical, as the only
> hosts that do not support CGO linking (based on the target conditions)
> would be mips64 or mips64el hosts, and it is very doubtful Buildroot
> ever ran, runs, or will ever run on such hosts [0]; static-only or
> thread-less hosts are also not widely deployed either...
>
> [0] git grep -E 'HOSTARCH.*mips64' returns nothing before this series,
> so we have no special condition for running on mips64, which is a
> bit surprising...
>
>
> Regards,
> Yann E. MORIN.
>
>
> The following changes since commit e321e81cf921346ec2d4cd1a9439016c7b2d3fb5
>
> configs/beaglebone: bump Linux to 6.6.32-ti-rt-arm32-r7 and U-Boot to 2024.07 (2024-07-30 23:44:30 +0200)
>
>
> are available as patches in this mail series,
>
> for you to apply patches up to 5cb88f8337a63230f90e02423005ba169e307549
>
> package/skopeo: bump version (2024-08-01 10:36:24 +0200)
>
>
> ----------------------------------------------------------------
> Yann E. MORIN (7):
> package/skopeo: add missing dependency on host go arch support
> package/go: expose host CGO linking support
> package/delve: needs CGO linking for host
> package/moby-buildkit: needs CGO linking for host
> package/runc: needs CGO linking for host
> package/skopeo: needs CGO linking for host
> package/skopeo: bump versio
Applied the rest of the series to next. To avoid a merge conflict later, I
also cherry-picked the first one from maser to next.
Regards,
Arnout
>
> docs/manual/adding-packages-golang.adoc | 3 ++-
> package/delve/Config.in.host | 1 +
> package/go/Config.in.host | 12 ++++++++++++
> package/go/go.mk | 7 ++++---
> package/moby-buildkit/Config.in.host | 1 +
> package/runc/Config.in.host | 1 +
> package/skopeo/Config.in.host | 2 ++
> package/skopeo/skopeo.hash | 2 +-
> package/skopeo/skopeo.mk | 2 +-
> 9 files changed, 25 insertions(+), 6 deletions(-)
>
> --
> ____________
> .-----------------.--------------------: _ :------------------.
> | Yann E. MORIN | Real-Time Embedded | __/ ) | /"\ ASCII RIBBON |
> | | Software Designer | _/ - /' | \ / CAMPAIGN |
> | +33 638.411.245 '--------------------: (_ `--, | X AGAINST |
> | yann.morin (at) orange.com |_=" ,--' | / \ HTML MAIL |
> '--------------------------------------:______/_____:------------------'
>
> ____________________________________________________________________________________________________________
> Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
> pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
> a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
> Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
>
> This message and its attachments may contain confidential or privileged information that may be protected by law;
> they should not be distributed, used or copied without authorisation.
> If you have received this email in error, please notify the sender and delete this message and its attachments.
> As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
> Thank you.
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-09-03 21:15 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-01 8:45 [Buildroot] [PATCH 0/7] package/go: handle CGO linking for the host yann.morin
2024-08-01 8:45 ` [Buildroot] [PATCH 1/7] package/skopeo: add missing dependency on host go arch support yann.morin
2024-08-19 21:33 ` Thomas Petazzoni via buildroot
2024-08-01 8:45 ` [Buildroot] [PATCH 2/7] package/go: expose host CGO linking support yann.morin
2024-09-03 20:44 ` Arnout Vandecappelle via buildroot
2024-08-01 8:45 ` [Buildroot] [PATCH 3/7] package/delve: needs CGO linking for host yann.morin
2024-08-01 8:45 ` [Buildroot] [PATCH 4/7] package/moby-buildkit: " yann.morin
2024-08-01 8:45 ` [Buildroot] [PATCH 5/7] package/runc: " yann.morin
2024-08-01 8:45 ` [Buildroot] [PATCH 6/7] package/skopeo: " yann.morin
2024-08-01 8:45 ` [Buildroot] [PATCH 7/7] package/skopeo: bump version yann.morin
2024-09-03 21:15 ` [Buildroot] [PATCH 0/7] package/go: handle CGO linking for the host Arnout Vandecappelle via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox