debian/patches: Disable malloc if __morecore hook not available
Glibc 2.34 dropped support for __morecore hooks needed to implement
the hugepage-backed malloc in libhugetlbfs. As a result, libhugetlbfs
FTBFS. Based on discussions in upstream (libhugetlbfs) bug tracker[0],
bringing back the functionality in libhugetlbfs is going to require
significant effort (developing an alternate allocator).
An alternate solution is to use glibc 2.35, where support has been
added for a tunable ('GLIBC_TUNABLES=glibc.malloc.hugetlb=2') to
enable hugepage backed allocation.
In the meanwhile, apply a patch[1] to detect the absence of __morecore
and disable dependent functionality. Although not ideal, it allows the
rest of the features provided by libhugetlbfs to continue to be
available.
Closes: #1017324
[0] https://github.com/libhugetlbfs/libhugetlbfs/issues/52
[1] https://github.com/libhugetlbfs/libhugetlbfs/pull/63
parent
509ecee3
Please register or sign in to comment