Building OpenWrt 19.07.3 fails with undefined reference to `minor' (tools/make-ext4fs)

I am trying to build OpenWrt 19.07.3 by following the guide at https://openwrt.org/docs/guide-developer/quickstart-build-images. However, in the make-ext4fs stage, I get a linker error

/usr/lib/gcc/x86_64-alpine-linux-musl/9.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: contents.c:(.text+0xab9): undefined reference to `minor'

Does anyone have an idea what might cause this error?

Build log
alex-alpine:~/openwrt$ make
time: target/linux/prereq#0.39#0.01#0.41
 make[1] world
 make[2] tools/compile
 make[3] -C tools/flock compile
 make[3] -C tools/xz compile
 make[3] -C tools/sed compile
 make[3] -C tools/patch compile
 make[3] -C tools/tar compile
 make[3] -C tools/m4 compile
 make[3] -C tools/autoconf compile
 make[3] -C tools/pkg-config compile
 make[3] -C tools/automake compile
 make[3] -C tools/missing-macros compile
 make[3] -C tools/libtool compile
 make[3] -C tools/gmp compile
 make[3] -C tools/mpfr compile
 make[3] -C tools/mpc compile
 make[3] -C tools/libelf compile
 make[3] -C tools/expat compile
 make[3] -C tools/flex compile
 make[3] -C tools/bison compile
 make[3] -C tools/mklibs compile
 make[3] -C tools/libressl compile
 make[3] -C tools/cmake compile
 make[3] -C tools/zlib compile
 make[3] -C tools/sstrip compile
 make[3] -C tools/make-ext4fs compile
