error: call to non-‘constexpr’ function ‘long int sysconf(int)’FTBFS:

Bug #1951658 reported by Steve Langasek
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
segyio
Fix Released
Unknown
segyio (Debian)
Fix Released
Unknown
segyio (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

This code tries to use MINSIGSTKSZ as part of a constant expression, but in glibc 2.34
this now expands to a call to sysconf(), causing a build failure:

In file included from /usr/include/signal.h:328,
                 from /<<PKGBUILDDIR>>/external/catch2/catch/catch.hpp:4855,
                 from /<<PKGBUILDDIR>>/lib/test/testsuite.cpp:2:
/<<PKGBUILDDIR>>/external/catch2/catch/catch.hpp:7431:58: error: call to non-‘constexpr’ function ‘long int sysconf(int)’
 7431 | constexpr static std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
      | ^~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24,
                 from /usr/include/signal.h:328,
                 from /<<PKGBUILDDIR>>/external/catch2/catch/catch.hpp:4855,
                 from /<<PKGBUILDDIR>>/lib/test/testsuite.cpp:2:
/usr/include/unistd.h:640:17: note: ‘long int sysconf(int)’ declared here
  640 | extern long int sysconf (int __name) __THROW;
      | ^~~~~~~
In file included from /<<PKGBUILDDIR>>/lib/test/testsuite.cpp:2:
/<<PKGBUILDDIR>>/external/catch2/catch/catch.hpp:7490:45: error: size of array ‘altStackMem’ is not an integral constant-expression
 7490 | char FatalConditionHandler::altStackMem[sigStackSize] = {};
      | ^~~~~~~~~~~~

[...]

(https://launchpad.net/ubuntu/+source/segyio/1.8.3-1build5)

No fix for this is currently available in the upstream repository.

Steve Langasek (vorlon)
tags: added: ftbfs update-excuse
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

In Debian this also has a known python 3.10 issue filed as https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1000360

And it points out one of the root causes which is being out of date a lot.
1.9.8 version is current, but the 1.8.6 we have is ~2.5 years old.
=> https://github.com/equinor/segyio/tags

There is an NMU coming for python 3.10 as reported in Debian.
And it turns out Ginggs has a fix for the cpp issue already in https://launchpad.net/~ginggs/+archive/ubuntu/testing/+sourcepub/12858492/+listing-archive-extra

Next steps:
1. waiting for the NMU to sync
2. Ginggs to upload his fix
Future: waiting for 1.9.x

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

This build issue with glibc 2.34 was reported upstream so that we can one day drop the Delta
=> https://github.com/equinor/segyio/issues/520

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

But to be clear, this is an embedded source and the packaged catch2
already has a fix for
=> https://github.com/catchorg/Catch2/issues/2178
Which is the upstream issue for the "real upstream" of this code.

Changed in segyio:
status: Unknown → New
Changed in segyio (Debian):
status: Unknown → Fix Committed
Changed in segyio (Debian):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package segyio - 1.8.3-1.1ubuntu1

---------------
segyio (1.8.3-1.1ubuntu1) jammy; urgency=medium

  * Hardcode sigStackSize to 32768 to avoid test failure with glibc 2.34
    (LP: #1951658)

 -- Graham Inggs <email address hidden> Mon, 29 Nov 2021 06:43:10 +0000

Changed in segyio (Ubuntu):
status: New → Fix Released
Changed in segyio:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.