[LTP] [PATCH 3/3] ci/debian.sh: Make dependencies really minimal

Petr Vorel pvorel@suse.cz
Fri Aug 23 13:42:17 CEST 2024


Remove most of the optional library headers.

LTP should be compilable without linux-libc-dev, but we expect kernel
headers.

libc6-dev and libtirpc-dev are hard dependencies for gcc toolchain.
Removing libtirpc-dev removes build-essential and that in the end
removes libc6-dev, which has /usr/lib/x86_64-linux-gnu/crti.o and
/usr/lib/x86_64-linux-gnu/Scrt1.o. That would cause toolchain to fail:

    configure:4088: gcc -Wformat -Werror=format-security \
	-Werror=implicit-function-declaration -Werror=return-type \
	-fno-common   conftest.c  >&5
    /usr/bin/ld: cannot find Scrt1.o: No such file or directory
    /usr/bin/ld: cannot find crti.o: No such file or directory
    collect2: error: ld returned 1 exit status

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 ci/debian.sh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/ci/debian.sh b/ci/debian.sh
index 68cf1509fc..fc1c1b3ec6 100755
--- a/ci/debian.sh
+++ b/ci/debian.sh
@@ -14,8 +14,9 @@ export DEBIAN_FRONTEND="noninteractive"
 install="apt install -y --no-install-recommends"
 remove="apt remove -y"
 
+# libc6-dev and libtirpc-dev are hard dependencies for gcc toolchain
+# LTP should be compilable without linux-libc-dev, but we expect kernel headers.
 pkg_minimal="
-	acl-dev
 	autoconf
 	automake
 	build-essential
@@ -26,8 +27,6 @@ pkg_minimal="
 	git
 	iproute2
 	libc6-dev
-	libjson-perl
-	libmnl-dev
 	libtirpc-dev
 	linux-libc-dev
 	lsb-release
@@ -35,14 +34,17 @@ pkg_minimal="
 "
 
 pkg_nonessential="
+	acl-dev
 	asciidoc-base
 	asciidoc-dblatex
 	asciidoctor
 	libacl1-dev
 	libaio-dev
 	libcap-dev
+	libjson-perl
 	libkeyutils-dev
 	libnuma-dev
+	libmnl-dev
 	libselinux1-dev
 	libsepol-dev
 	libssl-dev
-- 
2.45.2



More information about the ltp mailing list