Your message dated Mon, 26 Sep 2022 08:47:20 +0000
with message-id <e1ocjlo-00f372...@fasolo.debian.org>
and subject line Bug#1001262: fixed in monado 21.0.0~dfsg1-2.1
has caused the Debian Bug report #1001262,
regarding monado: FTBFS with glibc 2.34
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
1001262: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1001262
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: monado
Version: 21.0.0~dfsg1-2
Severity: important
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu jammy ubuntu-patch
Dear maintainers,
In Ubuntu, we have upgraded to glibc 2.34. As a result, monado now fails to
build because MINSIGSTKSZ is no longer a constant but expands to a runtime
call to sysconf(), and the monado source assumes it's a constant.
I found an upstream patch for this in Catch, which is where the code in
monado was copied from, and have adapted it to apply to the monado source.
The attached patch has been uploaded to Ubuntu and fixes the build failure
there.
This is obviously not critical yet for Debian, which still only has glibc
2.33 in experimental.
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer https://www.debian.org/
slanga...@ubuntu.com vor...@debian.org
diff -Nru monado-21.0.0~dfsg1/debian/patches/glibc-2.34.patch
monado-21.0.0~dfsg1/debian/patches/glibc-2.34.patch
--- monado-21.0.0~dfsg1/debian/patches/glibc-2.34.patch 1969-12-31
16:00:00.000000000 -0800
+++ monado-21.0.0~dfsg1/debian/patches/glibc-2.34.patch 2021-12-06
23:38:35.000000000 -0800
@@ -0,0 +1,297 @@
+Description: compatibility with glibc 2.34
+ Taken from catch2 upstream, commit id
+ c0d0a50bdb2ae2f749443c0386c2b25379bdbf76 in
+ https://github.com/catchorg/Catch2.
+Author: Steve Langasek <steve.langa...@ubuntu.com>
+Last-Update: 2021-12-06
+
+Index: monado-21.0.0~dfsg1/src/external/Catch2/catch/catch.hpp
+===================================================================
+--- monado-21.0.0~dfsg1.orig/src/external/Catch2/catch/catch.hpp
++++ monado-21.0.0~dfsg1/src/external/Catch2/catch/catch.hpp
+@@ -7986,56 +7986,60 @@
+ #endif // defined(CATCH_PLATFORM_WINDOWS)
+
+ // end catch_windows_h_proxy.h
+-#if defined( CATCH_CONFIG_WINDOWS_SEH )
++#include <cassert>
+
+ namespace Catch {
+
+- struct FatalConditionHandler {
+-
+- static LONG CALLBACK handleVectoredException(PEXCEPTION_POINTERS
ExceptionInfo);
++ /**
++ * Wrapper for platform-specific fatal error (signals/SEH) handlers
++ *
++ * Tries to be cooperative with other handlers, and not step over
++ * other handlers. This means that unknown structured exceptions
++ * are passed on, previous signal handlers are called, and so on.
++ *
++ * Can only be instantiated once, and assumes that once a signal
++ * is caught, the binary will end up terminating. Thus, there
++ */
++ class FatalConditionHandler {
++ bool m_started = false;
++
++ // Install/disengage implementation for specific platform.
++ // Should be if-defed to work on current platform, can assume
++ // engage-disengage 1:1 pairing.
++ void engage_platform();
++ void disengage_platform();
++ public:
++ // Should also have platform-specific implementations as needed
+ FatalConditionHandler();
+- static void reset();
+ ~FatalConditionHandler();
+
+- private:
+- static bool isSet;
+- static ULONG guaranteeSize;
+- static PVOID exceptionHandlerHandle;
+- };
+-
+-} // namespace Catch
+-
+-#elif defined ( CATCH_CONFIG_POSIX_SIGNALS )
+-
+-#include <signal.h>
+-
+-namespace Catch {
+-
+- struct FatalConditionHandler {
+-
+- static bool isSet;
+- static struct sigaction oldSigActions[];
+- static stack_t oldSigStack;
+- static char altStackMem[];
+-
+- static void handleSignal( int sig );
++ void engage() {
++ assert(!m_started && "Handler cannot be installed twice.");
++ m_started = true;
++ engage_platform();
++ }
+
+- FatalConditionHandler();
+- ~FatalConditionHandler();
+- static void reset();
++ void disengage() {
++ assert(m_started && "Handler cannot be uninstalled without being
installed first");
++ m_started = false;
++ disengage_platform();
++ }
+ };
+
+-} // namespace Catch
+-
+-#else
+-
+-namespace Catch {
+- struct FatalConditionHandler {
+- void reset();
++ //! Simple RAII guard for (dis)engaging the FatalConditionHandler
++ class FatalConditionHandlerGuard {
++ FatalConditionHandler* m_handler;
++ public:
++ FatalConditionHandlerGuard(FatalConditionHandler* handler):
++ m_handler(handler) {
++ m_handler->engage();
++ }
++ ~FatalConditionHandlerGuard() {
++ m_handler->disengage();
++ }
+ };
+-}
+
+-#endif
++} // end namespace Catch
+
+ // end catch_fatal_condition.h
+ #include <string>
+@@ -8160,6 +8164,7 @@
+ AssertionInfo m_lastAssertionInfo;
+ std::vector<SectionEndInfo> m_unfinishedSections;
+ std::vector<ITracker*> m_activeSections;
++ FatalConditionHandler m_fatalConditionhandler;
+ TrackerContext m_trackerContext;
+ bool m_lastAssertionPassed = false;
+ bool m_shouldReportUnexpected = true;
+@@ -10707,19 +10712,19 @@
+ // end catch_exception_translator_registry.cpp
+ // start catch_fatal_condition.cpp
+
+-#if defined(__GNUC__)
+-# pragma GCC diagnostic push
+-# pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+-#endif
+-
+ #if defined( CATCH_CONFIG_WINDOWS_SEH ) || defined(
CATCH_CONFIG_POSIX_SIGNALS )
+
+ namespace {
+- // Report the error condition
++ //! Signals fatal error message to the run context
+ void reportFatal( char const * const message ) {
+
Catch::getCurrentContext().getResultCapture()->handleFatalErrorCondition(
message );
+ }
+-}
++
++ //! Minimal size Catch2 needs for its own fatal error handling.
++ //! Picked empirically, so it might not be sufficient on all
++ //! platforms, and for all configurations.
++ constexpr std::size_t minStackSizeForErrors = 32 * 1024;
++} // end unnamed namespace
+
+ #endif // signals/SEH handling
+
+@@ -10770,10 +10775,6 @@
+ }
+ }
+
+- FatalConditionHandler::~FatalConditionHandler() {
+- reset();
+- }
+-
+ bool FatalConditionHandler::isSet = false;
+ ULONG FatalConditionHandler::guaranteeSize = 0;
+ PVOID FatalConditionHandler::exceptionHandlerHandle = nullptr;
+@@ -10782,6 +10783,8 @@
+
+ #elif defined( CATCH_CONFIG_POSIX_SIGNALS )
+
++#include <signal.h>
++
+ namespace Catch {
+
+ struct SignalDefs {
+@@ -10789,10 +10792,6 @@
+ const char* name;
+ };
+
+- // 32kb for the alternate stack seems to be sufficient. However, this
value
+- // is experimentally determined, so that's not guaranteed.
+- static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768
: MINSIGSTKSZ;
+-
+ static SignalDefs signalDefs[] = {
+ { SIGINT, "SIGINT - Terminal interrupt signal" },
+ { SIGILL, "SIGILL - Illegal instruction signal" },
+@@ -10802,7 +10801,32 @@
+ { SIGABRT, "SIGABRT - Abort (abnormal termination) signal" }
+ };
+
+- void FatalConditionHandler::handleSignal( int sig ) {
++// Older GCCs trigger -Wmissing-field-initializers for T foo = {}
++// which is zero initialization, but not explicit. We want to avoid
++// that.
++#if defined(__GNUC__)
++# pragma GCC diagnostic push
++# pragma GCC diagnostic ignored "-Wmissing-field-initializers"
++#endif
++
++ static char* altStackMem = nullptr;
++ static std::size_t altStackSize = 0;
++ static stack_t oldSigStack{};
++ static struct sigaction oldSigActions[sizeof(signalDefs) /
sizeof(SignalDefs)]{};
++
++ static void restorePreviousSignalHandlers() {
++ // We set signal handlers back to the previous ones. Hopefully
++ // nobody overwrote them in the meantime, and doesn't expect
++ // their signal handlers to live past ours given that they
++ // installed them after ours..
++ for (std::size_t i = 0; i < sizeof(signalDefs) / sizeof(SignalDefs);
++i) {
++ sigaction(signalDefs[i].id, &oldSigActions[i], nullptr);
++ }
++ // Return the old stack
++ sigaltstack(&oldSigStack, nullptr);
++ }
++
++ static void handleSignal( int sig ) {
+ char const * name = "<unknown signal>";
+ for (auto const& def : signalDefs) {
+ if (sig == def.id) {
+@@ -10810,16 +10834,33 @@
+ break;
+ }
+ }
+- reset();
+- reportFatal(name);
++ // We need to restore previous signal handlers and let them do
++ // their thing, so that the users can have the debugger break
++ // when a signal is raised, and so on.
++ restorePreviousSignalHandlers();
++ reportFatal( name );
+ raise( sig );
+ }
+
+ FatalConditionHandler::FatalConditionHandler() {
+- isSet = true;
++ assert(!altStackMem && "Cannot initialize POSIX signal handler when
one already exists");
++ if (altStackSize == 0) {
++ altStackSize = std::max(static_cast<size_t>(SIGSTKSZ),
minStackSizeForErrors);
++ }
++ altStackMem = new char[altStackSize]();
++ }
++
++ FatalConditionHandler::~FatalConditionHandler() {
++ delete[] altStackMem;
++ // We signal that another instance can be constructed by zeroing
++ // out the pointer.
++ altStackMem = nullptr;
++ }
++
++ void FatalConditionHandler::engage_platform() {
+ stack_t sigStack;
+ sigStack.ss_sp = altStackMem;
+- sigStack.ss_size = sigStackSize;
++ sigStack.ss_size = altStackSize;
+ sigStack.ss_flags = 0;
+ sigaltstack(&sigStack, &oldSigStack);
+ struct sigaction sa = { };
+@@ -10831,29 +10872,16 @@
+ }
+ }
+
+- FatalConditionHandler::~FatalConditionHandler() {
+- reset();
+- }
+-
+- void FatalConditionHandler::reset() {
+- if( isSet ) {
+- // Set signals back to previous values -- hopefully nobody
overwrote them in the meantime
+- for( std::size_t i = 0; i <
sizeof(signalDefs)/sizeof(SignalDefs); ++i ) {
+- sigaction(signalDefs[i].id, &oldSigActions[i], nullptr);
+- }
+- // Return the old stack
+- sigaltstack(&oldSigStack, nullptr);
+- isSet = false;
+- }
+- }
++#if defined(__GNUC__)
++# pragma GCC diagnostic pop
++#endif
+
+- bool FatalConditionHandler::isSet = false;
+- struct sigaction
FatalConditionHandler::oldSigActions[sizeof(signalDefs)/sizeof(SignalDefs)] =
{};
+- stack_t FatalConditionHandler::oldSigStack = {};
+- char FatalConditionHandler::altStackMem[sigStackSize] = {};
+
+-} // namespace Catch
++ void FatalConditionHandler::disengage_platform() {
++ restorePreviousSignalHandlers();
++ }
+
++} // end namespace Catch
+ #else
+
+ namespace Catch {
+@@ -12846,9 +12874,8 @@
+ }
+
+ void RunContext::invokeActiveTestCase() {
+- FatalConditionHandler fatalConditionHandler; // Handle signals
++ FatalConditionHandlerGuard _(&m_fatalConditionhandler);
+ m_activeTestCase->invoke();
+- fatalConditionHandler.reset();
+ }
+
+ void RunContext::handleUnfinishedSections() {
diff -Nru monado-21.0.0~dfsg1/debian/patches/series
monado-21.0.0~dfsg1/debian/patches/series
--- monado-21.0.0~dfsg1/debian/patches/series 2021-10-26 14:59:16.000000000
-0700
+++ monado-21.0.0~dfsg1/debian/patches/series 2021-12-06 23:38:29.000000000
-0800
@@ -1,2 +1,3 @@
0001-Allow-overriding-package-version.patch
0002-comp-Fix-warning-after-Vulkan-1.2.174-VK_NULL_HANDLE.patch
+glibc-2.34.patch
--- End Message ---
--- Begin Message ---
Source: monado
Source-Version: 21.0.0~dfsg1-2.1
Done: Adrian Bunk <b...@debian.org>
We believe that the bug you reported is fixed in the latest version of
monado, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1001...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Adrian Bunk <b...@debian.org> (supplier of updated monado package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Mon, 12 Sep 2022 10:16:51 +0300
Source: monado
Architecture: source
Version: 21.0.0~dfsg1-2.1
Distribution: unstable
Urgency: medium
Maintainer: Ryan Pavlik <r...@ryanpavlik.com>
Changed-By: Adrian Bunk <b...@debian.org>
Closes: 1001262
Changes:
monado (21.0.0~dfsg1-2.1) unstable; urgency=medium
.
* Non-maintainer upload.
* Add upstream fix for FTBFS with glibc 2.34. (Closes: #1001262)
Checksums-Sha1:
d523cf207284e429ee3b65044593060128e01794 2716 monado_21.0.0~dfsg1-2.1.dsc
de48e9d3c355315ea51e0881cbfaa1148446b776 29096
monado_21.0.0~dfsg1-2.1.debian.tar.xz
Checksums-Sha256:
cc41c326fd33a468511a00f710a60fd77341ec36083d764730f6434e161d567e 2716
monado_21.0.0~dfsg1-2.1.dsc
f4f52183e7800ab501e601205aff3cc3c82a543723804479bdc7340420ad5a1b 29096
monado_21.0.0~dfsg1-2.1.debian.tar.xz
Files:
c397a9c4d7ed52e7343f50cfb54bf2d9 2716 libs optional monado_21.0.0~dfsg1-2.1.dsc
70123bcfee64abcd6fdea9be03e11136 29096 libs optional
monado_21.0.0~dfsg1-2.1.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEOvp1f6xuoR0v9F3wiNJCh6LYmLEFAmMe35YACgkQiNJCh6LY
mLHnCQ//X/4enSWFE/To7wXZM9f5DvAjyi6yQeP9g8TbJ3UAZmZZHsuaWI4lNgAF
FOv97t+MF8D09UPo5MYkWr8kKCzwfIknipQ952/daaIVAxi/C8MsmlOKYkDx6cos
68C7/UyVvPVY+RBJ7kT8HznTTx+BQmp3eGKmGE38hExKsQU7rCpZUq7/Moolhb7s
5aISQg+lG5fIqPz4HimNQlLWSf+tBlmUAtKGOweo72d0RWf0+qj63eWyrz+kQh8E
kkpnkjhkJp2ve72iO+IuCSjQn3b3BJUvLbEu56Uwqs49AnEIXIWQpoc6rotXuJNz
Kx+9/IUj6gHJ9lKxUM7u/7NJj1kp5hwGnlSdFsk8qencaPdQEyjOv0V5aK/+iUZv
mgxCcHHYw6w2YQp9hn0j5gA0yzT2kmW0sl0cmbWMzbWFSCfMWm9U5vqyQG/KVvvh
HMhYJwQaHQftCe1pgwwpBgr4/Favu+HxeiZLig+ksMOdL5c9lgSzUxWqFW/6e7v4
NiNcUkGo4YcNH8ykZ+UZMGmKU63JQ4PZ9zMtzpTGMUWZzlfomWKA4RDr8x6gdgla
AL6CxlfvC7llorCz/wfdobhn35DzzKJnZG3BHKCNb7peVMU/cF62yoKikSxCnJxC
3ZDrMzcHlrnbuzq+bHjbM1hTmaTBV9n/ktzu6ecofjtACYQA6EE=
=dCLi
-----END PGP SIGNATURE-----
--- End Message ---