[DRBD-user] drbd 9.0.26 and newer fails to build on 5.4 kernels
Natanael Copa
ncopa at alpinelinux.org
Fri Feb 19 19:50:13 CET 2021
On Fri, 19 Feb 2021 19:38:53 +0100
Natanael Copa <ncopa at alpinelinux.org> wrote:
> Hi,
>
> I tried to update the kernel for alpine 3.12-stable branch from 5.4.84
> to 5.4.99. The 3rd part kernel module drbd 9.0.22-2 failed to build so
> I updated it to 9.0.27-1. This passed on the x86_64 machine I tested
> built it on so I pushed it.
>
> But it failed on 32 bit arm builders:
>
> ...
> In file included from ./include/linux/module.h:27,
> from /home/buildozer/aports/main/drbd-lts/src/drbd-9.0.27-1/drbd/drbd_req.h:16,
> from /home/buildozer/aports/main/drbd-lts/src/drbd-9.0.27-1/drbd/drbd_state.c:22:
> ./arch/arm/include/asm/module.h:59: warning: "MODULE_ARCH_VERMAGIC" redefined
> 59 | #define MODULE_ARCH_VERMAGIC \
> |
> In file included from /home/buildozer/aports/main/drbd-lts/src/drbd-9.0.27-1/drbd/drbd_state.c:19:
> ./include/linux/vermagic.h:28: note: this is the location of the previous definition
> 28 | #define MODULE_ARCH_VERMAGIC ""
> |
> GEN /home/buildozer/aports/main/drbd-lts/src/drbd-9.0.27-1/drbd/drbd_buildtag.c
> CC [M] /home/buildozer/aports/main/drbd-lts/src/drbd-9.0.27-1/drbd/drbd_buildtag.o
> LD [M] /home/buildozer/aports/main/drbd-lts/src/drbd-9.0.27-1/drbd/drbd.o
> Building modules, stage 2.
> MODPOST 2 modules
> ERROR: "__aeabi_ldivmod" [/home/buildozer/aports/main/drbd-lts/src/drbd-9.0.27-1/drbd/drbd.ko] undefined!
> ERROR: "__aeabi_uldivmod" [/home/buildozer/aports/main/drbd-lts/src/drbd-9.0.27-1/drbd/drbd.ko] undefined!
> make[3]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
> make[2]: *** [Makefile:1639: modules] Error 2
> make[1]: *** [Makefile:132: kbuild] Error 2
> make[1]: Leaving directory '/home/buildozer/aports/main/drbd-lts/src/drbd-9.0.27-1/drbd'
> make: *** [Makefile:131: module] Error 2
> >>> ERROR: drbd-lts: build failed
>
> And on 32 bit x86:
>
> GEN /home/buildozer/aports/main/drbd-lts/src/drbd-9.0.27-1/drbd/drbd_buildtag.c
> CC [M] /home/buildozer/aports/main/drbd-lts/src/drbd-9.0.27-1/drbd/drbd_buildtag.o
> LD [M] /home/buildozer/aports/main/drbd-lts/src/drbd-9.0.27-1/drbd/drbd.o
> Building modules, stage 2.
> MODPOST 2 modules
> ERROR: "__udivdi3" [/home/buildozer/aports/main/drbd-lts/src/drbd-9.0.27-1/drbd/drbd.ko] undefined!
> ERROR: "__divdi3" [/home/buildozer/aports/main/drbd-lts/src/drbd-9.0.27-1/drbd/drbd.ko] undefined!
> make[3]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
> make[2]: *** [Makefile:1639: modules] Error 2
> make[1]: *** [Makefile:132: kbuild] Error 2
> make[1]: Leaving directory '/home/buildozer/aports/main/drbd-lts/src/drbd-9.0.27-1/drbd'
> make: *** [Makefile:131: module] Error 2
> >>> ERROR: drbd-lts: build failed
>
> I read that this can happen if do_div() is not used and libgcc is not
> linked in (which I assume we shouldnt on kernel). I tried to look at
> the git log if I could find anything evident but couldn't find anything.
>
> So I tried to find older version. Turns out that the lastest version
> that compiles with 5.4 kernel is 9.0.25-2, but it only compiles with
> 5.4.84 kernel and not the 5.4.99.
>
> Does anyone have a clue how to solve this? If not, I guess I have to
> try git bisect it.
Ugh... turns out I cannot bisect it either:
make -C /lib/modules/5.4.99-0-lts/build M=/home/ncopa/src/drbd/drbd modules
./drbd-kernel-compat/gen_compat_patch.sh: line 12: spatch: command not found
./drbd-kernel-compat/gen_compat_patch.sh: line 45: hash: spatch: not found
INFO: not trying spatch-as-a-service because you are trying
to build DRBD from a git checkout. Please install a suitable
version of coccinelle (>1.0.8) or try building from a
release tarball.
ERROR: no suitable spatch found in $PATH. Install package 'coccinelle'!
make[4]: *** [Makefile:177: drbd-kernel-compat/cocci_cache/aa41fa1c792a297895276817c34c7a38/compat.patch] Error 1
make[3]: *** [/home/ncopa/src/drbd/drbd/Kbuild:135:
/home/ncopa/src/drbd/drbd/drbd-kernel-compat/compat.patch] Error 2
Seems like coccinelle requires ocaml and apparently we don't have ocaml
for x86 so I'd need to bootstrap ocaml on 32 bit x86 to be able to
build spatch to be able to build drbd from git so I can git bisect the
problem. I guess its time to give up and say its weekend.
-nc
More information about the drbd-user
mailing list