compsize icon indicating copy to clipboard operation
compsize copied to clipboard

Fix recent btrfs-progs breakage

Open justinbrewer opened this issue 1 year ago • 2 comments

New versions of btrfs-progs dropped radix_tree and made incompatible changes to kerncompat.h. radix_tree was overkill, since it was only used to track if a page had been seen before.

Replace radix_tree with a simple bitmap, and drop the broken imported source files.

Fixes #52

justinbrewer avatar Nov 25 '24 09:11 justinbrewer

I'm testing your patch but fails to build in Fedora 42:

+ /usr/bin/make -O -j24 V=1 VERBOSE=1
gcc -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer   -c -o bitmap.o bitmap.c
bitmap.c: In function ‘resize’:
bitmap.c:22:25: error: implicit declaration of function ‘mremap’; did you mean ‘munmap’? [-Wimplicit-function-declaration]
   22 |         void *new_map = mremap(b->map, MAP_SIZE(b->size), MAP_SIZE(new_size),
      |                         ^~~~~~
      |                         munmap
bitmap.c:23:25: error: ‘MREMAP_MAYMOVE’ undeclared (first use in this function)
   23 |                         MREMAP_MAYMOVE);
      |                         ^~~~~~~~~~~~~~
bitmap.c:23:25: note: each undeclared identifier is reported only once for each function it appears in
make: *** [Makefile:19: bitmap.o] Error 1

jorti avatar Jan 23 '25 19:01 jorti

mremap/MREMAP_MAYMOVE are _GNU_SOURCE symbols. That was being set in CFLAGS in the Makefile, but looks like your package script overrides that. Pushed a patch to move that definition into the file that needs it, so package builds can work as is.

justinbrewer avatar Jan 26 '25 19:01 justinbrewer