[Debian-med-packaging] Bug#1014627: maude: FTBFS with glibc 2.34
Steve Langasek
steve.langasek at canonical.com
Sat Jul 9 06:55:37 BST 2022
Package: maude
Version: 3.2-1
Severity: serious
Tags: patch
Justification: ftbfs
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu kinetic ubuntu-patch
Dear maintainers,
In Ubuntu, the maude package fails to build from source because it tries to
use SIGSTKSZ as a constant, and as of glibc 2.34 this is now defined as a
runtime call to sysconf() instead.
[...]
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../src/Utility -I../../src/Temporal -I../../src/Interface -I../../src/Core -I../../src/Variable -I../../src/FullCompiler -I../../src/Higher -I../../src/CUI_Theory -I../../src/S_Theory -I../../src/NA_Theory -I../../src/FreeTheory -I../../src/ObjectSystem -I../../src/Mixfix -I../../src/BuiltIn -I../../src/Parser -I../../src/IO_Stuff -I../../src/ACU_Persistent -I../../src/ACU_Theory -I../../src/AU_Persistent -I../../src/AU_Theory -I../../src/Meta -I../../src/3rdParty -I../../src/FullCompiler -I../../src/StrategyLanguage -I../../src/SMT -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fpermissive -c -o libmixfix_a-userLevelRewritingContext.o `test -f 'userLevelRewritingContext.cc' || echo './'`userLevelRewritingContext.cc
In file included from userLevelRewritingContext.cc:75:
interact.cc: In static member function ‘static void UserLevelRewritingContext::setHandlers(bool)’:
interact.cc:120:15: error: storage size of ‘altStack’ isn’t constant
120 | static char altStack[SIGSTKSZ];
| ^~~~~~~~
make[6]: *** [Makefile:1019: libmixfix_a-userLevelRewritingContext.o] Error 1
[...]
(https://launchpad.net/ubuntu/+source/maude/3.2-1/+build/23574061)
Debian currently only has glibc 2.34 in experimental, but at some point will
be updated, making this a critical build failure.
The attached patch has fixed the build failure for me. Please consider
applying in Debian.
Thanks,
--
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/
slangasek at ubuntu.com vorlon at debian.org
-------------- next part --------------
diff -Nru maude-3.2/debian/patches/glibc-2.34.patch maude-3.2/debian/patches/glibc-2.34.patch
--- maude-3.2/debian/patches/glibc-2.34.patch 1969-12-31 16:00:00.000000000 -0800
+++ maude-3.2/debian/patches/glibc-2.34.patch 2022-07-08 22:46:37.000000000 -0700
@@ -0,0 +1,24 @@
+Description: handle non-constant SIGSTKSZ
+ As of glibc 2.34, SIGSTKSZ is no longer a constant, but rather a runtime
+ call to sysconf(). Allocate our stack at runtime instead of at compile
+ time.
+Author: Steve Langasek <steve.langasek at ubuntu.com>
+Last-Update: 2022-07-08
+Forwarded: no
+
+Index: maude-3.2/src/Mixfix/interact.cc
+===================================================================
+--- maude-3.2.orig/src/Mixfix/interact.cc
++++ maude-3.2/src/Mixfix/interact.cc
+@@ -117,9 +117,9 @@
+ // Stack overflows are reported as SIGSEGV signals and so we need to use the
+ // libsigsegv library to heuristically distinguish the two conditions.
+ //
+- static char altStack[SIGSTKSZ];
++ static char *altStack = malloc(SIGSTKSZ);
+ sigsegv_install_handler(sigsegvHandler); // illegal memory access or stack overflow
+- stackoverflow_install_handler(stackOverflowHandler, altStack, sizeof(altStack));
++ stackoverflow_install_handler(stackOverflowHandler, altStack, SIGSTKSZ);
+ #else
+ //
+ // If we can't use the library we will will catch SIGSEGVs but not install
diff -Nru maude-3.2/debian/patches/series maude-3.2/debian/patches/series
--- maude-3.2/debian/patches/series 2022-02-19 12:29:38.000000000 -0800
+++ maude-3.2/debian/patches/series 2022-07-08 22:37:32.000000000 -0700
@@ -2,3 +2,4 @@
getinput-size_t.patch
strip-build-date.patch
skip_failing_test.patch
+glibc-2.34.patch
More information about the Debian-med-packaging
mailing list