Getting this error:
fatal error: CSSGrammar.hpp: No such file or directory
I found a patch for GNUmakefile.in that copies CSSGrammar.h and XPathGrammar.h to CSSGrammar.hpp and XPathGrammar.hpp respectively: https://www.linuxquestions.org/questions/slackware-14/sbo-scripts-not-building-on-current-read-1st-post-pls-4175561999/page195.html#post6160562
--- webkitgtk-2.4.11.orig/GNUmakefile.in 2020-08-28 22:11:51.510864558 +0800
+++ webkitgtk-2.4.11.new/GNUmakefile.in 2020-08-28 22:24:17.657842406 +0800
@@ -82071,6 +82071,7 @@
$(GENSOURCES_WEBCORE)/XPathGrammar.cpp: $(WebCore)/xml/XPathGrammar.y
$(AM_V_GEN)
$(AM_V_at)perl $(WebCore)/css/makegrammar.pl --outputDir $(GENSOURCES_WEBCORE) --bison "$(BISON)" --symbolsPrefix xpathyy $<
+ $(AM_V_at)cp $(GENSOURCES_WEBCORE)/XPathGrammar.h $(GENSOURCES_WEBCORE)/XPathGrammar.hpp
# MathML tag and attribute names, and element factory
DerivedSources/WebCore/MathMLElementFactory.h: DerivedSources/WebCore/MathMLElementFactory.cpp
@@ -82129,6 +82130,7 @@
DerivedSources/WebCore/CSSGrammar.cpp: $(WebCore)/css/CSSGrammar.y.in
$(AM_V_GEN)
$(AM_V_at)perl -I $(WebCore)/bindings/scripts $(WebCore)/css/makegrammar.pl --extraDefines "$(feature_defines)" --outputDir $(GENSOURCES_WEBCORE) --bison "$(BISON)" --symbolsPrefix cssyy $<
+ $(AM_V_at)cp $(GENSOURCES_WEBCORE)/CSSGrammar.h $(GENSOURCES_WEBCORE)/CSSGrammar.hpp
DerivedSources/WebCore/UserAgentStyleSheetsData.cpp: DerivedSources/WebCore/UserAgentStyleSheets.h
DerivedSources/WebCore/UserAgentStyleSheets.h: $(WebCore)/css/make-css-file-arrays.pl $(WebCore)/bindings/scripts/preprocessor.pm $(USER_AGENT_STYLE_SHEETS)
Applying it after the autoreconf in the PKGBUILD seems to work.
Pinned Comments
frealgagu commented on 2019-04-14 18:13 (UTC) (edited on 2020-12-06 03:31 (UTC) by frealgagu)
FAQ
Q: What's the difference between this package and extra/webkit2gtk?
A: webkitgtk/webkitgtk2 provides WebKit1 API/ABI, which is not compatible with WebKit2 API/ABI provided by extra/webkit2gtk. WebKitGTK+ 2.4.x is the latest branch that provides WebKit1 API. Later branches provides WebKit2 API only.
Please don't flag it as out-of-date.
Q: Are there binaries for this package somewhere?
A: I maintain the latest built package at https://github.com/frealgagu/archlinux.webkitgtk/releases
Q: "error while loading shared libraries: libicui18n.so.62: cannot open shared object file: No such file or directory"
A: You'll need to rebuild against the latest version of ICU.
Q: "error: ‘WTF::StringImpl::StaticASCIILiteraicASCIILiteral’ has not been declared" or any enchant errors.
A: If you are building in parallel, try disabling parallel using -j1 in /etc/makepkg.conf
Q: Why building takes too long time?
A: WebKit is inherently big and complex. You can modify /etc/makepkg.conf or PKGBUILD directly to build it in parallel.
Change "make all stamp-po" by "make -j x all stamp-po" in PKGBUILD replacing x by cores your machine has. (Thanks to @MadMe)
Change /etc/makepkg.conf in that way: https://wiki.archlinux.org/index.php/makepkg#Parallel_compilation under
# ARCHITECTURE, COMPILE FLAGS
useMAKEFLAGS="-j9"
# It should be one more than your virtual CPUs. (Thanks to @tuxsavvy).However be pending if errors occur as mentioned in previous question.
Q: How much I want to wait to a successful compilation?
A: It varies of your PC's processor and RAM, the times shared in the comments are as follow:
3.5 hours to build on core i5 laptop with 8G of RAM, makeflags j4. (@cabbage)
13.5 hours to build on AMD Athlon X2, makeflags j1 (@Bonnietwin).
5-6 hours on Core2Duo E8400 with 8GB RAM, makeflags j2 (tuxsavvy).
50 minutes on 6c/12t 3.3GHz (@kubrick).