askforalfred / alfred

ALFRED - A Benchmark for Interpreting Grounded Instructions for Everyday Tasks
MIT License
352 stars 77 forks source link

Build error when compiling Metric FF #117

Closed pschydlo closed 1 year ago

pschydlo commented 2 years ago

Hello!

While following the instructions to compile Metric FF for the Alfred trajectory generation (https://github.com/askforalfred/alfred/tree/master/gen) I'm getting the following error:

      yychar = YYLEX;
               ^
scan-fct_pddl.tab.c:926:16: note: expanded from macro 'YYLEX'
# define YYLEX yylex ()
               ^
scan-fct_pddl.tab.c:63:17: note: expanded from macro 'yylex'
#define yylex   fct_pddllex
                ^
scan-fct_pddl.y:216:5: error: implicit declaration of function 'fct_pddlerror' [-Werror,-Wimplicit-function-declaration]
    yyerror();
    ^
scan-fct_pddl.tab.c:64:17: note: expanded from macro 'yyerror'
#define yyerror fct_pddlerror
                ^
scan-fct_pddl.y:216:5: note: did you mean 'fct_pddlparse'?
scan-fct_pddl.tab.c:64:17: note: expanded from macro 'yyerror'
#define yyerror fct_pddlerror
                ^
scan-fct_pddl.tab.c:1398:1: note: 'fct_pddlparse' declared here
yyparse (void)
^
scan-fct_pddl.tab.c:62:17: note: expanded from macro 'yyparse'
#define yyparse fct_pddlparse
                ^
scan-fct_pddl.tab.c:2340:7: error: implicit declaration of function 'fct_pddlerror' [-Werror,-Wimplicit-function-declaration]
      yyerror (YY_("syntax error"));
      ^
scan-fct_pddl.tab.c:64:17: note: expanded from macro 'yyerror'
#define yyerror fct_pddlerror
                ^
scan-fct_pddl.tab.c:2486:3: error: implicit declaration of function 'fct_pddlerror' [-Werror,-Wimplicit-function-declaration]
  yyerror (YY_("memory exhausted"));
  ^
scan-fct_pddl.tab.c:64:17: note: expanded from macro 'yyerror'
#define yyerror fct_pddlerror
                ^
1 warning and 4 errors generated.

Is there a known work around for this error?

Which version of GCC is recommended to compile this version of Metric FF?

Thank you for any help you may be able to provide!

Best wishes, Paul

MohitShridhar commented 2 years ago

Sorry for the late reply.

this looks like a bison or flex issue: https://stackoverflow.com/questions/59198334/problems-with-flex-and-bison

You might have to mess around with their installations.

albore commented 2 years ago

Try using this patched version: https://fai.cs.uni-saarland.de/hoffmann/ff/Metric-FF.tgz It has been tested this with flex 2.5.34 and 2.5.35, as well as bison 2.3 and 2.4.1. NB: Not all Bison/flex versions are compatible, and newer versions surely aren't with the one used when MetricFF has been implemented.

MohitShridhar commented 1 year ago

Closing due to inactivity.

For future reference, see thread above.