badaix / snapos

Snapcast OS
GNU General Public License v3.0
97 stars 31 forks source link

Compilation Error: Multiple Definition of `yylloc` #18

Open KennyStier opened 2 years ago

KennyStier commented 2 years ago

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 commented 2 years ago

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?