Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FTBFS: qt5-webkit broken since bison-3.7.3 #25876

Closed
pullmoll opened this issue Oct 25, 2020 · 0 comments
Closed

FTBFS: qt5-webkit broken since bison-3.7.3 #25876

pullmoll opened this issue Oct 25, 2020 · 0 comments

Comments

@pullmoll
Copy link
Member

pullmoll commented Oct 25, 2020

The update of bison-3.7.3 broke the qt5-webkit build. It seems to be related to the automagically chosen filename for the header files with defines, i.e. the -d option of bison. The newer bison's choice for a name is obviously not what the perl script expects.

I tried to patch Source/WebCore/css/makegrammar.pl to cure that - to no avail. Here's my patch:

--- Source/WebCore/css/makegrammar.pl   2020-04-14 00:51:51.000000000 +0200
+++ Source/WebCore/css/makegrammar.pl   2020-10-25 14:59:39.879927464 +0100
@@ -73,7 +73,6 @@
 }

 my $fileBase = File::Spec->join($outputDir, $filename);
-my @bisonCommand = ($bison, "-d", "-p", $symbolsPrefix, $grammarFilePath, "-o", "$fileBase.cpp");
+my @bisonCommand = ($bison, "--no-lines", "--defines=$fileBase.hpp", "-p", $symbolsPrefix, $grammarFilePath
, "-o", $fileBase.cpp);
-push @bisonCommand, "--no-lines" if $^O eq "MSWin32"; # Work around bug in bison >= 3.0 on Windows where it
 puts backslashes into #line directives.
 system(@bisonCommand) == 0 or die;

--- Source/WebCore/css/CSSGrammar.y.in  2020-04-14 00:51:51.000000000 +0200
+++ Source/WebCore/css/CSSGrammar.y.in  2020-10-25 15:35:20.818799854 +0100
@@ -21,7 +21,7 @@
  *
  */

-%pure-parser
+%define api.pure

 %parse-param { CSSParser* parser }
 %lex-param { CSSParser* parser }

Now the previously missing XPathGrammar.hpp is created yet the file CSSGrammar.h is still missing and the build fails with:

In file included from /builddir/qtwebkit-opensource-src-5.212/Source/WebCore/css/CSSAllInOne.cpp:69:
/builddir/qtwebkit-opensource-src-5.212/Source/WebCore/css/CSSParser.cpp:11161:10: fatal error: CSSGrammar.h
: No such file or directory
11161 | #include "CSSGrammar.h"
      |          ^~~~~~~~~~~~~~
compilation terminated.

Note: I also tried --defines=$fileBase.cpp.h which is an alternative name for the input file which is read and wrapped in makegrammar.pl a few lines below the patch. I also tried with and without changing the obsolete %pure-parser to %define api.pure.

If anyone has a better knowledge of bison/yacc and how to fix the perl script please help fixing this issue.

Logarithmus pushed a commit to Logarithmus/void-packages that referenced this issue Nov 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant