Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] perl: set stack size for musl.
@ 2020-10-26 13:36 ericonr
  2020-10-26 13:42 ` ericonr
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ericonr @ 2020-10-26 13:36 UTC (permalink / raw)
  To: ml

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

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

https://github.com/ericonr/void-packages perl
https://github.com/void-linux/void-packages/pull/25899

perl: set stack size for musl.
Threaded perl programs can go over musl's default stack size, so setting
a bigger one in LDFLAGS is necessary to avoid segfaults. This segfault
was observed when using gscan2pdf to open an image.

@leahneukirchen 

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

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

From 11b40e00ad746cab905551964fb53e4a424b62a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Mon, 26 Oct 2020 10:33:51 -0300
Subject: [PATCH] perl: set stack size for musl.

Threaded perl programs can go over musl's default stack size, so setting
a bigger one in LDFLAGS is necessary to avoid segfaults. This segfault
was observed when using gscan2pdf to open an image.
---
 srcpkgs/perl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/perl/template b/srcpkgs/perl/template
index 00b402b1b8e..fefddb4a023 100644
--- a/srcpkgs/perl/template
+++ b/srcpkgs/perl/template
@@ -1,7 +1,7 @@
 # Template file for 'perl'
 pkgname=perl
 version=5.30.3
-revision=1
+revision=2
 _perl_cross_version=1.3.1
 build_style=gnu-configure
 hostmakedepends="less"
@@ -164,7 +164,7 @@ do_configure() {
 		_args+=" --target=$XBPS_CROSS_TRIPLET"
 	fi
 
-	LDFLAGS+=" -pthread"
+	LDFLAGS+=" -Wl,-z,stack-size=2097152 -pthread"
 	export HOSTLDFLAGS+=" -pthread"
 
 	if [ "$XBPS_TARGET_LIBC" = "musl" ]; then

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

* Re: perl: set stack size for musl.
  2020-10-26 13:36 [PR PATCH] perl: set stack size for musl ericonr
@ 2020-10-26 13:42 ` ericonr
  2020-10-27  0:06 ` [PR PATCH] [Updated] " ericonr
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: ericonr @ 2020-10-26 13:42 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/25899#issuecomment-716554250

Comment:
Perl build is leaving behind a `perl-cross` directory, I can try to fix later.

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

* Re: [PR PATCH] [Updated] perl: set stack size for musl.
  2020-10-26 13:36 [PR PATCH] perl: set stack size for musl ericonr
  2020-10-26 13:42 ` ericonr
@ 2020-10-27  0:06 ` ericonr
  2020-10-27  0:07 ` ericonr
  2020-10-27  0:07 ` [PR PATCH] [Merged]: " ericonr
  3 siblings, 0 replies; 5+ messages in thread
From: ericonr @ 2020-10-27  0:06 UTC (permalink / raw)
  To: ml

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

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

https://github.com/ericonr/void-packages perl
https://github.com/void-linux/void-packages/pull/25899

perl: set stack size for musl.
Threaded perl programs can go over musl's default stack size, so setting
a bigger one in LDFLAGS is necessary to avoid segfaults. This segfault
was observed when using gscan2pdf to open an image.

@leahneukirchen 

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

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

From 99227266427e5142d691ff2f24adc10ad691e9fd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Mon, 26 Oct 2020 10:33:51 -0300
Subject: [PATCH] perl: set stack size for musl.

Threaded perl programs can go over musl's default stack size, so setting
a bigger one in LDFLAGS is necessary to avoid segfaults. This segfault
was observed when using gscan2pdf to open an image.

Also xlint.
---
 srcpkgs/perl/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/perl/template b/srcpkgs/perl/template
index 00b402b1b8e..33595c5688d 100644
--- a/srcpkgs/perl/template
+++ b/srcpkgs/perl/template
@@ -1,7 +1,7 @@
 # Template file for 'perl'
 pkgname=perl
 version=5.30.3
-revision=1
+revision=2
 _perl_cross_version=1.3.1
 build_style=gnu-configure
 hostmakedepends="less"
@@ -10,7 +10,7 @@ depends="less"
 checkdepends="iana-etc perl-AnyEvent perl-Test-Pod procps-ng"
 short_desc="Practical Extraction and Report Language"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
-license="Artistic-1.0-perl, GPL-1.0-or-later"
+license="Artistic-1.0-Perl, GPL-1.0-or-later"
 homepage="https://www.perl.org"
 distfiles="https://www.cpan.org/src/5.0/perl-${version}.tar.gz
  https://github.com/arsv/perl-cross/releases/download/${_perl_cross_version}/perl-cross-${_perl_cross_version}.tar.gz"
@@ -164,7 +164,7 @@ do_configure() {
 		_args+=" --target=$XBPS_CROSS_TRIPLET"
 	fi
 
-	LDFLAGS+=" -pthread"
+	LDFLAGS+=" -Wl,-z,stack-size=2097152 -pthread"
 	export HOSTLDFLAGS+=" -pthread"
 
 	if [ "$XBPS_TARGET_LIBC" = "musl" ]; then

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

* Re: perl: set stack size for musl.
  2020-10-26 13:36 [PR PATCH] perl: set stack size for musl ericonr
  2020-10-26 13:42 ` ericonr
  2020-10-27  0:06 ` [PR PATCH] [Updated] " ericonr
@ 2020-10-27  0:07 ` ericonr
  2020-10-27  0:07 ` [PR PATCH] [Merged]: " ericonr
  3 siblings, 0 replies; 5+ messages in thread
From: ericonr @ 2020-10-27  0:07 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/25899#issuecomment-716893369

Comment:
I couldn't figure out a proper fix for the leftover file, I'm merging it for now.

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

* Re: [PR PATCH] [Merged]: perl: set stack size for musl.
  2020-10-26 13:36 [PR PATCH] perl: set stack size for musl ericonr
                   ` (2 preceding siblings ...)
  2020-10-27  0:07 ` ericonr
@ 2020-10-27  0:07 ` ericonr
  3 siblings, 0 replies; 5+ messages in thread
From: ericonr @ 2020-10-27  0:07 UTC (permalink / raw)
  To: ml

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

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

perl: set stack size for musl.
https://github.com/void-linux/void-packages/pull/25899

Description:
Threaded perl programs can go over musl's default stack size, so setting
a bigger one in LDFLAGS is necessary to avoid segfaults. This segfault
was observed when using gscan2pdf to open an image.

@leahneukirchen 

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

end of thread, other threads:[~2020-10-27  0:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 13:36 [PR PATCH] perl: set stack size for musl ericonr
2020-10-26 13:42 ` ericonr
2020-10-27  0:06 ` [PR PATCH] [Updated] " ericonr
2020-10-27  0:07 ` ericonr
2020-10-27  0:07 ` [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).