🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #4893

Bug#1154190: libpari-dev: pari.h uses sigjmp_buf, so it fails to compile with -std=c17

#4893
From: Tobias Hansen
Date: Tue, 17 Nov 2026 22:10
47 lines
3869 bytes
On 17/11/2026 21:32, Bill Allombert wrote:
> On Mon, Nov 16, 2026 at 09:28:23PM +0100, Bill Allombert wrote:
>> On Mon, Nov 16, 2026 at 07:37:22PM +0000, Tobias Hansen wrote:
>>> Package: libpari-dev
>>> Version: 2.19.1-1
>>> Severity: important
>>> Affects: src:sagemath
>>>
>>> Dear Maintainer,
>>>
>>> since 2.19.1-1, the public PARI headers cannot be compiled in strict ISO C
>>> mode (-std=c99/c11/c17), because they use the POSIX type sigjmp_buf, which
>>> glibc's <setjmp.h> only declares when POSIX features are enabled:
>> Hello Tobias,
>>
>> Note that using the PARI headers without __GNUC__ defined can lead to significant
>> performance loss since that disables inline assembly, so it is not something we
>> should encourage. I would consider building a Debian package this way to be a bug.
> However it seems that using -std=c17 does not actually disable __GNUC__ so this is
> not an issue here.
>
>> That aside, if you want to use -std=c17, I suggest you also add -D_POSIX_C_SOURCE
>> Probably this problem could be fixed by adding #define _POSIX_C_SOURCE in pari.h
> Indeed adding to pari.h the following fix the issue.
>
> #  ifndef _POSIX_C_SOURCE
> #    define _POSIX_C_SOURCE 1
> #  endif
>
> However, I am still unsure it is make sens to set -std=c17 without also setting _POSIX_C_SOURCE
> to something. Sure the C code can do it for you but then, why using -std=c17 in the first place ?
>
> For example from  feature_test_macros(7)
>
>         _POSIX_C_SOURCE
>                Defining this macro causes header files to expose definitions as follows:
>                •  The value 1 exposes definitions conforming to POSIX.1-1990 and ISO C (1990).
>
> Cheers,

Hi,

I don't know why sagemath uses -std=c17. Maybe they just didn't have a reason not to use it until now.

Best,

Tobias
Technical Details
Message-ID: <O0zxf-cxaW-21@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
References: <O0aIy-cjjs-15@gated-at.bofh.it> <O0buV-cjLO-7@gated-at.bofh.it> <O0aIy-cjjs-15@gated-at.bofh.it> <O0z4d-cwQC-7@gated-at.bofh.it> <O0aIy-cjjs-15@gated-at.bofh.it> <O0z4d-cwQC-7@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Tobias Hansen <thansen@debian.org>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1154190: libpari-dev: pari.h uses sigjmp_buf, so it fails to compile with -std=c17
Date: Tue, 17 Nov 2026 23:10:01 +0100
Message-ID: <O0zxf-cxaW-21@gated-at.bofh.it>
References: <O0aIy-cjjs-15@gated-at.bofh.it> <O0buV-cjLO-7@gated-at.bofh.it> <O0aIy-cjjs-15@gated-at.bofh.it> <O0z4d-cwQC-7@gated-at.bofh.it> <O0aIy-cjjs-15@gated-at.bofh.it> <O0z4d-cwQC-7@gated-at.bofh.it>
X-Original-To: Bill Allombert <ballombe@debian.org>, 1154190@bugs.debian.org
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Tue Nov 17 22:05:08 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.9
Reply-To: Tobias Hansen <thansen@debian.org>, 1154190@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: ballombe@debian.org
X-Debian-Pr-Message: followup 1154190
X-Debian-Pr-Package: libpari-dev
X-Debian-Pr-Source: pari
MIME-Version: 1.0
Content-Language: en-US
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2003206
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 47
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Tue, 17 Nov 2026 22:03:49 +0000
X-Original-Message-ID: <a1ec18fa-552d-4368-9a12-a11fc7cc417c@debian.org>
X-Original-References: <e33ee8c8-5ab3-4e1d-880d-e825581ab385@debian.org> <avtnZPFKG_YTPEve@seventeen> <e33ee8c8-5ab3-4e1d-880d-e825581ab385@debian.org> <avzH7DlezBwSs4ux@seventeen> <e33ee8c8-5ab3-4e1d-880d-e825581ab385@debian.org> <avzH7DlezBwSs4ux@seventeen>