2

When building the latest grub2 (2.00) I get this error.

I have tried adding -Wno-unused-function to both HOST_CFLAGS, HOST_CPPFLAGS, TARGET_CPPFLAGS and TARGET_CFLAGS in the Makefile. I even tried deleting that function whilst make was running!

Unfortunately the error remains.

Alexander Farber
  • 21,519
  • 75
  • 241
  • 416
A T
  • 13,008
  • 21
  • 97
  • 158
  • Please list versions of: flex, bison, automake, autoconf. And operating system wouldn't hurt to know either. – unixsmurf May 02 '14 at 09:07
  • Ubuntu 13.10 liveusb chrooting into a 14.04 partition (all amd64) with freetype-2.5.3, bison-3.0, grub-2.00, libfreetype6_2.5.2-1, flex-2.5.39, libfreetype6-dev_2.5.2-1 and m4-1.4.17. – A T May 15 '14 at 06:44

1 Answers1

2

Have you seen this?

The latest flex makes the GRUB-2.00 build fail. I can work around the issues with --disable-werror, but grub-core/script/yylex.l causes two warnings that do not work with -Werror.

./grub-core/script/yylex.l: At top level: grub_script.yy.c:2351:13: error: 'yy_fatal_error' defined but not used

This can be fixed by removing #define YY_FATAL_ERROR(msg) in yylex.l.

However, according to this post this seems to have been fixed.

Judging from the info on the net you either want to switch to grub 2.02 or try an older version of flex.

Adrian Frühwirth
  • 42,970
  • 10
  • 60
  • 71
  • Thanks, I think this was the commit (from the mailing-list): http://git.savannah.gnu.org/cgit/grub.git/commit/?id=9cc836a27be4a95f6f7bfd5b6bc099801645c0ea – A T May 15 '14 at 07:19