Bug 13326

Summary: regarding dtc error in buildroot source code
Product: buildroot Reporter: anil kumar <anilcharan357>
Component: OtherAssignee: unassigned
Status: RESOLVED WONTFIX    
Severity: normal CC: anilcharan357, buildroot, yann.morin.1998
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:
Attachments: the error is about multiple definition of yyloc which is in the path /scripts/scripts/dtc/dtc-lexer.lex.o

Description anil kumar 2020-11-19 17:24:08 UTC
/usr/bin/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:99: scripts/dtc/dtc] Error 1
make[2]: *** [scripts/Makefile.build:544: scripts/dtc] Error 2
make[2]: *** Waiting for unfinished jobs....
  HOSTCC  scripts/mod/sumversion.o
  HOSTLD  scripts/mod/modpost
make[1]: *** [Makefile:1061: scripts] Error 2
Comment 1 anil kumar 2020-11-20 03:08:25 UTC
Created attachment 8671 [details]
the error is about multiple definition of yyloc which is in the path /scripts/scripts/dtc/dtc-lexer.lex.o
Comment 2 Fabrice Fontaine 2021-01-08 11:01:26 UTC
This error raised with gcc 10 should have been fixed by https://git.buildroot.net/buildroot/commit/?id=198db470a73c14191915f8374362bc2a8b08c2bf (applied to master in April 2020)
Comment 3 Yann E. MORIN 2021-07-03 17:05:08 UTC
Anil, All,

As stated by Fabrice, this is now fixed for the dtc package he pointed at.

The traces you pasted are supposedly from the Linux kernel. Since there
are so many versions of the Linux kernel, we can't easily bundle a patch
for the dtc copy bundled in the kernel sources. You will have to backport
the upstream commit e33a814e772cdc36436c8c188d8c42d019fda639, using
BR2_GLOBAL_PATCH_DIR.

Regards,
Yann E. MORIN.