Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failures on recent glibc versions #65

Open
atheriel opened this issue May 30, 2022 · 1 comment
Open

Build failures on recent glibc versions #65

atheriel opened this issue May 30, 2022 · 1 comment
Labels
launcher Related to the launcher

Comments

@atheriel
Copy link
Contributor

atheriel commented May 30, 2022

Building on an Ubuntu 22.04-derived system (which has glibc 2.35) yields errors such as the following:

In file included from /usr/include/signal.h:328,
                 from /home/aaron/Work/rstudio-launcher-plugin-sdk/sdk/src/tests/catch/catch.hpp:7644,
                 from /home/aaron/Work/rstudio-launcher-plugin-sdk/sdk/src/tests/TestMain.hpp:24,
                 from /home/aaron/Work/rstudio-launcher-plugin-sdk/sdk/src/tests/TestMain.cpp:23:
/home/aaron/Work/rstudio-launcher-plugin-sdk/sdk/src/tests/catch/catch.hpp:10376:58: error: call to non-‘constexpr’ function ‘long int sysconf(int)’
10376 |     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 /home/aaron/Work/rstudio-launcher-plugin-sdk/sdk/src/tests/catch/catch.hpp:7644,
                 from /home/aaron/Work/rstudio-launcher-plugin-sdk/sdk/src/tests/TestMain.hpp:24,
                 from /home/aaron/Work/rstudio-launcher-plugin-sdk/sdk/src/tests/TestMain.cpp:23:
/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 /home/aaron/Work/rstudio-launcher-plugin-sdk/sdk/src/tests/TestMain.hpp:24,
                 from /home/aaron/Work/rstudio-launcher-plugin-sdk/sdk/src/tests/TestMain.cpp:23:
/home/aaron/Work/rstudio-launcher-plugin-sdk/sdk/src/tests/catch/catch.hpp:10435:45: error: size of array ‘altStackMem’ is not an integral constant-expression
10435 |     char FatalConditionHandler::altStackMem[sigStackSize] = {};
      |                                             ^~~~~~~~~~~~
In file included from /usr/include/signal.h:328,
                 from /home/aaron/Work/rstudio-launcher-plugin-sdk/sdk/src/tests/catch/catch.hpp:7644,
                 from /home/aaron/Work/rstudio-launcher-plugin-sdk/sdk/src/tests/TestMain.hpp:24,
                 from /home/aaron/Work/rstudio-launcher-plugin-sdk/sdk/src/tests/TestMain.cpp:23:

This appears to be related to a change made for glibc 2.34. According to their release notes:

Add _SC_MINSIGSTKSZ and _SC_SIGSTKSZ. When _SC_SIGSTKSZ_SOURCE or
_GNU_SOURCE are defined, MINSIGSTKSZ and SIGSTKSZ are no longer
constant on Linux. MINSIGSTKSZ is redefined to sysconf(_SC_MINSIGSTKSZ)
and SIGSTKSZ is redefined to sysconf (_SC_SIGSTKSZ).

We may have to fix this to support Ubuntu 22.04.

@atheriel
Copy link
Contributor Author

(Note: this affects only unit tests and can be worked around with cmake -DRLPS_UNIT_TESTS_DISABLED=1 ...)

@bschwedler bschwedler added the launcher Related to the launcher label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
launcher Related to the launcher
Projects
None yet
Development

No branches or pull requests

2 participants