Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] pari: add config options
@ 2021-03-20 17:20 dkwo
  2021-03-22  9:31 ` [PR PATCH] [Updated] " dkwo
                   ` (25 more replies)
  0 siblings, 26 replies; 27+ messages in thread
From: dkwo @ 2021-03-20 17:20 UTC (permalink / raw)
  To: ml

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

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

https://github.com/dkwo/void-packages pari-conf2
https://github.com/void-linux/void-packages/pull/29635

pari: add config options
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From c8be81849c0d4898ce7f19a4fa99a36329d635f4 Mon Sep 17 00:00:00 2001
From: Nicolo <nicolopiazzalunga@gmail.com>
Date: Sat, 20 Mar 2021 18:18:33 +0100
Subject: [PATCH 1/2] pari: add pthread support in config

---
 srcpkgs/pari/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/pari/template b/srcpkgs/pari/template
index 8e2a415913ba..37a3d20202b1 100644
--- a/srcpkgs/pari/template
+++ b/srcpkgs/pari/template
@@ -1,11 +1,11 @@
 # Template file for 'pari'
 pkgname=pari
 version=2.13.1
-revision=1
+revision=2
 build_style=configure
 build_helper=qemu
 configure_script=./Configure
-configure_args="--prefix=/usr"
+configure_args="--prefix=/usr --with-readline --mt=pthread --with-gmp"
 make_build_target=all
 make_check_target=test-all
 hostmakedepends="perl texlive"

From a4d32e72eb807a2e6dc332031b3c9d8add5f1426 Mon Sep 17 00:00:00 2001
From: Nicolo <nicolopiazzalunga@gmail.com>
Date: Sat, 20 Mar 2021 18:20:00 +0100
Subject: [PATCH 2/2] giac: revbump for pari

---
 srcpkgs/giac/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/giac/template b/srcpkgs/giac/template
index ca95534498f2..3689027daf17 100644
--- a/srcpkgs/giac/template
+++ b/srcpkgs/giac/template
@@ -1,7 +1,7 @@
 # Template file for 'giac'
 pkgname=giac
 version=1.5.0.87
-revision=4
+revision=5
 wrksrc="giac-${version%.*}"
 build_style=gnu-configure
 makedepends="fltk-devel gmp-devel gsl-devel lapack-devel

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

* Re: [PR PATCH] [Updated] pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
@ 2021-03-22  9:31 ` dkwo
  2021-03-25  3:11 ` [wip] " ericonr
                   ` (24 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dkwo @ 2021-03-22  9:31 UTC (permalink / raw)
  To: ml

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

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

https://github.com/dkwo/void-packages pari-conf2
https://github.com/void-linux/void-packages/pull/29635

pari: add config options
This is such that pari is usable when building sagemath, which requires pthread.

Note: pthread also sets --enable-tls (build the thread-safe version of the library). This tends to slow down the shared library libpari.so by about 25%, so it is suggested to use the static library libpari.a instead. How do I do that? Arch Linux has `export CFLAGS+=' -flto'`, Alpine has `export CFLAGS="$CFLAGS -flto" # reduce speed losses under pthread`.

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

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

From c8be81849c0d4898ce7f19a4fa99a36329d635f4 Mon Sep 17 00:00:00 2001
From: Nicolo <nicolopiazzalunga@gmail.com>
Date: Sat, 20 Mar 2021 18:18:33 +0100
Subject: [PATCH 1/3] pari: add pthread support in config

---
 srcpkgs/pari/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/pari/template b/srcpkgs/pari/template
index 8e2a415913ba..37a3d20202b1 100644
--- a/srcpkgs/pari/template
+++ b/srcpkgs/pari/template
@@ -1,11 +1,11 @@
 # Template file for 'pari'
 pkgname=pari
 version=2.13.1
-revision=1
+revision=2
 build_style=configure
 build_helper=qemu
 configure_script=./Configure
-configure_args="--prefix=/usr"
+configure_args="--prefix=/usr --with-readline --mt=pthread --with-gmp"
 make_build_target=all
 make_check_target=test-all
 hostmakedepends="perl texlive"

From a4d32e72eb807a2e6dc332031b3c9d8add5f1426 Mon Sep 17 00:00:00 2001
From: Nicolo <nicolopiazzalunga@gmail.com>
Date: Sat, 20 Mar 2021 18:20:00 +0100
Subject: [PATCH 2/3] giac: revbump for pari

---
 srcpkgs/giac/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/giac/template b/srcpkgs/giac/template
index ca95534498f2..3689027daf17 100644
--- a/srcpkgs/giac/template
+++ b/srcpkgs/giac/template
@@ -1,7 +1,7 @@
 # Template file for 'giac'
 pkgname=giac
 version=1.5.0.87
-revision=4
+revision=5
 wrksrc="giac-${version%.*}"
 build_style=gnu-configure
 makedepends="fltk-devel gmp-devel gsl-devel lapack-devel

From 4a74f8fe3a1a29dcf17408d9fbe90bcfa3b4d470 Mon Sep 17 00:00:00 2001
From: dkwo <31933792+dkwo@users.noreply.github.com>
Date: Mon, 22 Mar 2021 09:31:21 +0000
Subject: [PATCH 3/3] Delete template

---
 srcpkgs/giac/template | 49 -------------------------------------------
 1 file changed, 49 deletions(-)
 delete mode 100644 srcpkgs/giac/template

