Multiple definition of `yylloc'

I'm tying to build 19.07.8 on a Fedora 33 box, with gcc version 10.3.1, but it fails with the error "/usr/bin/ld: scripts/dtc/ multiple definition of 'yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here".

I have read several pages about this error: this seems to be an issue with version 10 of gcc, and should be easy to fix, just edit a couple of files; but I could not manage to fix this, either the files in question do not exist, or the lines that should be change do not exist, or the changes do not have any effect...

Could someone please enlighten me?

I stumbled upon this, trying to build LineageOS on Debian 11 box from scratch. This was fixed in upstream kernel here: - so for now you'll have probably add a patch through quilt as written here:, so it doesn't get overwritten in kernel source during the "prepare" phase.


Thanks for the info, i will try to create such patch.

Also, maybe try building current openwrt-19.07 branch, this should likely be picked up in upstream stable kernel trees, and if not, it's worth to ask for this on LKML.

1 Like

Have you noticed these?
They have also been backported to 21.02, (but not to the ancient 19.07)
Not sure, which package you are trying to compile, but...

1 Like

I'm trying to build a single kernel module, that has to be compatible with stick 19.07.8. If I change the kernel fingerprint, opkg is going to refuse to install my packages.

I guess I should prepare a VM with an older version of gcc. Many thanks for your help!