Dunfell: u-boot-rockpi-s build failed

86_64-linux/lib/ld-linux-x86-64.so.2 -o scripts/dtc/dtc scripts/dtc/dtc.o scripts/dtc/flattree.o scripts/dtc/fstree.o scripts/dtc/data.o scripts/dtc/livetree.o scripts/dtc/treesource.o scripts/dtc/srcpos.o scripts/dtc/checks.o scripts/dtc/util.o scripts/dtc/dtc-lexer.lex.o scripts/dtc/dtc-parser.tab.o
| /home/dks/workspace/yocto/build_rockpi_s/tmp/hosttools/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x10): multiple definition of `yylloc’; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
| collect2: error: ld returned 1 exit status
| make[3]: *** [scripts/Makefile.host:108: scripts/dtc/dtc] Error 1
| make[2]: *** [/home/dks/workspace/yocto/build_rockpi_s/tmp/work/rockpi_s_rk3308-poky-linux/u-boot-rockpi-s/1.0-r0/git/scripts/Makefile.build:425: scripts/dtc] Error 2
| make[1]: *** [/home/dks/workspace/yocto/build_rockpi_s/tmp/work/rockpi_s_rk3308-poky-linux/u-boot-rockpi-s/1.0-r0/git/Makefile:491: scripts] Error 2
| make[1]: Leaving directory ‘/home/dks/workspace/yocto/build_rockpi_s/tmp/work/rockpi_s_rk3308-poky-linux/u-boot-rockpi-s/1.0-r0/build’
| make: *** [Makefile:150: sub-make] Error 2
| make: Leaving directory ‘/home/dks/workspace/yocto/build_rockpi_s/tmp/work/rockpi_s_rk3308-poky-linux/u-boot-rockpi-s/1.0-r0/git’
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of ‘/home/dks/workspace/yocto/build_rockpi_s/tmp/work/rockpi_s_rk3308-poky-linux/u-boot-rockpi-s/1.0-r0/temp/run.do_compile.2295324’ failed with exit code 1
ERROR: Task (/home/dks/workspace/yocto/sources/meta-radxa/recipes-bsp/u-boot/u-boot-rockpi-s.bb:do_compile) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 589 tasks of which 583 didn’t need to be rerun and 1 failed.

Summary: 1 task failed:
/home/dks/workspace/yocto/sources/meta-radxa/recipes-bsp/u-boot/u-boot-rockpi-s.bb:do_compile
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.


compiling on ubuntu 22.04. tried to change YYLTYPE yylloc with extern YYLTYPE yylloc in etc-lexer.c and also tried with changing gcc 10 to gcc 9 but no luck. pls give some idea

1 Like

Hello,
I’m also have the same problem,
If you solved it mention the solution here please.