diff --git a/srcpkgs/giac/template b/srcpkgs/giac/template
deleted file mode 100644
index 3689027daf17..000000000000
--- a/srcpkgs/giac/template
+++ /dev/null
@@ -1,49 +0,0 @@
-# Template file for 'giac'
-pkgname=giac
-version=1.5.0.87
-revision=5
-wrksrc="giac-${version%.*}"
-build_style=gnu-configure
-makedepends="fltk-devel gmp-devel gsl-devel lapack-devel
- libjpeg-turbo-devel libpng-devel readline-devel mpfr-devel pari-devel"
-depends="desktop-file-utils hicolor-icon-theme"
-short_desc="Free computer algebra system"
-maintainer="Orphaned <orphan@voidlinux.org>"
-license="GPL-3.0-or-later"
-homepage="https://www-fourier.ujf-grenoble.fr/~parisse/giac.html"
-distfiles="https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/giac_${version%.*}-${version##*.}.tar.gz"
-checksum=bbd6f0aafe373de3c9ed53d21878224e847359fdd9a7cdf9e9096e7c960f10b4
-
-# need more than 4*65536 stack, see try_parse() in gen.cc line 11812
-LDFLAGS="-Wl,-z,stack-size=2097152"
-
-post_install() {
-	# remove duplicates
-	rm -r ${DESTDIR}/usr/share/doc
-}
-
-libgiac_package() {
-	short_desc+=" - runtime library"
-	pkg_install() {
-		vmove "usr/lib/*.so.*"
-	}
-}
-
-giac-devel_package() {
-	short_desc+=" - development files"
-	depends="${sourcepkg}>=${version}_${revision} $makedepends"
-	pkg_install() {
-		vmove usr/include
-		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
-	}
-}
-
-giac-doc_package() {
-	short_desc+=" - Documentation and Examples"
-	pkg_install() {
-		vmove "usr/share/giac/doc"
-		vmove "usr/share/giac/examples"
-		find ${PKGDESTDIR} -name "Makefile*" -delete
-	}
-}

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

