Debian Patches

Status for libmaus2/2.0.813+ds-7

Patch Description Author Forwarded Bugs Origin Last update
add-support-for-loong64.patch workaround for architectures with broken sysconf.c
Some architectures in glibc do not define the sysconf.c file, and using the
generic posix sysconf.c file to call the _SC_LEVEL1_DCACHE_LINESIZE variable
returns 0 by default, which leads to failure of the test in
loongarch, ia64, s390x and other architectures,

This patch reference lscpu code to read the data in coherency_line_size file
directly can fix the above error, and it passes the test on x86 and loongarch.
wuruilong <wuruilong@loongson.cn> yes debian
gcc-15.patch Fix build failure with gcc-15. This patch fixes the following type of build failures with gcc-15:
.
In file included from ./libmaus2/lz/Lz4DecoderBuffer.hpp:24,
from libmaus2/lz/Lz4DecoderBuffer.cpp:19:
./libmaus2/aio/InputStreamInstance.hpp:44:86: error: ‘uint64_t’ has not been declared
44 | static int getSymbolAtPosition(std::string const & filename, uint64_t const offset)
| ^~~~~~~~
./libmaus2/aio/InputStreamInstance.hpp:22:1: note: ‘uint64_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
21 | #include <libmaus2/aio/InputStreamPointerWrapper.hpp>
+++ |+#include <cstdint>
22 | #include <istream>
Étienne Mollier <emollier@debian.org> yes debian 2025-02-28
unlock-stdc++.patch unlock the standard C++ level. This patch drops passing the -std=c++17 option to the compiler. This
change is made necessary due to evolution in the atomics handling in
gcc-16 and increase strictness that translated into the build failure:
.
libtool: compile: x86_64-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -Wdate-time -D_FORTIFY_SOURCE=2 -msse2 -mssse3 -msse4.1 -mavx2 -std=c++17 -pthread -fopenmp -W -Wall -Wnon-virtual-dtor -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -std=c++17 -pthread -fopenmp -c libmaus2/lcs/AlignmentOneAgainstManyAVX2.cpp -o libmaus2/lcs/simd_align_256_la-AlignmentOneAgainstManyAVX2.o >/dev/null 2>&1
In file included from ./libmaus2/parallel/threadpool/ThreadPool.hpp:22,
from ./libmaus2/parallel/threadpool/input/InputThreadControl.hpp:21,
from ./libmaus2/parallel/threadpool/input/InputThreadTrivialReturnInterface.hpp:21,
from test/testThreadPoolRead.cpp:18:
/usr/include/c++/16/atomic: In instantiation of ‘struct std::atomic<std::shared_ptr<libmaus2::parallel::threadpool::ThreadWorkPackageData> >’:
./libmaus2/parallel/threadpool/ThreadWorkPackage.hpp:40:62: required from here
40 | libmaus2::util::atomic_shared_ptr<ThreadWorkPackageData> data;
| ^~~~
/usr/include/c++/16/atomic:215:21: error: static assertion failed: std::atomic requires a trivially copyable type
215 | static_assert(__is_trivially_copyable(_Tp),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
• ‘false’ evaluates to false
.
Newer standard C++ levels better handle this particular case
apparently.
Étienne Mollier <emollier@debian.org> no debian 2026-08-05
largefile-cppflags.patch make the large file flags found by AC_SYS_LARGEFILE apply to all objects. AC_SYS_LARGEFILE only records the option it found in
ac_cv_sys_largefile_opts, it does not add it to CPPFLAGS. The library
however builds some of its objects (libmaus2_posix, libmaus2_arch,
libmaus2_autoarray, ...) using per-target *_CPPFLAGS, which expand
@LIBMAUSCPPFLAGS@ but not the global $(CPPFLAGS) that automake passes
anyway only for targets without their own flags. On 32 bit
architectures this made off_t and hence the mangled name of
PosixFunctions::fstatSizeAndMode() differ between the definition and
its callers, so linking libmaus2 failed with an undefined reference to
PosixFunctions::fstatSizeAndMode(int, long long&, unsigned char*).
Adding the option to LIBMAUSCPPFLAGS makes every target agree on off_t
and also exports the flag to users of libmaus2.pc.
Andreas Tille <tille@debian.org> no debian 2026-10-30
cacheline-size-fallback.patch make the cache line size detection robust. add-support-for-loong64.patch replaced the sysconf(_SC_LEVEL1_DCACHE_LINESIZE)
call by reading /sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size
on Linux. That file does not exist in every environment and the patch also
read it using a "%d" conversion into a uint64_t. Both cases leave the value
at 0 (or produce a bogus number), and the aligned allocation functions in
AutoArray.hpp then call operator new(size, std::align_val_t{0}), which throws
std::bad_alloc. On architectures using the generic glibc sysconf() (arm64,
armhf, s390x, hppa, powerpc, ppc64, sparc64, alpha), this made testRank.sh
and testdnarank.sh abort with
.
AutoArray<unsigned long,alloc_type_memalign_cacheline> failed to allocate
1398102 elements (11184816 bytes)
.
The fix reads the file with the SCNu64 conversion, validates the result
(a non zero power of two), falls back to sysconf(_SC_LEVEL1_DCACHE_LINESIZE)
and finally to alignof(std::max_align_t), so that the value is always usable
as an alignment.
Andreas Tille <tille@debian.org> yes debian 2026-10-30

All known versions for source package 'libmaus2'

Links