Unable to Build DRBD on Linux 6.13 Kernel

I’m using Arch linux and have never had a problem building DRBD before. However, Arch linux recently upgraded from the 6.12 kernal to the 6.13 kernel and now DRBD won’t build. This is what I get.

[aur@server ~]$ cd build/drbd-9.2.12
[aur@server drbd-9.2.12]$ make
Need a git checkout to regenerate drbd/.drbd_git_revision
make[1]: Entering directory '/home/aur/build/drbd-9.2.12/drbd'

    Calling toplevel makefile of kernel source tree, which I believe is in
    KDIR=/lib/modules/6.13.5-arch1-1/build

make -C /lib/modules/6.13.5-arch1-1/build    "PRE_CFLAGS=" M=/home/aur/build/drbd-9.2.12/drbd obj-m=dummy-for-compat.o dummy-for-compat-h.o
make -C /lib/modules/6.13.5-arch1-1/build    "PRE_CFLAGS=" M=/home/aur/build/drbd-9.2.12/drbd obj-m=dummy-for-prep.o dummy-for-patch.o
  SPLIT   build-6.13.5-arch1-1/compat.patch
/bin/bash: line 1: build-6.13.5-arch1-1/compat.patch: No such file or directory
make[4]: *** [Kbuild:222: build-6.13.5-arch1-1/.ts.compat.patch] Error 1
make[3]: *** [/usr/lib/modules/6.13.5-arch1-1/build/Makefile:1984: .] Error 2
make[2]: *** [Makefile:251: __sub-make] Error 2
make[1]: *** [Makefile:244: prep] Error 2
make[1]: Leaving directory '/home/aur/build/drbd-9.2.12/drbd'
make: *** [Makefile:131: module] Error 2

Hi,

I’m pretty sure you need this patch: drbd: build: deal with potentially relative paths in prep step · LINBIT/drbd@e9d0331 · GitHub

This was not yet released in the latest DRBD version, so it would make sense that 9.2.12 does not build with Linux 6.13.

Please try with the above patch applied and see if that fixes it.

Regards,
Christoph

1 Like

That patch worked great. I can confirm that it builds on Linux 6.13.5 with that patch applied