* Re: [wip] pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
  2021-03-22  9:31 ` [PR PATCH] [Updated] " dkwo
@ 2021-03-25  3:11 ` ericonr
  2021-03-25 20:21 ` [PR PATCH] [Updated] " dkwo
                   ` (23 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: ericonr @ 2021-03-25  3:11 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/29635#issuecomment-806331185

Comment:
> so it is suggested to use the static library libpari.a instead

I don't understand this part...

Anyway, `CFLAGS=-flto` in the template ought to be enough.

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

* Re: [PR PATCH] [Updated] [wip] pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
  2021-03-22  9:31 ` [PR PATCH] [Updated] " dkwo
  2021-03-25  3:11 ` [wip] " ericonr
@ 2021-03-25 20:21 ` dkwo
  2021-03-25 20:23 ` dkwo
                   ` (22 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dkwo @ 2021-03-25 20:21 UTC (permalink / raw)
  To: ml

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

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

https://github.com/dkwo/void-packages pari-conf2
https://github.com/void-linux/void-packages/pull/29635

[wip] pari: add config options
This is such that pari is usable when building sagemath, which requires pthread.

Note: pthread also sets --enable-tls (build the thread-safe version of the library). This tends to slow down the shared library libpari.so by about 25%, so it is suggested to use the static library libpari.a instead. How do I do that?
Arch Linux has `export CFLAGS+=' -flto'`, Alpine has `export CFLAGS="$CFLAGS -flto" # reduce speed losses under pthread`.

[ci skip]

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

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

From d370188a9ff956327ab39ad7e0d96d79c688b9b6 Mon Sep 17 00:00:00 2001
From: Nicolo <nicolopiazzalunga@gmail.com>
Date: Sat, 20 Mar 2021 18:18:33 +0100
Subject: [PATCH] pari: add pthread support in config

---
 srcpkgs/pari/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/pari/template b/srcpkgs/pari/template
index 8e2a415913ba..37a3d20202b1 100644
--- a/srcpkgs/pari/template
+++ b/srcpkgs/pari/template
@@ -1,11 +1,11 @@
 # Template file for 'pari'
 pkgname=pari
 version=2.13.1
-revision=1
+revision=2
 build_style=configure
 build_helper=qemu
 configure_script=./Configure
-configure_args="--prefix=/usr"
+configure_args="--prefix=/usr --with-readline --mt=pthread --with-gmp"
 make_build_target=all
 make_check_target=test-all
 hostmakedepends="perl texlive"

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

* Re: [PR PATCH] [Updated] [wip] pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
                   ` (2 preceding siblings ...)
  2021-03-25 20:21 ` [PR PATCH] [Updated] " dkwo
@ 2021-03-25 20:23 ` dkwo
  2021-03-26  9:51 ` dkwo
                   ` (21 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dkwo @ 2021-03-25 20:23 UTC (permalink / raw)
  To: ml

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

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

https://github.com/dkwo/void-packages pari-conf2
https://github.com/void-linux/void-packages/pull/29635

[wip] pari: add config options
This is such that pari is usable when building sagemath, which requires pthread.

Note: pthread also sets --enable-tls (build the thread-safe version of the library). This tends to slow down the shared library libpari.so by about 25%, so it is suggested to use the static library libpari.a instead. How do I do that?
Arch Linux has `export CFLAGS+=' -flto'`, Alpine has `export CFLAGS="$CFLAGS -flto" # reduce speed losses under pthread`.

[ci skip]

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

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

From a68de65c9ddeba8d67e3e700e83ab5b98efc2410 Mon Sep 17 00:00:00 2001
From: Nicolo <nicolopiazzalunga@gmail.com>
Date: Sat, 20 Mar 2021 18:18:33 +0100
Subject: [PATCH] pari: add pthread support in config

---
 srcpkgs/pari/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/pari/template b/srcpkgs/pari/template
index 8e2a415913ba..852b3d9ab766 100644
--- a/srcpkgs/pari/template
+++ b/srcpkgs/pari/template
@@ -1,11 +1,11 @@
 # Template file for 'pari'
 pkgname=pari
 version=2.13.1
-revision=1
+revision=2
 build_style=configure
 build_helper=qemu
 configure_script=./Configure
-configure_args="--prefix=/usr"
+configure_args="--prefix=/usr --with-readline --mt=pthread --with-gmp"
 make_build_target=all
 make_check_target=test-all
 hostmakedepends="perl texlive"
@@ -19,6 +19,7 @@ checksum=81ecf7d70ccdaae230165cff627c9ce2ec297b8f22f9f40742279d85f86dfcb1
 
 build_options="x11"
 build_options_default="x11"
+CFLAGS=-flto
 
 post_patch() {
 	# sse2 is not available on all i686

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

* Re: pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
                   ` (3 preceding siblings ...)
  2021-03-25 20:23 ` dkwo
@ 2021-03-26  9:51 ` dkwo
  2021-03-26 16:30 ` ericonr
                   ` (20 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dkwo @ 2021-03-26  9:51 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/29635#issuecomment-808081955

Comment:
Now `pari` builds and tests fine on `x86_64-musl`:
```
+++ Total bench for gp-sta is 469352
+++ Total bench for gp-dyn is 546837
The following tests were skipped: ellglobalred ellmodulareqn galois galoischartable galpol lfunartin member programming
```
while `giac` builds but fails one test `FAIL: chk_fhan4`.
Can this be fixed again by enlarging `stacksize` @tornaria ?

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

* Re: pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
                   ` (4 preceding siblings ...)
  2021-03-26  9:51 ` dkwo
@ 2021-03-26 16:30 ` ericonr
  2021-03-26 17:09 ` dkwo
                   ` (19 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: ericonr @ 2021-03-26 16:30 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/29635#issuecomment-808355355

Comment:
Increasing stack size should only matter if the test case is segfaulting. Is that the case?

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

* Re: pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
                   ` (5 preceding siblings ...)
  2021-03-26 16:30 ` ericonr
@ 2021-03-26 17:09 ` dkwo
  2021-03-26 17:42 ` ericonr
                   ` (18 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dkwo @ 2021-03-26 17:09 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/29635#issuecomment-808378987

Comment:
Maybe I'm misinterpreting this?
```
// Using locale /usr/share/locale/
// C
// /usr/share/locale/
// giac
//   ***   Warning: increasing stack size to 1024000.
  ***   the thread stack overflows !
  current stack size: 512000 (0.488 Mbytes)
  [hint] set 'threadsizemax' to a nonzero value in your GPRC
  *** matdet: Warning: increasing stack size to 2048000.
  ***   at top-level: matdet([-10,-7,6,-7,1,4,-1,-2,-2,-5,1,7,-6,7,-
  ***                 ^----------------------------------------------
  *** matdet: the thread stack overflows !
  current stack size: 512000 (0.488 Mbytes)
  [hint] set 'threadsizemax' to a nonzero value in your GPRC
  ***   the thread stack overflows !
  current stack size: 512000 (0.488 Mbytes)
  [hint] set 'threadsizemax' to a nonzero value in your GPRC
  ***   at top-level: matdet([-10,-7,6,-7,1,4,-1,-2,-2,-5,1,7,-6,7,-
  ***                 ^----------------------------------------------
  *** matdet: the thread stack overflows !
  current stack size: 512000 (0.488 Mbytes)
  [hint] set 'threadsizemax' to a nonzero value in your GPRC
  ***   the thread stack overflows !
  current stack size: 512000 (0.488 Mbytes)
  [hint] set 'threadsizemax' to a nonzero value in your GPRC
  ***   at top-level: matdet([-10,-7,6,-7,1,4,-1,-2,-2,-5,1,7,-6,7,-
  ***                 ^----------------------------------------------
  *** matdet: the thread stack overflows !
  current stack size: 512000 (0.488 Mbytes)
  [hint] set 'threadsizemax' to a nonzero value in your GPRC
  ***   the thread stack overflows !
  current stack size: 512000 (0.488 Mbytes)
  [hint] set 'threadsizemax' to a nonzero value in your GPRC
  ***   at top-level: matdet([-10,-7,6,-7,1,4,-1,-2,-2,-5,1,7,-6,7,-
  ***                 ^----------------------------------------------
  *** matdet: the thread stack overflows !
  current stack size: 512000 (0.488 Mbytes)
  [hint] set 'threadsizemax' to a nonzero value in your GPRC
  ***   the thread stack overflows !
  current stack size: 512000 (0.488 Mbytes)
  [hint] set 'threadsizemax' to a nonzero value in your GPRC
  ***   at top-level: matdet([-10,-7,6,-7,1,4,-1,-2,-2,-5,1,7,-6,7,-
  ***                 ^----------------------------------------------
  *** matdet: the thread stack overflows !
  current stack size: 512000 (0.488 Mbytes)
  [hint] set 'threadsizemax' to a nonzero value in your GPRC
  ***   Warning: increasing stack size to 1024000.
  ***   Warning: increasing stack size to 2048000.
  ***   Warning: increasing stack size to 4096000.
  ***   Warning: increasing stack size to 1024000.
  ***   Warning: increasing stack size to 1024000.
  ***   Warning: increasing stack size to 2048000.
49,57d48
< 
< 
< 
< 
< 
< 
< 
< 
< 
61,62c52,53
< undef,
< undef,
---
> 0,
> 0,
73d63
< 
FAIL: chk_fhan4
```

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

* Re: pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
                   ` (6 preceding siblings ...)
  2021-03-26 17:09 ` dkwo
@ 2021-03-26 17:42 ` ericonr
  2021-03-27 14:53 ` [PR PATCH] [Updated] " dkwo
                   ` (17 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: ericonr @ 2021-03-26 17:42 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/29635#issuecomment-808404211

Comment:
You can probably try increasing it and see what happens ;)

But

>   [hint] set 'threadsizemax' to a nonzero value in your GPRC

seems kinda suspicious? Not sure

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

* Re: [PR PATCH] [Updated] pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
                   ` (7 preceding siblings ...)
  2021-03-26 17:42 ` ericonr
@ 2021-03-27 14:53 ` dkwo
  2021-03-27 14:58 ` dkwo
                   ` (16 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dkwo @ 2021-03-27 14:53 UTC (permalink / raw)
  To: ml

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

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

https://github.com/dkwo/void-packages pari-conf2
https://github.com/void-linux/void-packages/pull/29635

pari: add config options
This is such that pari is usable when building sagemath, which requires pthread.

Note: pthread also sets --enable-tls (build the thread-safe version of the library). This tends to slow down the shared library libpari.so by about 25%, so it is suggested to use the static library libpari.a instead. How do I do that?
Arch Linux has `export CFLAGS+=' -flto'`, Alpine has `export CFLAGS="$CFLAGS -flto" # reduce speed losses under pthread`.

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

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

From 34f0b12db44e4962157e1d36f5ec689500fb7887 Mon Sep 17 00:00:00 2001
From: Nicolo <nicolopiazzalunga@gmail.com>
Date: Sat, 20 Mar 2021 18:18:33 +0100
Subject: [PATCH 1/3] pari: add pthread support in config

---
 srcpkgs/pari/template | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/pari/template b/srcpkgs/pari/template
index 8e2a415913ba..262c0c26aac2 100644
--- a/srcpkgs/pari/template
+++ b/srcpkgs/pari/template
@@ -1,11 +1,11 @@
 # Template file for 'pari'
 pkgname=pari
 version=2.13.1
-revision=1
+revision=2
 build_style=configure
 build_helper=qemu
 configure_script=./Configure
-configure_args="--prefix=/usr"
+configure_args="--prefix=/usr --with-readline --mt=pthread --with-gmp"
 make_build_target=all
 make_check_target=test-all
 hostmakedepends="perl texlive"
@@ -19,6 +19,8 @@ checksum=81ecf7d70ccdaae230165cff627c9ce2ec297b8f22f9f40742279d85f86dfcb1
 
 build_options="x11"
 build_options_default="x11"
+# reduce speed losses under pthread
+CFLAGS=-flto
 
 post_patch() {
 	# sse2 is not available on all i686

From a2b16b4a8206add1cbb616786375cb166bc49852 Mon Sep 17 00:00:00 2001
From: Nicolo <nicolopiazzalunga@gmail.com>
Date: Fri, 26 Mar 2021 09:57:27 +0100
Subject: [PATCH 2/3] pari: add libpari-gmp-tls.so.7

---
 common/shlibs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common/shlibs b/common/shlibs
index 6815daac2265..76d5c98731cd 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3964,7 +3964,8 @@ libopenaptx.so.0 libopenaptx-0.2.0_1
 libsimavr.so.1 simavr-1.6_2
 libsimavrparts.so.1 simavr-1.6_2
 libsword-1.8.1.so libsword-1.8.1_6
-libpari-gmp.so.7 pari-2.13.0_1
+libpari-gmp.so.7 pari-2.13.1_2
+libpari-gmp-tls.so.7 pari-2.13.1_2
 libtree-sitter.so.0 tree-sitter-0.19.0_1
 libwayland-client++.so.0 libwaylandpp-0.2.8_1
 libwayland-cursor++.so.0 libwaylandpp-0.2.8_1

From 2922db989cbbac357394ccb953b0ff9e949799f6 Mon Sep 17 00:00:00 2001
From: Nicolo <nicolopiazzalunga@gmail.com>
Date: Fri, 26 Mar 2021 09:58:05 +0100
Subject: [PATCH 3/3] giac: update, edit config and malloc.patch

---
 srcpkgs/giac/patches/malloc.patch | 6 +++---
 srcpkgs/giac/template             | 7 ++++---
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/giac/patches/malloc.patch b/srcpkgs/giac/patches/malloc.patch
index 3f2b05b37d04..85c653a04a82 100644
--- a/srcpkgs/giac/patches/malloc.patch
+++ b/srcpkgs/giac/patches/malloc.patch
@@ -1,11 +1,11 @@
 --- src/History.cc.orig	2017-10-02 10:23:46.000000000 +0200
 +++ src/History.cc	2017-11-14 15:42:12.119849965 +0100
-@@ -3828,7 +3828,7 @@
+@@ -4352,7 +4352,7 @@
        // mode_s += "Time: ";
        // double t=double(clock());
        // mode_s += xcas::print_DOUBLE_(t/CLOCKS_PER_SEC);
--#ifdef HAVE_MALLOC_H //
-+#if defined HAVE_MALLOC_H && defined __GLIBC__ //
+-#if defined(HAVE_MALLOC_H) && !defined(__MINGW_H)
++#if defined(HAVE_MALLOC_H) && !defined(__MINGW_H) && defined(__GLIBC__)
        struct mallinfo mem=mallinfo();
        double memd=mem.arena+mem.hblkhd;
        mode_s +=xcas::print_DOUBLE_(memd/1048576);
diff --git a/srcpkgs/giac/template b/srcpkgs/giac/template
index ca95534498f2..f8d08ef9f749 100644
--- a/srcpkgs/giac/template
+++ b/srcpkgs/giac/template
@@ -1,9 +1,10 @@
 # Template file for 'giac'
 pkgname=giac
-version=1.5.0.87
-revision=4
+version=1.7.0.1
+revision=1
 wrksrc="giac-${version%.*}"
 build_style=gnu-configure
+configure_args="--disable-micropy --disable-quickjs"
 makedepends="fltk-devel gmp-devel gsl-devel lapack-devel
  libjpeg-turbo-devel libpng-devel readline-devel mpfr-devel pari-devel"
 depends="desktop-file-utils hicolor-icon-theme"
@@ -12,7 +13,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="https://www-fourier.ujf-grenoble.fr/~parisse/giac.html"
 distfiles="https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/giac_${version%.*}-${version##*.}.tar.gz"
-checksum=bbd6f0aafe373de3c9ed53d21878224e847359fdd9a7cdf9e9096e7c960f10b4
+checksum=385d4192f4217c0edd5884a02761a6d29f63fba50d6628c0775951a1be322269
 
 # need more than 4*65536 stack, see try_parse() in gen.cc line 11812
 LDFLAGS="-Wl,-z,stack-size=2097152"

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

* Re: pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
                   ` (8 preceding siblings ...)
  2021-03-27 14:53 ` [PR PATCH] [Updated] " dkwo
@ 2021-03-27 14:58 ` dkwo
  2021-03-27 19:39 ` tornaria
                   ` (15 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dkwo @ 2021-03-27 14:58 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/29635#issuecomment-808745559

Comment:
I found out that upgrading `giac` results in all checks passed.
I'd still like to add as makedepends `ntl`, which in turn requires `gf2x`.
These are also needed for `flint`.
I will do these separately.

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

* Re: pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
                   ` (9 preceding siblings ...)
  2021-03-27 14:58 ` dkwo
@ 2021-03-27 19:39 ` tornaria
  2021-03-27 22:28 ` tornaria
                   ` (14 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: tornaria @ 2021-03-27 19:39 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/29635#issuecomment-808792043

Comment:
> Maybe I'm misinterpreting this?
> 
> ...
> //   ***   Warning: increasing stack size to 1024000.
>   ***   the thread stack overflows !
>   current stack size: 512000 (0.488 Mbytes)
>   [hint] set 'threadsizemax' to a nonzero value in your GPRC
>   *** matdet: Warning: increasing stack size to 2048000.
>   ***   at top-level: matdet([-10,-7,6,-7,1,4,-1,-2,-2,-5,1,7,-6,7,-
>   ***                 ^----------------------------------------------
>   *** matdet: the thread stack overflows !
>   current stack size: 512000 (0.488 Mbytes)
>   [hint] set 'threadsizemax' to a nonzero value in your GPRC
>   ***   the thread stack overflows !
> ...

I think you are confusing the actual stack used by the cpu, with the pari stack where computations are done (this is the basic design of pari using a stack for allocations instead of GC, etc).

Usually (with single threaded pari) when the stack overflows pari doubles the stack and retries the computation. I think this already happened for this test. However it seems that in multi-threaded pari the doubling-the-stack behaviour is limited by `threadsizemax` (I guess to avoid using up a lot of memory), so the stack size, originally at 512K, is increased to 1024K, but `threadsizemax` prevents that (note that the second time the current stack size is still 512K).

I will have a look into this. It might be: (a) that the particular computation giac is doing in this test is hard and it really require more than 512k of stack (b) there's a "bug" in pari, maybe some routine in pari is not checking the stack to reallocate often enough so it ends up not working in limited stack space.

Regarding pthread pari: I'd like to discuss a bit more what's the right way to proceed. Indeed for lots of applications having a pthread pari is a good thing (I use a 36-core machine for my computations so I'd definitely take advantage of this). However, I've noticed a slowdown by a factor of 2 with pthread pari in some of my computations, so I often use single-threaded pari and arrange my computation so it can be done by 36 independent pari processes. I think the reason is that TLS is _slow_.

I wonder if it would make sense to offer different versions of pari (single thread / multi thread). At the very least, I'd make pthread a build option so that one can easily compile one or the other as needed.

More generally: in math software is often important to have different versions of the same software available. I don't know if there is a reasonable way to offer this in void. Also might be desirable: offering a way to compile math software with -march=native so it can take advantage of avx, etc.

Is there a way void could support something like "subarchitectures"? Say `x86_64-avx` where some packages are compiled for this architecture and the rest default to the packages for `x86_64`.

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

* Re: pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
                   ` (10 preceding siblings ...)
  2021-03-27 19:39 ` tornaria
@ 2021-03-27 22:28 ` tornaria
  2021-03-27 22:38 ` tornaria
                   ` (13 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: tornaria @ 2021-03-27 22:28 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/29635#issuecomment-808811231

Comment:
> This is such that pari is usable when building sagemath, which requires pthread.
As a matter of fact, I don't think sagemath requires pari built with pthread, or does it? (maybe it does need TLS at least? I don't know)

Anyway, sagemath won't work with pari-2.13 (for now, see https://trac.sagemath.org/ticket/30801) but that's for a different reason.

I run check as a "benchmark" to have hard data, but so far it seems to support what I thought:
 - using `pthreads` has a 25-45 % performance hit (25% for `gp-sta`, 45% for `gp-dyn`)
 - using `CFLAGS=-flto` doesn't change anything (even make `gp-dyn` slower).

A very stupid (non-)benchmark is to run
```
$ echo "sum(i=1,100 000 000, i);" | time gp -q
```
This doesn't substitute a proper benchmark, but at least it takes less than 5s to show a significant slowdown: it takes ~ 4.25s for me with the current binary from `pari-2.13.1_1`, but ~ 8.5s with `--mt=pthread` and more than 9s with `-flto` (less if using gp-sta, but we are shipping gp-dyn).

Note that all this "benchmark" is using a single-thread, because most (all?) of pari code which is written in C is single-thread. If you actually USE multiple threads you'll pay another 50% penalty. For instance:
```
echo "parsum(j=0,99,sum(i=j*1 000 000 + 1, (j+1)*1 000 000, i));" | time gp -q
```
Takes:
 - with single-thread gp-dyn: still 4.25s (no different than above)
 - with single-thread gp-sta: ~ 4s
 - with pthread gp-dyn: 12.87s user = 2.40s wall (8 core)
 - with pthread gp-sta: 7.28s user = 1.37s wall (8 core)

I'm not willing to pay a 3x penalty for using multi-thread. I can parallelize my programs in a different way, but of course not all tasks are suitable for that.

Here's a proposal (RFC):
 - start building and shipping gp-sta instead of gp-dyn (it's not clear what's the advantage of gp-dyn other than disk space).
 - add a build option to pari so that it's easy to compile pari with pthread support. It's even more important that the pthread version compiles gp-sta as the penalty is higher here.
 - start shipping the static library so external programs can static link with pari.
 - consider actually compiling both single-thread and multi-thread pari. The libraries have different SONAMES so that would not be a problem. As for the gp binary, we could ship them in separate packages, either conflicting or with different names and alternatives.

What do you think?

I'm willing to do all of the above and take over the package if the plan above sounds reasonable.

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

* Re: pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
                   ` (11 preceding siblings ...)
  2021-03-27 22:28 ` tornaria
@ 2021-03-27 22:38 ` tornaria
  2021-03-28  6:12 ` ericonr
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: tornaria @ 2021-03-27 22:38 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/29635#issuecomment-808812289

Comment:
> I found out that upgrading `giac` results in all checks passed.
> I'd still like to add as makedepends `ntl`, which in turn requires `gf2x`.
> These are also needed for `flint`.
> I will do these separately.

I have templates for givaro, fflas-ffpack, linbox, gf2x, ntl, flintlib, arb, mpfi, eclib, flintqs, lcalc. They are a bit old but were working ok to compile sagemath 9.1. I'll try to update and make PR for all of that. I'd really like to have a working sagemath in void.

I also have a WIP template for gap, but it seemed more difficult so it's not really working at this time.

OTOH, note that using system packages to build sage is a bit "dangerous", because some system updates will break your build of sage. This is the main reason why it's important to have sagemath in void: so that relevant updates will revbump and recompile it. Otherwise it's safer to use the minimal set of system packages.

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

* Re: pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
                   ` (12 preceding siblings ...)
  2021-03-27 22:38 ` tornaria
@ 2021-03-28  6:12 ` ericonr
  2021-03-28  6:13 ` ericonr
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: ericonr @ 2021-03-28  6:12 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/29635#issuecomment-808853504

Comment:
Two quick nits on the current PR: the `pari` commit messages should be squashed together, and the `giac` commit should include `update to $version`, instead of just `update` :)

@tornaria, thanks for the thorough analysis.

> I think the reason is that TLS is slow.

This shouldn't affect things so much, unless they made the terrible decision of using `__thread` globals for everything? Or worse, normal global with `pthread_mutex` calls around accesses...

> I wonder if it would make sense to offer different versions of pari (single thread / multi thread). At the very least, I'd make pthread a build option so that one can easily compile one or the other as needed.

That sounds reasonable, especially since there seems to be such a difference.

> Is there a way void could support something like "subarchitectures"? Say x86_64-avx where some packages are compiled for this architecture and the rest default to the packages for x86_64.

Maybe as a build option, at most. I don't believe we wish to carry such packages, because it can increase the maintenance burden a lot. If the threaded version becomes necessary for sage (as a system package) but the performance loss is too high, we can consider it then, but I'm against it when it comes to architecture. Ideally, they would compile opimitized versions of some files and choose between them at runtime...

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

* Re: pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
                   ` (13 preceding siblings ...)
  2021-03-28  6:12 ` ericonr
@ 2021-03-28  6:13 ` ericonr
  2021-03-28 10:10 ` [PR PATCH] [Updated] " dkwo
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: ericonr @ 2021-03-28  6:13 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/29635#issuecomment-808853614

Comment:
> OTOH, note that using system packages to build sage is a bit "dangerous", because some system updates will break your build of sage. This is the main reason why it's important to have sagemath in void: so that relevant updates will revbump and recompile it. Otherwise it's safer to use the minimal set of system packages.

If you have a local sage build installed via XBPS, it should catch shlib errors, unless some dependencies break ABI/compatibility without soname bumps?

Anyway, tagging in @ahesford because it might be near his ballpark.

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

* Re: [PR PATCH] [Updated] pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
                   ` (14 preceding siblings ...)
  2021-03-28  6:13 ` ericonr
@ 2021-03-28 10:10 ` dkwo
  2021-03-28 10:11 ` dkwo
                   ` (9 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dkwo @ 2021-03-28 10:10 UTC (permalink / raw)
  To: ml

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

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

https://github.com/dkwo/void-packages pari-conf2
https://github.com/void-linux/void-packages/pull/29635

pari: add config options
This is such that pari is usable when building sagemath, which requires pthread.

Note: pthread also sets --enable-tls (build the thread-safe version of the library). This tends to slow down the shared library libpari.so by about 25%, so it is suggested to use the static library libpari.a instead. How do I do that?
Arch Linux has `export CFLAGS+=' -flto'`, Alpine has `export CFLAGS="$CFLAGS -flto" # reduce speed losses under pthread`.

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

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

From 137fbe0f5f5ebafcae3714cad78df61d821e97d7 Mon Sep 17 00:00:00 2001
From: Nicolo <nicolopiazzalunga@gmail.com>
Date: Sat, 20 Mar 2021 18:18:33 +0100
Subject: [PATCH 1/2] pari: add pthread support in config, add
 libpari-gmp-tls.so.7

---
 common/shlibs         | 3 ++-
 srcpkgs/pari/template | 6 ++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 7319cc8d20cb..8d79bac4c9ac 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3963,7 +3963,8 @@ libopenaptx.so.0 libopenaptx-0.2.0_1
 libsimavr.so.1 simavr-1.6_2
 libsimavrparts.so.1 simavr-1.6_2
 libsword-1.8.1.so libsword-1.8.1_6
-libpari-gmp.so.7 pari-2.13.0_1
+libpari-gmp.so.7 pari-2.13.1_2
+libpari-gmp-tls.so.7 pari-2.13.1_2
 libtree-sitter.so.0 tree-sitter-0.19.0_1
 libwayland-client++.so.0 libwaylandpp-0.2.8_1
 libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/pari/template b/srcpkgs/pari/template
index 8e2a415913ba..262c0c26aac2 100644
--- a/srcpkgs/pari/template
+++ b/srcpkgs/pari/template
@@ -1,11 +1,11 @@
 # Template file for 'pari'
 pkgname=pari
 version=2.13.1
-revision=1
+revision=2
 build_style=configure
 build_helper=qemu
 configure_script=./Configure
-configure_args="--prefix=/usr"
+configure_args="--prefix=/usr --with-readline --mt=pthread --with-gmp"
 make_build_target=all
 make_check_target=test-all
 hostmakedepends="perl texlive"
@@ -19,6 +19,8 @@ checksum=81ecf7d70ccdaae230165cff627c9ce2ec297b8f22f9f40742279d85f86dfcb1
 
 build_options="x11"
 build_options_default="x11"
+# reduce speed losses under pthread
+CFLAGS=-flto
 
 post_patch() {
 	# sse2 is not available on all i686

From a5ea2198eb7c613d4535c392672dbf413e3c1154 Mon Sep 17 00:00:00 2001
From: Nicolo <nicolopiazzalunga@gmail.com>
Date: Fri, 26 Mar 2021 09:58:05 +0100
Subject: [PATCH 2/2] giac: update to 1.7.0.1, edit config and malloc.patch

---
 srcpkgs/giac/patches/malloc.patch | 6 +++---
 srcpkgs/giac/template             | 7 ++++---
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/giac/patches/malloc.patch b/srcpkgs/giac/patches/malloc.patch
index 3f2b05b37d04..85c653a04a82 100644
--- a/srcpkgs/giac/patches/malloc.patch
+++ b/srcpkgs/giac/patches/malloc.patch
@@ -1,11 +1,11 @@
 --- src/History.cc.orig	2017-10-02 10:23:46.000000000 +0200
 +++ src/History.cc	2017-11-14 15:42:12.119849965 +0100
-@@ -3828,7 +3828,7 @@
+@@ -4352,7 +4352,7 @@
        // mode_s += "Time: ";
        // double t=double(clock());
        // mode_s += xcas::print_DOUBLE_(t/CLOCKS_PER_SEC);
--#ifdef HAVE_MALLOC_H //
-+#if defined HAVE_MALLOC_H && defined __GLIBC__ //
+-#if defined(HAVE_MALLOC_H) && !defined(__MINGW_H)
++#if defined(HAVE_MALLOC_H) && !defined(__MINGW_H) && defined(__GLIBC__)
        struct mallinfo mem=mallinfo();
        double memd=mem.arena+mem.hblkhd;
        mode_s +=xcas::print_DOUBLE_(memd/1048576);
diff --git a/srcpkgs/giac/template b/srcpkgs/giac/template
index ca95534498f2..f8d08ef9f749 100644
--- a/srcpkgs/giac/template
+++ b/srcpkgs/giac/template
@@ -1,9 +1,10 @@
 # Template file for 'giac'
 pkgname=giac
-version=1.5.0.87
-revision=4
+version=1.7.0.1
+revision=1
 wrksrc="giac-${version%.*}"
 build_style=gnu-configure
+configure_args="--disable-micropy --disable-quickjs"
 makedepends="fltk-devel gmp-devel gsl-devel lapack-devel
  libjpeg-turbo-devel libpng-devel readline-devel mpfr-devel pari-devel"
 depends="desktop-file-utils hicolor-icon-theme"
@@ -12,7 +13,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="https://www-fourier.ujf-grenoble.fr/~parisse/giac.html"
 distfiles="https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/giac_${version%.*}-${version##*.}.tar.gz"
-checksum=bbd6f0aafe373de3c9ed53d21878224e847359fdd9a7cdf9e9096e7c960f10b4
+checksum=385d4192f4217c0edd5884a02761a6d29f63fba50d6628c0775951a1be322269
 
 # need more than 4*65536 stack, see try_parse() in gen.cc line 11812
 LDFLAGS="-Wl,-z,stack-size=2097152"

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

* Re: pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
                   ` (15 preceding siblings ...)
  2021-03-28 10:10 ` [PR PATCH] [Updated] " dkwo
@ 2021-03-28 10:11 ` dkwo
  2021-03-28 14:23 ` tornaria
                   ` (8 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dkwo @ 2021-03-28 10:11 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/29635#issuecomment-808875418

Comment:
@tornaria Thanks, I'll be fine doing as you propose. Also, adding those packages would be great.
@ericonr I made changes, but feel free to close this if we decide to do otherwise.
My reason was that in sage-9.3.beta9 I get
```
cat build/pkgs/pari/spkg-configure.m4 | grep pthread
                     AC_MSG_CHECKING([whether pari is configured with pthreads])
                        [[return strcmp(PARI_MT_ENGINE, "pthread") != 0]])],
```

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

* Re: pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
                   ` (16 preceding siblings ...)
  2021-03-28 10:11 ` dkwo
@ 2021-03-28 14:23 ` tornaria
  2021-03-28 19:15 ` [wip] " dkwo
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: tornaria @ 2021-03-28 14:23 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/29635#issuecomment-808903869

Comment:
> @tornaria Thanks, I'll be fine doing as you propose. Also, adding those packages would be great.
> @ericonr I made changes, but feel free to close this if we decide to do otherwise.
> My reason was that in sage-9.3.beta9 I get
> 
> ```
> cat build/pkgs/pari/spkg-configure.m4 | grep pthread
>                      AC_MSG_CHECKING([whether pari is configured with pthreads])
>                         [[return strcmp(PARI_MT_ENGINE, "pthread") != 0]])],
> ```
Thanks for pointing this out, I had missed it. This was introduced in sage-9.3-beta9 and there is no reason given. I created https://trac.sagemath.org/ticket/31572 about it.

For the moment we can't use system pari because 2.13 is not supported in sagemath (yet), so I would say leave it single thread by default for now. We can figure out how to proceed once the dust settles on that sagemath ticket and pari-2.13 gets supported (it seems not for sage-9.3, unfortunately).

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

* Re: [wip] pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
                   ` (17 preceding siblings ...)
  2021-03-28 14:23 ` tornaria
@ 2021-03-28 19:15 ` dkwo
  2021-04-07 12:59 ` dkwo
                   ` (6 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dkwo @ 2021-03-28 19:15 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/29635#issuecomment-808944917

Comment:
> We can figure out how to proceed once the dust settles on that sagemath ticket and pari-2.13 gets supported (it seems not for sage-9.3, unfortunately).

Sounds good.
I changed title to wip, but feel free to close it.

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

* Re: [wip] pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
                   ` (18 preceding siblings ...)
  2021-03-28 19:15 ` [wip] " dkwo
@ 2021-04-07 12:59 ` dkwo
  2021-05-06 18:17 ` [PR PATCH] [Closed]: " dkwo
                   ` (5 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dkwo @ 2021-04-07 12:59 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/29635#issuecomment-814892894

Comment:
Note to self: new math packages (lcalc, eclib) will need revbump; checkdepends for pari.

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

* Re: [PR PATCH] [Closed]: [wip] pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
                   ` (19 preceding siblings ...)
  2021-04-07 12:59 ` dkwo
@ 2021-05-06 18:17 ` dkwo
  2021-08-17 19:06 ` tornaria
                   ` (4 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dkwo @ 2021-05-06 18:17 UTC (permalink / raw)
  To: ml

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

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

[wip] pari: add config options
https://github.com/void-linux/void-packages/pull/29635

Description:
This is such that pari is usable when building sagemath, which requires pthread.

Note: pthread also sets --enable-tls (build the thread-safe version of the library). This tends to slow down the shared library libpari.so by about 25%, so it is suggested to use the static library libpari.a instead. How do I do that?
Arch Linux has `export CFLAGS+=' -flto'`, Alpine has `export CFLAGS="$CFLAGS -flto" # reduce speed losses under pthread`.

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

* Re: [wip] pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
                   ` (20 preceding siblings ...)
  2021-05-06 18:17 ` [PR PATCH] [Closed]: " dkwo
@ 2021-08-17 19:06 ` tornaria
  2021-08-17 19:42 ` ericonr
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: tornaria @ 2021-08-17 19:06 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/29635#issuecomment-900559013

Comment:
I think this is superseded by #32453 (already merged).

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

* Re: [wip] pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
                   ` (21 preceding siblings ...)
  2021-08-17 19:06 ` tornaria
@ 2021-08-17 19:42 ` ericonr
  2021-08-17 21:41 ` tornaria
                   ` (2 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: ericonr @ 2021-08-17 19:42 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/29635#issuecomment-900580293

Comment:
@dkwo are you still interested in the `giac` fixes?

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

* Re: [wip] pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
                   ` (22 preceding siblings ...)
  2021-08-17 19:42 ` ericonr
@ 2021-08-17 21:41 ` tornaria
  2021-08-18  9:15 ` dkwo
  2021-08-18  9:15 ` [PR PATCH] [Closed]: " dkwo
  25 siblings, 0 replies; 27+ messages in thread
From: tornaria @ 2021-08-17 21:41 UTC (permalink / raw)
  To: ml

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/29635#issuecomment-900650708

Comment:
> @dkwo are you still interested in the `giac` fixes?

See #32558 which contains the giac update.

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

* Re: [wip] pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
                   ` (23 preceding siblings ...)
  2021-08-17 21:41 ` tornaria
@ 2021-08-18  9:15 ` dkwo
  2021-08-18  9:15 ` [PR PATCH] [Closed]: " dkwo
  25 siblings, 0 replies; 27+ messages in thread
From: dkwo @ 2021-08-18  9:15 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/29635#issuecomment-900954899

Comment:
Superseded by the two mentioned PRs, closing.

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

* Re: [PR PATCH] [Closed]: [wip] pari: add config options
  2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
                   ` (24 preceding siblings ...)
  2021-08-18  9:15 ` dkwo
@ 2021-08-18  9:15 ` dkwo
  25 siblings, 0 replies; 27+ messages in thread
From: dkwo @ 2021-08-18  9:15 UTC (permalink / raw)
  To: ml

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

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

[wip] pari: add config options
https://github.com/void-linux/void-packages/pull/29635

Description:
This is such that pari is usable when building sagemath, which requires pthread.

Note: pthread also sets --enable-tls (build the thread-safe version of the library). This tends to slow down the shared library libpari.so by about 25%, so it is suggested to use the static library libpari.a instead. How do I do that?
Arch Linux has `export CFLAGS+=' -flto'`, Alpine has `export CFLAGS="$CFLAGS -flto" # reduce speed losses under pthread`.

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

end of thread, other threads:[~2021-08-18  9:15 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-20 17:20 [PR PATCH] pari: add config options dkwo
2021-03-22  9:31 ` [PR PATCH] [Updated] " dkwo
2021-03-25  3:11 ` [wip] " ericonr
2021-03-25 20:21 ` [PR PATCH] [Updated] " dkwo
2021-03-25 20:23 ` dkwo
2021-03-26  9:51 ` dkwo
2021-03-26 16:30 ` ericonr
2021-03-26 17:09 ` dkwo
2021-03-26 17:42 ` ericonr
2021-03-27 14:53 ` [PR PATCH] [Updated] " dkwo
2021-03-27 14:58 ` dkwo
2021-03-27 19:39 ` tornaria
2021-03-27 22:28 ` tornaria
2021-03-27 22:38 ` tornaria
2021-03-28  6:12 ` ericonr
2021-03-28  6:13 ` ericonr
2021-03-28 10:10 ` [PR PATCH] [Updated] " dkwo
2021-03-28 10:11 ` dkwo
2021-03-28 14:23 ` tornaria
2021-03-28 19:15 ` [wip] " dkwo
2021-04-07 12:59 ` dkwo
2021-05-06 18:17 ` [PR PATCH] [Closed]: " dkwo
2021-08-17 19:06 ` tornaria
2021-08-17 19:42 ` ericonr
2021-08-17 21:41 ` tornaria
2021-08-18  9:15 ` dkwo
2021-08-18  9:15 ` [PR PATCH] [Closed]: " dkwo

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