Build gpio-ir-rec failed


I tried building the gpio-ir-recv module like it’s described here

X64Host is running Debian Bullseye. The compileprocess stopped here:

Pls advise. tnx.

rock@x68_64:~/kernel# make EXTRAVERSION=-65-rockchip-g58431d38f8f3 LOCALVERSION= drivers/media/rc/gpio-ir-recv.ko obj-m=gpio-ir-recv.o
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  LD      scripts/basic/built-in.o
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/bin2c
  LD      built-in.o
  CC      kernel/bounds.s
  CHK     include/generated/bounds.h
  CHK     include/generated/timeconst.h
  CC      arch/arm64/kernel/asm-offsets.s
  CHK     include/generated/asm-offsets.h
  CALL    scripts/
  LDS     arch/arm64/kernel/vdso/
  VDSOA   arch/arm64/kernel/vdso/gettimeofday.o
  VDSOA   arch/arm64/kernel/vdso/note.o
  VDSOA   arch/arm64/kernel/vdso/sigreturn.o
  VDSOL   arch/arm64/kernel/vdso/
  VDSOSYM include/generated/vdso-offsets.h
  LD      scripts/built-in.o
  LD      scripts/dtc/built-in.o
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/dtc/flattree.o
  HOSTCC  scripts/dtc/fstree.o
  HOSTCC  scripts/dtc/data.o
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/dtc/util.o
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  HOSTCC  scripts/dtc/
  HOSTLD  scripts/dtc/dtc
/usr/bin/ld: scripts/dtc/ multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [scripts/ scripts/dtc/dtc] Error 1
make[1]: *** [scripts/ scripts/dtc] Error 2
make: *** [Makefile:582: scripts] Error 2

I tested with Debian Buster and was able to build the modules.

It’s about the default gcc version issue. If you use Debian Bullseye, you can install GCC 7 to compile.