libgraphqlparser icon indicating copy to clipboard operation
libgraphqlparser copied to clipboard

graphqlparser_bison: parser.ypp:8.10-12: error: invalid version requirement: 3

Open vitabaks opened this issue 3 years ago • 2 comments

When trying to build v0.7.0, I get an error:

+ make install
[  4%] [FLEX][GraphQLScanner] Building scanner with flex 2.6.4
[  8%] Generating Ast.h
[ 13%] Generating Ast.cpp
[ 17%] Generating AstVisitor.h
[ 21%] Generating c/GraphQLAst.h
[ 26%] Generating c/GraphQLAst.cpp
[ 30%] Generating c/GraphQLAstForEachConcreteType.h
[ 34%] Generating JsonVisitor.h.inc
[ 39%] Generating JsonVisitor.cpp.inc
[ 43%] [BISON][graphqlparser_bison] Building parser with bison 3.7.5
parser.ypp:8.10-12: error: invalid version requirement: 3
    8 | %require "3"
      |          ^~~
parser.ypp:13.1-45: warning: deprecated directive: ‘%define parser_class_name {GraphQLParserImpl}’, use ‘%define api.parser.class {GraphQLParserImpl}’ [-Wdeprecated]
   13 | %define parser_class_name {GraphQLParserImpl}
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      | %define api.parser.class {GraphQLParserImpl}
parser.ypp: warning: fix-its can be applied.  Rerun with option '--update'. [-Wother]
make[2]: *** [CMakeFiles/graphqlparser.dir/build.make:129: parser.tab.cpp] Error 1
make[1]: *** [CMakeFiles/Makefile2:143: CMakeFiles/graphqlparser.dir/all] Error 2
make: *** [Makefile:149: all] Error 2

I also tried building the latest version from the "master" branch (although I prefer to use the code from the release tags) and I get the same error.

I will be able to build after a few attempts, but for a successful build I have to restart the CI of the build many times.
I will be very grateful for help in solving this problem.

vitabaks avatar Dec 07 '22 21:12 vitabaks

I have encountered the same problem. Have you found the reason and how to solve it? thank you

fawdlstty avatar Feb 27 '23 10:02 fawdlstty

https://github.com/graphql/libgraphqlparser/issues/77 modify 3 to 3.0 to resolve this problem

fawdlstty avatar Feb 28 '23 01:02 fawdlstty