I have something like this in /etc/portage/package.use : ``` app-alternatives/tar -gnu libarchive app-alternatives/cpio -gnu libarchive ``` from build.log : ``` x86_64-pc-linux-gnu-gcc -Wp,-MMD,fs/xfs/libxfs/.xfs_types.o.d -nostdinc -I/var/tmp/portage/sys-kernel/gentoo-kernel-6.6.74/work/linux-6.6/arch/x86/include -I./arch/x86/include/generated -I/var/tmp/portage/sys-kernel/gentoo-kernel-6.6.74/work/linux-6.6/include -I./include -I/var/tmp/portage/sys-kernel/gentoo-kernel-6.6.74/work/linux-6.6/arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I/var/tmp/portage/sys-kernel/gentoo-kernel-6.6.74/work/linux-6.6/include/uapi -I./include/generated/uapi -include /var/tmp/portage/sys-kernel/gentoo-kernel-6.6.74/work/linux-6.6/include/linux/compiler-version.h -include /var/tmp/portage/sys-kernel/gentoo-kernel-6.6.74/work/linux-6.6/include/linux/kconfig.h -include /var/tmp/portage/sys-kernel/gentoo-kernel-6.6.74/work/linux-6.6/include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=/var/tmp/portage/sys-kernel/gentoo-kernel-6.6.74/work/linux-6.6/= -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=branch -fno-jump-tables -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -mindirect-branch-cs-prefix -mfunction-return=thunk-extern -fno-jump-tables -mharden-sls=all -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector-strong -ftrivial-auto-var-init=zero -fno-stack-clash-protection -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -falign-functions=16 -fstrict-flex-arrays=3 -fno-strict-overflow -fno-stack-check -fconserve-stack -Wall -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -Wno-frame-address -Wno-address-of-packed-member -Wframe-larger-than=2048 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-restrict -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-overflow -Wno-stringop-truncation -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -g -fplugin=./scripts/gcc-plugins/latent_entropy_plugin.so -fplugin=./scripts/gcc-plugins/stackleak_plugin.so -DLATENT_ENTROPY_PLUGIN -DSTACKLEAK_PLUGIN -fplugin-arg-stackleak_plugin-track-min-size=100 -fplugin-arg-stackleak_plugin-arch=x86 -I /var/tmp/portage/sys-kernel/gentoo-kernel-6.6.74/work/linux-6.6/fs/xfs -I /var/tmp/portage/sys-kernel/gentoo-kernel-6.6.74/work/linux-6.6/fs/xfs/libxfs -fsanitize=bounds-strict -I /var/tmp/portage/sys-kernel/gentoo-kernel-6.6.74/work/linux-6.6/fs/xfs -I ./fs/xfs -DKBUILD_MODFILE='"fs/xfs/xfs"' -DKBUILD_BASENAME='"xfs_types"' -DKBUILD_MODNAME='"xfs"' -D__KBUILD_MODNAME=kmod_xfs -c -o fs/xfs/libxfs/xfs_types.o /var/tmp/portage/sys-kernel/gentoo-kernel-6.6.74/work/linux-6.6/fs/xfs/libxfs/xfs_types.c tar: Option --sort=name is not supported Usage: List: tar -tf <archive-filename> Extract: tar -xf <archive-filename> Create: tar -cf <archive-filename> [filenames...] Help: tar --help make[4]: *** [/var/tmp/portage/sys-kernel/gentoo-kernel-6.6.74/work/linux-6.6/kernel/Makefile:159: kernel/kheaders_data.tar.xz] Error 1 make[3]: *** [/var/tmp/portage/sys-kernel/gentoo-kernel-6.6.74/work/linux-6.6/scripts/Makefile.build:480: kernel] Error 2 make[3]: *** Waiting for unfinished jobs.... ```
Created attachment 920458 [details] build.log in `xz -9`
Created attachment 920459 [details] emerge --info
Looks like kernel/gen_kheaders.sh calls "tar --sort=name". That's an upstream issue. I guess we could BDEPEND on app-alternatives/tar[gnu].
In the past, we tried to get them to change to some ${TAR} variable but I think the patch kept getting forgotten.