]> git.kaiwu.me - haproxy.git/commitdiff
BUILD: sym: Fix build on recent glibc
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 28 Oct 2026 16:05:19 +0000 (17:05 +0100)
committerOlivier Houchard <cognet@ci0.org>
Wed, 28 Oct 2026 15:54:16 +0000 (16:54 +0100)
With a recent glibc, as found on Ubuntu 26.04, with the default locale,
sort and comm do not always agree on the ordering of all characters,
notably punctuation characters, and comm will thus fail when reading the
output of sort, producing a warning, and prevent the minidebug section
from being created.
Just force them to use the C locale, where this is not a problem.

Makefile

index 6bb0ff353765909ec78f6a2f73002041ab6a245c..3b3109af526cdbb5ba32cfeef22189a2d68832f2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1107,7 +1107,7 @@ endif # non-empty target
 # implementations lack the long ones, and undefined symbols are told by their
 # type in awk instead of --defined-only, which these implementations lack too.
 define make_minidebug
-       $(call qinfo,  MINIDBG)cp -f $@ $@.noxz; \
+       $(call qinfo,  MINIDBG)LC_ALL=C; export LC_ALL; cp -f $@ $@.noxz; \
        if ! ( \
            $(NM) -D -P $@ | awk '$$2 != "U" && $$2 != "w" { print $$1 }' | sort > $@.dsyms && \
            $(NM) -P $@ | awk '$$2 == "T" || $$2 == "t" { print $$1 }' | sort > $@.fsyms && \