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,
--
Bill. <[email protected]>
Imagine a large red swirl here.