make -r world: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what's going on
make: *** [/home/alex/openwrt/include/toplevel.mk:227: world] Error 1
alex-alpine:~/openwrt$ make V=s
make[1]: Entering directory '/home/alex/openwrt'
make[2]: Entering directory '/home/alex/openwrt'
+ mkdir -p /home/alex/openwrt/staging_dir/target-mips_24kc_musl
+ cd /home/alex/openwrt/staging_dir/target-mips_24kc_musl
+ mkdir -p bin lib include stamp
mkdir -p /home/alex/openwrt/build_dir/target-mips_24kc_musl/stamp
touch /home/alex/openwrt/staging_dir/target-mips_24kc_musl/.prepared
+ mkdir -p /home/alex/openwrt/staging_dir/host
+ cd /home/alex/openwrt/staging_dir/host
+ mkdir -p bin lib include stamp
mkdir -p /home/alex/openwrt/build_dir/host/stamp /home/alex/openwrt/staging_dir/host/include/sys
install -m0644 /home/alex/openwrt/tools/include/*.h /home/alex/openwrt/staging_dir/host/include/
install -m0644 /home/alex/openwrt/tools/include/sys/*.h /home/alex/openwrt/staging_dir/host/include/sys/
ln -sf lib /home/alex/openwrt/staging_dir/host/lib64
touch /home/alex/openwrt/staging_dir/host/.prepared
make[3]: Entering directory '/home/alex/openwrt/tools/flock'
make[3]: Leaving directory '/home/alex/openwrt/tools/flock'
time: tools/flock/compile#0.02#0.00#0.03
make[3]: Entering directory '/home/alex/openwrt/tools/xz'
make[3]: Leaving directory '/home/alex/openwrt/tools/xz'
time: tools/xz/compile#0.02#0.01#0.04
make[3]: Entering directory '/home/alex/openwrt/tools/sed'
make[3]: Leaving directory '/home/alex/openwrt/tools/sed'
time: tools/sed/compile#0.03#0.00#0.04
make[3]: Entering directory '/home/alex/openwrt/tools/patch'
make[3]: Leaving directory '/home/alex/openwrt/tools/patch'
time: tools/patch/compile#0.03#0.00#0.03
make[3]: Entering directory '/home/alex/openwrt/tools/tar'
make[3]: Leaving directory '/home/alex/openwrt/tools/tar'
time: tools/tar/compile#0.03#0.00#0.04
make[3]: Entering directory '/home/alex/openwrt/tools/m4'
make[3]: Leaving directory '/home/alex/openwrt/tools/m4'
time: tools/m4/compile#0.03#0.00#0.04
make[3]: Entering directory '/home/alex/openwrt/tools/autoconf'
make[3]: Leaving directory '/home/alex/openwrt/tools/autoconf'
time: tools/autoconf/compile#0.02#0.00#0.03
make[3]: Entering directory '/home/alex/openwrt/tools/pkg-config'
make[3]: Leaving directory '/home/alex/openwrt/tools/pkg-config'
time: tools/pkg-config/compile#0.03#0.00#0.04
make[3]: Entering directory '/home/alex/openwrt/tools/automake'
make[3]: Leaving directory '/home/alex/openwrt/tools/automake'
time: tools/automake/compile#0.02#0.01#0.04
make[3]: Entering directory '/home/alex/openwrt/tools/missing-macros'
make[3]: Leaving directory '/home/alex/openwrt/tools/missing-macros'
time: tools/missing-macros/compile#0.02#0.00#0.02
make[3]: Entering directory '/home/alex/openwrt/tools/libtool'
make[3]: Leaving directory '/home/alex/openwrt/tools/libtool'
time: tools/libtool/compile#0.03#0.00#0.03
make[3]: Entering directory '/home/alex/openwrt/tools/gmp'
make[3]: Leaving directory '/home/alex/openwrt/tools/gmp'
time: tools/gmp/compile#0.03#0.01#0.04
make[3]: Entering directory '/home/alex/openwrt/tools/mpfr'
make[3]: Leaving directory '/home/alex/openwrt/tools/mpfr'
time: tools/mpfr/compile#0.03#0.00#0.04
make[3]: Entering directory '/home/alex/openwrt/tools/mpc'
make[3]: Leaving directory '/home/alex/openwrt/tools/mpc'
time: tools/mpc/compile#0.02#0.00#0.04
make[3]: Entering directory '/home/alex/openwrt/tools/libelf'
make[3]: Leaving directory '/home/alex/openwrt/tools/libelf'
time: tools/libelf/compile#0.02#0.00#0.03
make[3]: Entering directory '/home/alex/openwrt/tools/expat'
make[3]: Leaving directory '/home/alex/openwrt/tools/expat'
time: tools/expat/compile#0.03#0.00#0.03
make[3]: Entering directory '/home/alex/openwrt/tools/flex'
make[3]: Leaving directory '/home/alex/openwrt/tools/flex'
time: tools/flex/compile#0.03#0.00#0.04
make[3]: Entering directory '/home/alex/openwrt/tools/bison'
make[3]: Leaving directory '/home/alex/openwrt/tools/bison'
time: tools/bison/compile#0.03#0.00#0.04
make[3]: Entering directory '/home/alex/openwrt/tools/mklibs'
make[3]: Leaving directory '/home/alex/openwrt/tools/mklibs'
time: tools/mklibs/compile#0.02#0.01#0.03
make[3]: Entering directory '/home/alex/openwrt/tools/libressl'
make[3]: Leaving directory '/home/alex/openwrt/tools/libressl'
time: tools/libressl/compile#0.03#0.02#0.05
make[3]: Entering directory '/home/alex/openwrt/tools/cmake'
make[3]: Leaving directory '/home/alex/openwrt/tools/cmake'
time: tools/cmake/compile#0.10#0.06#0.11
make[3]: Entering directory '/home/alex/openwrt/tools/zlib'
make[3]: Leaving directory '/home/alex/openwrt/tools/zlib'
time: tools/zlib/compile#0.02#0.01#0.03
make[3]: Entering directory '/home/alex/openwrt/tools/sstrip'
make[3]: Leaving directory '/home/alex/openwrt/tools/sstrip'
time: tools/sstrip/compile#0.02#0.00#0.03
make[3]: Entering directory '/home/alex/openwrt/tools/make-ext4fs'
CFLAGS="-O2 -I/home/alex/openwrt/staging_dir/host/include " CPPFLAGS="-I/home/alex/openwrt/staging_dir/host/include " CXXFLAGS="" LDFLAGS="-L/home/alex/openwrt/staging_dir/host/lib " make -j1 -C /home/alex/openwrt/build_dir/host/make-ext4fs-2016-08-14-484903e4  
make[4]: Entering directory '/home/alex/openwrt/build_dir/host/make-ext4fs-2016-08-14-484903e4'
cc -L/home/alex/openwrt/staging_dir/host/lib -o make_ext4fs allocate.o canned_fs_config.o contents.o crc16.o ext4fixup.o ext4_sb.o ext4_utils.o extent.o indirect.o make_ext4fs_main.o make_ext4fs.o sha1.o uuid.o wipe.o libsparse/libsparse.a -lz
/usr/lib/gcc/x86_64-alpine-linux-musl/9.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: contents.o: in function `make_special':
contents.c:(.text+0xaaa): undefined reference to `major'
/usr/lib/gcc/x86_64-alpine-linux-musl/9.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: contents.c:(.text+0xab9): undefined reference to `minor'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:30: make_ext4fs] Error 1
make[4]: Leaving directory '/home/alex/openwrt/build_dir/host/make-ext4fs-2016-08-14-484903e4'
make[3]: *** [Makefile:29: /home/alex/openwrt/build_dir/host/make-ext4fs-2016-08-14-484903e4/.built] Error 2
make[3]: Leaving directory '/home/alex/openwrt/tools/make-ext4fs'
time: tools/make-ext4fs/compile#0.10#0.01#0.12
make[2]: *** [tools/Makefile:159: tools/make-ext4fs/compile] Error 2
make[2]: Leaving directory '/home/alex/openwrt'
make[1]: *** [tools/Makefile:155: /home/alex/openwrt/staging_dir/target-mips_24kc_musl/stamp/.tools_compile_yynyynnyyynyyyyynyynnyyyyyyyyyyyyyyyyyyyynyynynyyyynnyyy] Error 2
make[1]: Leaving directory '/home/alex/openwrt'
make: *** [/home/alex/openwrt/include/toplevel.mk:227: world] Error 2

I am building on Alpine Linux, have installed the packages as described here, updated and installed the feeds and have used make menuconfig to configure the build for Atheros AR7xxx/AR9xxx, Generic, TP-Link Archer C7 v5.

Thanks a lot in advance!