From 44652d4a7fad1e80165552355fb1b700bd94c892 Mon Sep 17 00:00:00 2001 From: JunhongMao <134556118+JunhongMao@users.noreply.github.com> Date: Tue, 12 Nov 2024 12:35:28 -0500 Subject: [PATCH] To fix: redis-cli build broken on Debian/Bookworm (librdb use-after-free) (#20759) Fix https://github.com/sonic-net/sonic-buildimage/issues/20757 Why I did it To Fix the issue: redis-cli build broken on Debian/Bookworm (librdb use-after-free) #20757 How I did it This issue is a known open issue below: redis/librdb#55 According to Walter Doekes's solution, currently to work around it by adding -floto=auto compiler option. make -j$(SONIC_CONFIG_MAKE_JOBS) WARNS='-Wall -Wextra -pedantic -flto=auto' --- src/rdb-cli/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rdb-cli/Makefile b/src/rdb-cli/Makefile index b9aedad6f657..153c2bcfac22 100644 --- a/src/rdb-cli/Makefile +++ b/src/rdb-cli/Makefile @@ -8,7 +8,8 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : rm -rf ./librdb git clone https://github.com/redis/librdb.git pushd ./librdb/ - git checkout 2fdfc0c2bc914d643fe3f86e6715aeb843d8966e + git checkout tags/v1.0.0 git submodule update --init --recursive - make -j$(SONIC_CONFIG_MAKE_JOBS) + # Set WARNS=... to work around https://github.com/redis/librdb/issues/55 + make -j$(SONIC_CONFIG_MAKE_JOBS) WARNS='-Wall -Wextra -pedantic -flto=auto' mv bin/rdb-cli $(DEST)/