Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Compilation Error: Multiple Definition of yylloc #18

Open
KennyStier opened this issue Sep 29, 2021 · 1 comment
Open

Compilation Error: Multiple Definition of yylloc #18

KennyStier opened this issue Sep 29, 2021 · 1 comment

Comments

@KennyStier
Copy link

Build Environment
OS: Ubuntu 21.04
GCC: 10.3.0 (Ubuntu 10.3.0-1ubuntu1)

I tried following the buildroot instructions, but the build would fail in error:

  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  HOSTCC  scripts/extract-cert
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTLD  scripts/dtc/dtc
/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[4]: *** [scripts/Makefile.host:99: scripts/dtc/dtc] Error 1
make[3]: *** [scripts/Makefile.build:544: scripts/dtc] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:1067: scripts] Error 2
make[1]: *** [package/pkg-generic.mk:294: /home/kenny/Downloads/SnapOS-build/buildroot/output/build/linux-custom/.stamp_built] Error 2

Should I be compiling this with an older version of gcc?

@JDuchniewicz
Copy link

What I do every time I encounter such an error: remove the offending definition. Probably this is due to bison's parsing changes in 3.0?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants