Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] rclone: fix musl cross builds.
@ 2020-11-23 14:29 ericonr
  2020-11-23 14:35 ` [PR PATCH] [Updated] " ericonr
  2020-11-23 17:50 ` [PR PATCH] [Merged]: " ericonr
  0 siblings, 2 replies; 3+ messages in thread
From: ericonr @ 2020-11-23 14:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 540 bytes --]

There is a new pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages rclone
https://github.com/void-linux/void-packages/pull/26640

rclone: fix musl cross builds.
For some reason, the cross built binaries have a TEXTREL in their
dynamic section, which musl's runtime linker doesn't support at all,
causing a segfault at launch. Fix this by disabling CGO_ENABLED for now.

Fixes #26638 

A patch file from https://github.com/void-linux/void-packages/pull/26640.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rclone-26640.patch --]
[-- Type: text/x-diff, Size: 1487 bytes --]

From 6ed56c7d0fcbf05284cf044097f12f0db13606be Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Mon, 23 Nov 2020 11:27:08 -0300
Subject: [PATCH] rclone: fix musl cross builds.

For some reason, the cross built binaries have a TEXTREL in their
dynamic section, which musl's runtime linker doesn't support at all,
causing a segfault at launch. Fix this by disabling CGO_ENABLED for now.
---
 srcpkgs/rclone/template | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/rclone/template b/srcpkgs/rclone/template
index 3c7ea20e5bc..15aaa2571b6 100644
--- a/srcpkgs/rclone/template
+++ b/srcpkgs/rclone/template
@@ -1,7 +1,7 @@
 # Template file for 'rclone'
 pkgname=rclone
 version=1.53.3
-revision=1
+revision=2
 wrksrc="rclone-v${version}"
 build_style=go
 go_import_path=github.com/rclone/rclone
@@ -14,6 +14,15 @@ changelog="https://raw.githubusercontent.com/rclone/rclone/master/docs/content/c
 distfiles="https://github.com/rclone/rclone/releases/download/v${version}/rclone-v${version}.tar.gz"
 checksum=f1e213bc6fb7c46f9a4cc8604ae0856718434bdafe07fa3ce449ae9a510a5763
 
+pre_build() {
+	if [ "$CROSS_BUILD" -a "$XBPS_TARGET_LIBC" = musl ]; then
+		# XXX: when cross building, the binary has a textrel, which segfaults when
+		# launched on musl
+		# FIXME: linkers for the musl toolchains should reject textrels entirely
+		export CGO_ENABLED=0
+	fi
+}
+
 post_install() {
 	vlicense COPYING
 	vman rclone.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PR PATCH] [Updated] rclone: fix musl cross builds.
  2020-11-23 14:29 [PR PATCH] rclone: fix musl cross builds ericonr
@ 2020-11-23 14:35 ` ericonr
  2020-11-23 17:50 ` [PR PATCH] [Merged]: " ericonr
  1 sibling, 0 replies; 3+ messages in thread
From: ericonr @ 2020-11-23 14:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 545 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages rclone
https://github.com/void-linux/void-packages/pull/26640

rclone: fix musl cross builds.
For some reason, the cross built binaries have a TEXTREL in their
dynamic section, which musl's runtime linker doesn't support at all,
causing a segfault at launch. Fix this by disabling CGO_ENABLED for now.

Fixes #26638 

A patch file from https://github.com/void-linux/void-packages/pull/26640.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rclone-26640.patch --]
[-- Type: text/x-diff, Size: 1504 bytes --]

From 212973a566c3ee67d55ec92495dd39b318276fe6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Mon, 23 Nov 2020 11:27:08 -0300
Subject: [PATCH] rclone: fix segfault in musl cross targets.

For some reason, the cross built binaries have a TEXTREL in their
dynamic section, which musl's runtime linker doesn't support at all,
causing a segfault at launch. Fix this by disabling CGO_ENABLED for now.
---
 srcpkgs/rclone/template | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/rclone/template b/srcpkgs/rclone/template
index 3c7ea20e5bc..56b4353c1aa 100644
--- a/srcpkgs/rclone/template
+++ b/srcpkgs/rclone/template
@@ -1,7 +1,7 @@
 # Template file for 'rclone'
 pkgname=rclone
 version=1.53.3
-revision=1
+revision=2
 wrksrc="rclone-v${version}"
 build_style=go
 go_import_path=github.com/rclone/rclone
@@ -14,6 +14,15 @@ changelog="https://raw.githubusercontent.com/rclone/rclone/master/docs/content/c
 distfiles="https://github.com/rclone/rclone/releases/download/v${version}/rclone-v${version}.tar.gz"
 checksum=f1e213bc6fb7c46f9a4cc8604ae0856718434bdafe07fa3ce449ae9a510a5763
 
+pre_build() {
+	if [ "$CROSS_BUILD" ] && [ "$XBPS_TARGET_LIBC" = musl ]; then
+		# XXX: when cross building, the binary has a textrel, which segfaults when
+		# launched on musl
+		# FIXME: linkers for the musl toolchains should reject textrels entirely
+		export CGO_ENABLED=0
+	fi
+}
+
 post_install() {
 	vlicense COPYING
 	vman rclone.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PR PATCH] [Merged]: rclone: fix musl cross builds.
  2020-11-23 14:29 [PR PATCH] rclone: fix musl cross builds ericonr
  2020-11-23 14:35 ` [PR PATCH] [Updated] " ericonr
@ 2020-11-23 17:50 ` ericonr
  1 sibling, 0 replies; 3+ messages in thread
From: ericonr @ 2020-11-23 17:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 390 bytes --]

There's a merged pull request on the void-packages repository

rclone: fix musl cross builds.
https://github.com/void-linux/void-packages/pull/26640

Description:
For some reason, the cross built binaries have a TEXTREL in their
dynamic section, which musl's runtime linker doesn't support at all,
causing a segfault at launch. Fix this by disabling CGO_ENABLED for now.

Fixes #26638 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-23 17:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-23 14:29 [PR PATCH] rclone: fix musl cross builds ericonr
2020-11-23 14:35 ` [PR PATCH] [Updated] " ericonr
2020-11-23 17:50 ` [PR PATCH] [Merged]: " ericonr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).