hardkernel / linux

Linux kernel source tree
Other
426 stars 406 forks source link

Multiple definition of `yylloc' #428

Open V0rt3kz opened 1 year ago

V0rt3kz commented 1 year ago

The current version of Odroidc2 is returning an issue related to `yylloc'

Error:

/usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x50): 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/Makefile.host:127: scripts/dtc/dtc] Error 1 make[1]: [scripts/Makefile.build:404: scripts/dtc] Error 2 make: [Makefile:563: scripts] Error 2 make: Waiting for unfinished jobs....

How to reproduce?

git clone https://github.com/hardkernel/linux.git -b odroidc2-v3.16.y odroid-3.16 cd odroid-3.16/ make odroidc2_defconfig make -j8

How to fix it?

Modify line 640 in scripts/dtc/dtc-lexer.lex.c and add at the begining of the line "extern"

moonlinux commented 1 year ago

Plz, intergrade this upstream patch to resolve this issue. https://lkml.org/lkml/2020/4/1/1206