linux-apfs / linux-apfs-rw

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

Fails to build for kernel 6.9.4 #70

Closed ManuLinares closed 5 months ago

ManuLinares commented 5 months ago

I'm using archlinux, with the AUR package https://aur.archlinux.org/packages/linux-apfs-rw-dkms-git

This is the make log:

$ cat /var/lib/dkms/linux-apfs-rw/0.3.8/build/make.log
DKMS make.log for linux-apfs-rw-0.3.8 for kernel 6.9.4-arch1-1 (x86_64)
mié 12 jun 2024 23:48:33 -03
make: Entering directory '/usr/lib/modules/6.9.4-arch1-1/build'
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.3.8/build/btree.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.3.8/build/compress.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.3.8/build/dir.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.3.8/build/extents.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.3.8/build/file.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.3.8/build/inode.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.3.8/build/key.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.3.8/build/libzbitmap.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.3.8/build/lzfse/lzfse_decode.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.3.8/build/lzfse/lzfse_decode_base.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.3.8/build/lzfse/lzfse_fse.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.3.8/build/lzfse/lzvn_decode_base.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.3.8/build/message.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.3.8/build/namei.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.3.8/build/node.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.3.8/build/object.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.3.8/build/snapshot.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.3.8/build/spaceman.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.3.8/build/super.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.3.8/build/symlink.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.3.8/build/transaction.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.3.8/build/unicode.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.3.8/build/xattr.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.3.8/build/xfield.o
/var/lib/dkms/linux-apfs-rw/0.3.8/build/super.c: In function ‘apfs_free_main_super’:
/var/lib/dkms/linux-apfs-rw/0.3.8/build/super.c:326:9: error: implicit declaration of function ‘bdev_release’; did you mean ‘seq_release’? [-Wimplicit-function-declaration]
  326 |         bdev_release(nxi->nx_bdev_handle);
      |         ^~~~~~~~~~~~
      |         seq_release
/var/lib/dkms/linux-apfs-rw/0.3.8/build/super.c: In function ‘init_inodecache’:
/var/lib/dkms/linux-apfs-rw/0.3.8/build/super.c:797:49: error: ‘SLAB_MEM_SPREAD’ undeclared (first use in this function)
  797 |                                                 SLAB_MEM_SPREAD|SLAB_ACCOUNT),
      |                                                 ^~~~~~~~~~~~~~~
/var/lib/dkms/linux-apfs-rw/0.3.8/build/super.c:797:49: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/linux-apfs-rw/0.3.8/build/super.c: In function ‘apfs_attach_nxi’:
/var/lib/dkms/linux-apfs-rw/0.3.8/build/super.c:1596:26: error: implicit declaration of function ‘bdev_open_by_path’; did you mean ‘bdev_file_open_by_path’? [-Wimplicit-function-declaration]
 1596 |                 handle = bdev_open_by_path(dev_name, mode, &apfs_fs_type, NULL);
      |                          ^~~~~~~~~~~~~~~~~
      |                          bdev_file_open_by_path
/var/lib/dkms/linux-apfs-rw/0.3.8/build/super.c:1596:24: error: assignment to ‘struct bdev_handle *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 1596 |                 handle = bdev_open_by_path(dev_name, mode, &apfs_fs_type, NULL);
      |                        ^
/var/lib/dkms/linux-apfs-rw/0.3.8/build/super.c:1602:30: error: invalid use of undefined type ‘struct bdev_handle’
 1602 |                 bdev = handle->bdev;
      |                              ^~
make[2]: *** [scripts/Makefile.build:244: /var/lib/dkms/linux-apfs-rw/0.3.8/build/super.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/usr/lib/modules/6.9.4-arch1-1/build/Makefile:1919: /var/lib/dkms/linux-apfs-rw/0.3.8/build] Error 2
make: *** [Makefile:240: __sub-make] Error 2
make: Leaving directory '/usr/lib/modules/6.9.4-arch1-1/build'
eafer commented 5 months ago

You seem to be building the 0.3.8 tag of the driver, which doesn't have support for the 6.9 kernel. You need to upgrade to 0.3.9.

ManuLinares commented 5 months ago

That worked, thanks.