163 | if (!IS_ALIGNED(disk_bytenr, 1 << 12)) | ^~~~~~~~~~ compsize.c:167:5: error: implicit declaration of function radix_tree_preload; did you mean radix_tree_preload_end? [-Wimplicit-function-declaration] 167 | radix_tree_preload(GFP_KERNEL); | ^~~~~~~~~~~~~~~~~~ | radix_tree_preload_end compsize.c:167:24: error: GFP_KERNEL undeclared (first use in this function); did you mean SI_KERNEL? 167 | radix_tree_preload(GFP_KERNEL); | ^~~~~~~~~~ ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 23.0-20240812-185503 UNMASKED: Requested by sam >=sys-libs/ncurses-6.5 The attached etc.portage.tar.xz has all details. ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-14 * clang/llvm (if any): clang version 18.1.8 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/18/bin Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg /usr/lib/llvm/18 18.1.8 Python 3.12.5 Available Ruby profiles: [1] ruby31 (with Rubygems) [2] ruby32 (with Rubygems) [3] ruby33 (with Rubygems) * Available Rust versions: [1] rust-bin-1.80.1 * The following VMs are available for generation-2: 1) Eclipse Temurin JDK 11.0.24_p8 [openjdk-bin-11] 2) Eclipse Temurin JDK 17.0.12_p7 [openjdk-bin-17] *) Eclipse Temurin JDK 21.0.4_p7 [openjdk-bin-21] 4) Eclipse Temurin JDK 8.422_p05 [openjdk-bin-8] Available Java Virtual Machines: [1] openjdk-bin-8 [2] openjdk-bin-11 [3] openjdk-bin-17 [4] openjdk-bin-21 system-vm The Glorious Glasgow Haskell Compilation System, version 9.2.8 php cli (if any): [1] php8.2 [2] php8.3 * go version go1.23.0 linux/amd64 HEAD of ::gentoo commit 39b289d5f60e3aa93c44fd15e8b4339f2406a9f2 Author: Repository mirror & CI <repomirrorci@gentoo.org> Date: Fri Aug 16 17:18:59 2024 +0000 2024-08-16 17:18:59 UTC emerge -qpvO =sys-fs/compsize-1.5 [ebuild N ] sys-fs/compsize-1.5 USE="-debug"
Created attachment 900326 [details] emerge-info.txt
Created attachment 900327 [details] emerge-history.txt
Created attachment 900328 [details] environment
Created attachment 900329 [details] etc.clang.tar.xz
Created attachment 900330 [details] etc.portage.tar.xz
Created attachment 900331 [details] qlist-info.txt.xz
Created attachment 900332 [details] sys-fs:compsize-1.5:20240816-180323.log
Created attachment 900333 [details] temp.tar.xz
We should probably take a snapshot at least (I don't think it'll fix this though). We want at least: * https://github.com/kilobyte/compsize/commit/9f02a12c377e5ac12544b0d07d73eb7c352a4787 * https://github.com/kilobyte/compsize/commit/a7bf82296193f785757f0cb30627dce30462f085 * https://github.com/kilobyte/compsize/commit/4288964fd32dc5a00c7162e5ab9920039e5a5e14 But I haven't looked at what commit(s) in btrfs-progs broke this (per upstream bug).
These two commits, at least, are mentioned by NixOS folks: - https://github.com/kdave/btrfs-progs/commit/2830e841359e456ab14e48aabaedab8a2276e484 - https://github.com/kdave/btrfs-progs/commit/2f297355c9b1c451c3ad2bfd07a368ef69b9b8d7 They remove a bunch of junk which approximates kernel internals using libc equivalents.
In radix-tree.h in compsize, there's the following bit: #if BTRFS_FLAT_INCLUDES #include "kerncompat.h" #else #include <btrfs/kerncompat.h> #endif /* BTRFS_FLAT_INCLUDES */ Their bundled kerncompat.h includes definitions for stuff like gfp_t which were removed from btrfs-progs kerncompat.h.
This is actually a problematic flag because defining it for compsize has implications when it comes to libbtrfs. From libbtrfs/ctree.h as an example: #if BTRFS_FLAT_INCLUDES #include "libbtrfs/kerncompat.h" #include "kernel-lib/rbtree_types.h" #include "libbtrfs/ioctl.h" #else #include <btrfs/kerncompat.h> #include <btrfs/rbtree_types.h> #include <btrfs/ioctl.h> #endif /* BTRFS_FLAT_INCLUDES */ https://github.com/kdave/btrfs-progs/blob/c75b2f2c77c9fdace08a57fe4515b45a4616fa21/libbtrfs/ctree.h#L24
Taking a closer look at what compsize has, their radix-tree.c and radix-tree.h appear to be 7 year old copies of btrfs-progs sources...
*** Bug 939505 has been marked as a duplicate of this bug. ***
*** Bug 939834 has been marked as a duplicate of this bug. ***
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f0aa3f52546b99ab498a0233dd323e73f82559c0 commit f0aa3f52546b99ab498a0233dd323e73f82559c0 Author: David Roman <davidroman96@gmail.com> AuthorDate: 2024-11-21 21:43:04 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-11-23 09:51:22 +0000 sys-fs/compsize: fix build with btrfs-progs >= 6.10.1 Closes: https://bugs.gentoo.org/938025 Signed-off-by: David Roman <davidroman96@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> sys-fs/compsize/compsize-1.5.ebuild | 2 ++ .../compsize/files/compsize-1.5-btrfs-progs.patch | 35 ++++++++++++++++++++++ 2 files changed, 37 insertions(+)