Source: libzstd Version: 1.5.7+dfsg-4 Severity: important Tags: ftbfs patch upstream Justification: fails to build from source (but built successfully in the past) X-Debbugs-Cc: [email protected] User: [email protected] Usertags: amd64 User: [email protected] Usertags: glibc-2.44
Dear maintainer,
Starting with glibc 2.44-2, the GNU libc is built by default on amd64 with
--enable-cet=permissive. Unfortunately this causes libzstd to fail to
build from source. From my build log:
| zstd build completed
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccVaImSE.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccMyl8qq.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccF5PDsY.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccRxkBwL.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccbYORps.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccBLD2HJ.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccM1KIHd.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccgQO1yr.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccjSRHBF.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccArbcTY.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/cc3yXznM.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccBKy0af.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccGLjOi8.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/cc4RwlLp.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/cc8nsgmH.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/cc2fiD2p.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccdY6SzK.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccLn8slm.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/cc1zCaLJ.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccoyxur5.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccCTKZlM.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccWZz4Pl.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccWGsHx5.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/cccaUiuZ.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/cc42mUQK.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccIgInrB.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/cccAU31Z.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccdvtNzg.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccVqgNWG.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/cc3yYc7D.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/cc6YN8sm.o: error: missing IBT and
SHSTK properties
| /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ccZ08dJC.o: error: missing IBT and
SHSTK properties
| collect2: error: ld returned 1 exit status
| make[3]: *** [Makefile:257: zstd-small] Error 1
| make[3]: *** Waiting for unfinished jobs....
| make[3]: Leaving directory
'/build/reproducible-path/libzstd-1.5.7+dfsg/programs'
| make[2]: *** [Makefile:84: test] Error 2
| make[2]: Leaving directory '/build/reproducible-path/libzstd-1.5.7+dfsg'
| rm -fr -- /tmp/dh-xdg-rundir-wq8hT7rI
| dh_auto_test: error: make -j12 test returned exit code 2
| make[1]: *** [debian/rules:70: build] Error 25
| make[1]: Leaving directory '/build/reproducible-path/libzstd-1.5.7+dfsg'
| make: *** [debian/rules:36: binary] Error 2
| dpkg-buildpackage: error: debian/rules binary subprocess failed with exit
status 2
The full build log is attached to this mail.
After investigation, this is what happens:
- Since the GNU libc is built with "--enable-cet=permissive", and CFLAGS
contains "-fcf-protection" (through dpkg-buildflags), the libzstd
build system force LDFLAGS to contain "-z cet-report=error".
- The libzstd build system overrides CFLAGS when building zlib-small
with "-Os -Wl,-s". Note that it doesn't contain "-fcf-protection"
- During linking of zlib-small, due to the "-z cet-report=error", the
linker complains because the objects are built without
"-fcf-protection".
The following patch fixes the issue by adding the "-Os -Wl,-s" after the
existing CFLAGS. It already contains -O2, but the last option wins.
--- libzstd-1.5.7+dfsg.orig/programs/Makefile
+++ libzstd-1.5.7+dfsg/programs/Makefile
@@ -252,7 +252,7 @@ endif
## zstd-small: minimal target, supporting only zstd compression and
decompression. no bench. no legacy. no other format.
CLEAN += zstd-small zstd-frugal
-zstd-small: CFLAGS = -Os -Wl,-s
+zstd-small: CFLAGS += -Os -Wl,-s
zstd-frugal zstd-small: $(ZSTDLIB_CORE_SRC) zstdcli.c util.c timefn.c fileio.c
fileio_asyncio.c
$(CC) $(FLAGS) -DZSTD_NOBENCH -DZSTD_NODICT -DZSTD_NOTRACE
-UZSTD_LEGACY_SUPPORT -DZSTD_LEGACY_SUPPORT=0 $^ -o $@$(EXT)
Regards
Aurelien
libzstd_amd64-2026-10-05T19:24:48Z.build.gz
Description: application/gzip

