linux-apfs / linux-apfs-rw

APFS module for linux, with experimental write support
GNU General Public License v2.0
545 stars 36 forks source link

Does not compile on Linux 4.14 and 4.19 #43

Closed Luflosi closed 1 year ago

Luflosi commented 1 year ago

Here is the relevant part of the build log:

build flags: SHELL=/nix/store/rhvbjmcfnkg8i2dxpzr114cp1ws7f667-bash-5.2-p15/bin/bash O=\$\(buildRoot\) CC=/nix/store/7wkshj58fcsl1f3zyi67qsxgl1p8nki1-gcc-wrapper-12.2.0/bin/cc HOSTCC=/nix/store/7wkshj58fcsl1f3zyi67qsxgl1p8nki1-gcc-wrapper-12.2.0/bin/cc HOSTLD=/nix/store/rbwalnmk5a6nj9mbldxzmj11gvacbrsi-binutils-wrapper-2.40/bin/ld ARCH=x86_64 KERNELRELEASE=4.19.283 KERNEL_DIR=/nix/store/lsb0gr6pjzfdxipk08qmsqd09x8d5pbj-linux-4.19.283-dev/lib/modules/4.19.283/build INSTALL_MOD_PATH=\$\(out\)
make -C /nix/store/lsb0gr6pjzfdxipk08qmsqd09x8d5pbj-linux-4.19.283-dev/lib/modules/4.19.283/build M=/build/source
  CC [M]  /build/source/btree.o
  CC [M]  /build/source/compress.o
  CC [M]  /build/source/dir.o
  CC [M]  /build/source/extents.o
/build/source/extents.c: In function 'apfs_remap_file_range':
/build/source/extents.c:1515:29: error: 'REMAP_FILE_ADVISORY' undeclared (first use in this function)
 1515 |         if (remap_flags & ~(REMAP_FILE_ADVISORY))
      |                             ^~~~~~~~~~~~~~~~~~~
/build/source/extents.c:1515:29: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [/nix/store/lsb0gr6pjzfdxipk08qmsqd09x8d5pbj-linux-4.19.283-dev/lib/modules/4.19.283/source/scripts/Makefile.build:304: /build/source/extents.o] Error 1
make[3]: *** [/nix/store/lsb0gr6pjzfdxipk08qmsqd09x8d5pbj-linux-4.19.283-dev/lib/modules/4.19.283/source/Makefile:1558: _module_/build/source] Error 2
make[2]: *** [Makefile:153: sub-make] Error 2
make[1]: *** [Makefile:24: __sub-make] Error 2
make: *** [Makefile:17: default] Error 2

It looks like the failure was introduced in 573fe59e7fc52fa75b026c9194e1400764a74c99.

You could either fix the code to work with those kernel versions or update the README and increase the supported kernel version.

For easy testing, I'll be a Nix shill once more and point you to my previous comment. If you're interested in automated CI testing, I can look into how to do that and make a PR.

eafer commented 1 year ago

Thanks. I'll try to fix this later today or tomorrow.

For easy testing, I'll be a Nix shill once more and point you to my previous comment.

Yes, I did try Nix back when you first told me. I guess I need to start running builds for all versions, at least before a release. Running tests for every version is probably not feasible though.

If you're interested in automated CI testing, I can look into how to do that and make a PR.

I don't know anything about that, but if you think you can do it, it would probably help.

eafer commented 1 year ago

I just made a release with the new patches, so I'm closing this issue. Feel free to reopen if you notice anything else.