JDK-8141345 : Cannot build WebKit with bison3
  • Type: Bug
  • Component: javafx
  • Sub-Component: web
  • Affected Version: 8u60,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-11-03
  • Updated: 2015-11-13
  • Resolved: 2015-11-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u92Fixed 9Fixed
Description
Compiling the current 8u-dev or 9-dev WebKit sources with bison3 produces the following error:

...
    cl -c -FIwebcorejava_pch.h -Yuwebcorejava_pch.h -Fpobj\jfxwebkit_pch.pch -nologo -Zm200 -Zc:wchar_t -FS -DU_STATIC_IMPLEMENTATION -w34100 -w34189 -wd4291 -wd4344 -wd4996 -MP4 -Zc:wchar_t -D__STDC_FORMAT_MACROS -DLIBXML_STATIC -DLIBXSLT_STATIC -O2 -MD -W0 -GR -EHsc -DUNICODE -DWIN32 -DIMAGEIO=1 -DNDEBUG -DBUILDING_JAVA__ -DUSE_SYSTEM_MALLOC -DSTATICALLY_LINKED_WITH_WebCore -DSTATICALLY_LINKED_WITH_JavaScriptCore -DSTATICALLY_LINKED_WITH_WTF -DNOMINMAX -DBUILDING_WebCore -DBUILD_WEBKIT -DWTF_USE_LIBXML2=1 -DWTF_USE_ACCELERATED_COMPOSITING=1 -DICU_UNICODE=1 -DENABLE_3D_RENDERING=1 -DENABLE_ACCELERATED_2D_CANVAS=0 -DENABLE_BATTERY_STATUS=0 -DENABLE_BLOB=0 -DENABLE_CANVAS_PATH=1 -DENABLE_CANVAS_PROXY=0 -DENABLE_CHANNEL_MESSAGING=1 -DENABLE_CSP_NEXT=0 -DENABLE_CSS_BOX_DECORATION_BREAK=1 -DENABLE_CSS_COMPOSITING=1 -DENABLE_CSS_EXCLUSIONS=1 -DENABLE_CSS_FILTERS=1 -DENABLE_CSS_GRID_LAYOUT=0 -DENABLE_CSS_HIERARCHIES=0 -DENABLE_CSS_IMAGE_ORIENTATION=0 -DENABLE_CSS_IMAGE_RESOLUTION=0 -DENABLE_CSS_IMAGE_SET=1 -DENABLE_CSS_REGIONS=1 -DENABLE_CSS_SHADERS=0 -DENABLE_CSS_STICKY_POSITION=1 -DENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED=1 -DENABLE_CSS_VARIABLES=0 -DENABLE_CSS3_CONDITIONAL_RULES=0 -DENABLE_CSS3_TEXT=0 -DENABLE_CSS3_TEXT_LINE_BREAK=0 -DENABLE_DASHBOARD_SUPPORT=0 -DENABLE_DATAGRID=0 -DENABLE_DATALIST_ELEMENT=1 -DENABLE_DATA_TRANSFER_ITEMS=0 -DENABLE_DETAILS_ELEMENT=1 -DENABLE_DEVICE_ORIENTATION=0 -DENABLE_DIRECTORY_UPLOAD=0 -DENABLE_DOWNLOAD_ATTRIBUTE=0 -DENABLE_FAST_MOBILE_SCROLLING=0 -DENABLE_FILE_SYSTEM=0 -DENABLE_FILTERS=1 -DENABLE_FONT_LOAD_EVENTS=0 -DENABLE_FTPDIR=1 -DENABLE_FULLSCREEN_API=1 -DENABLE_GAMEPAD=0 -DENABLE_GEOLOCATION=0 -DENABLE_GESTURE_EVENTS=1 -DENABLE_HIGH_DPI_CANVAS=0 -DENABLE_ICONDATABASE=0 -DENABLE_IFRAME_SEAMLESS=1 -DENABLE_INDEXED_DATABASE=0 -DENABLE_INPUT_SPEECH=0 -DENABLE_INPUT_TYPE_COLOR=1 -DENABLE_INPUT_TYPE_DATE=1 -DENABLE_INPUT_TYPE_DATETIME_INCOMPLETE=1 -DENABLE_INPUT_TYPE_DATETIMELOCAL=1 -DENABLE_INPUT_TYPE_MONTH=1 -DENABLE_INPUT_TYPE_TIME=1 -DENABLE_INPUT_TYPE_WEEK=1 -DENABLE_INSPECTOR=1 -DENABLE_INSPECTOR_SERVER=1 -DENABLE_JAVASCRIPT_DEBUGGER=1 -DENABLE_LEGACY_CSS_VENDOR_PREFIXES=0 -DENABLE_LEGACY_NOTIFICATIONS=1 -DENABLE_LEGACY_VIEWPORT_ADAPTION=1 -DENABLE_LEGACY_VENDOR_PREFIXES=1 -DENABLE_LEGACY_WEB_AUDIO=1 -DENABLE_LINK_PREFETCH=1 -DENABLE_MATHML=1 -DENABLE_MEDIA_SOURCE=0 -DENABLE_MEDIA_STATISTICS=0 -DENABLE_MEDIA_STREAM=0 -DENABLE_METER_ELEMENT=1 -DENABLE_MHTML=1 -DENABLE_MICRODATA=1 -DENABLE_MOUSE_CURSOR_SCALE=0 -DENABLE_NAVIGATOR_CONTENT_UTILS=0 -DENABLE_NETSCAPE_PLUGIN_API=0 -DENABLE_NETWORK_INFO=0 -DENABLE_NOSNIFF=0 -DENABLE_NOTIFICATIONS=1 -DENABLE_ORIENTATION_EVENTS=0 -DENABLE_PAGE_VISIBILITY_API=1 -DENABLE_PLUGIN_PACKAGE_SIMPLE_HASH=1 -DENABLE_PROGRESS_ELEMENT=1 -DENABLE_PROXIMITY_EVENTS=0 -DENABLE_QUOTA=0 -DENABLE_RESOLUTION_MEDIA_QUERY=1 -DENABLE_RESOURCE_TIMING=0 -DENABLE_SCRIPTED_SPEECH=0 -DENABLE_SECCOMP_FILTERS=0 -DENABLE_SHADOW_DOM=0 -DENABLE_SHARED_WORKERS=1 -DENABLE_SQL_DATABASE=0 -DENABLE_STYLE_SCOPED=0 -DENABLE_SUBPIXEL_LAYOUT=1 -DENABLE_SVG=1 -DENABLE_SVG_FONTS=1 -DENABLE_TEMPLATE_ELEMENT=0 -DENABLE_TEXT_AUTOSIZING=0 -DENABLE_THREADED_HTML_PARSER=0 -DENABLE_TOUCH_ADJUSTMENT=0 -DENABLE_TOUCH_EVENTS=0 -DENABLE_TOUCH_ICON_LOADING=0 -DENABLE_USER_TIMING=0 -DENABLE_VIBRATION=0 -DENABLE_VIDEO=1 -DENABLE_VIDEO_TRACK=0 -DENABLE_VIEW_MODE_CSS_MEDIA=1 -DENABLE_WEBGL=0 -DENABLE_WEB_AUDIO=0 -DENABLE_WEB_SOCKETS=1 -DENABLE_WEB_TIMING=1 -DENABLE_WORKERS=1 -DENABLE_XHR_TIMEOUT=1 -DENABLE_XML=1 -DENABLE_XSLT=1 -DENABLE_NETSCAPE_PLUGIN_API=1 -DENABLE_PROMISES=1 -I"C:/java/jdk1.8.0_40\include" -I"..\..\..\..\src\main\native\Source\JavaScriptCore\os-win32" -I"C:\javafx\rt\modules\web\build\win\import\include" -I"C:/java/jdk1.8.0_40\include\win32" -I"C:\javafx\rt\modules\web\build\win\import\include\icu" -I"generated" -I"..\..\..\..\src\main\native\Source" -I"..\..\..\..\src\main\native\Source\WebCore" -I"..\..\..\..\src\main\native\Source\WebCore\accessibility" -I"..\..\..\..\src\main\native\Source\WebCore\bindings" -I"..\..\..\..\src\main\native\Source\WebCore\bindings\generic" -I"..\..\..\..\src\main\native\Source\WebCore\bindings\java" -I"..\..\..\..\src\main\native\Source\WebCore\bindings\js" -I"..\..\..\..\src\main\native\Source\WebCore\bridge" -I"..\..\..\..\src\main\native\Source\WebCore\bridge\c" -I"..\..\..\..\src\main\native\Source\WebCore\bridge\jni" -I"..\..\..\..\src\main\native\Source\WebCore\bridge\jni\jsc" -I"..\..\..\..\src\main\native\Source\WebCore\bridge\jsc" -I"..\..\..\..\src\main\native\Source\WebCore\css" -I"..\..\..\..\src\main\native\Source\WebCore\cssjit" -I"..\..\..\..\src\main\native\Source\WebCore\crypto\keys" -I"..\..\..\..\src\main\native\Source\WebCore\crypto" -I"..\..\..\..\src\main\native\Source\WebCore\dom" -I"..\..\..\..\src\main\native\Source\WebCore\dom\default" -I"..\..\..\..\src\main\native\Source\WebCore\editing" -I"..\..\..\..\src\main\native\Source\WebCore\fileapi" -I"..\..\..\..\src\main\native\Source\WebCore\history" -I"..\..\..\..\src\main\native\Source\WebCore\html" -I"..\..\..\..\src\main\native\Source\WebCore\html\canvas" -I"..\..\..\..\src\main\native\Source\WebCore\html\parser" -I"..\..\..\..\src\main\native\Source\WebCore\html\shadow" -I"..\..\..\..\src\main\native\Source\WebCore\html\track" -I"..\..\..\..\src\main\native\Source\WebCore\html\forms" -I"..\..\..\..\src\main\native\Source\WebCore\inspector" -I"..\..\..\..\src\main\native\Source\WebCore\loader" -I"..\..\..\..\src\main\native\Source\WebCore\loader\appcache" -I"..\..\..\..\src\main\native\Source\WebCore\loader\archive" -I"..\..\..\..\src\main\native\Source\WebCore\loader\archive\mhtml" -I"..\..\..\..\src\main\native\Source\WebCore\loader\cache" -I"..\..\..\..\src\main\native\Source\WebCore\loader\icon" -I"..\..\..\..\src\main\native\Source\WebCore\mathml" -I"..\..\..\..\src\main\native\Source\WebCore\page" -I"..\..\..\..\src\main\native\Source\WebCore\page\animation" -I"..\..\..\..\src\main\native\Source\WebCore\page\java" -I"..\..\..\..\src\main\native\Source\WebCore\page\scrolling" -I"..\..\..\..\src\main\native\Source\WebCore\platform" -I"..\..\..\..\src\main\native\Source\WebCore\platform\animation" -I"..\..\..\..\src\main\native\Source\WebCore\platform\audio" -I"..\..\..\..\src\main\native\Source\WebCore\platform\java" -I"..\..\..\..\src\main\native\Source\WebCore\platform\graphics" -I"..\..\..\..\src\main\native\Source\WebCore\platform\graphics\filters" -I"C:\javafx\rt\modules\web\src\main\native\Source\WebCore\platform\graphics\filters\arm" -I"..\..\..\..\src\main\native\Source\WebCore\platform\graphics\java" -I"..\..\..\..\src\main\native\Source\WebCore\platform\graphics\texmap" -I"..\..\..\..\src\main\native\Source\WebCore\platform\graphics\transforms" -I"..\..\..\..\src\main\native\Source\WebCore\platform\image-decoders" -I"..\..\..\..\src\main\native\Source\WebCore\platform\leveldb" -I"..\..\..\..\src\main\native\Source\WebCore\platform\mock" -I"..\..\..\..\src\main\native\Source\WebCore\platform\network" -I"..\..\..\..\src\main\native\Source\WebCore\platform\network\java" -I"..\..\..\..\src\main\native\Source\WebCore\platform\sql" -I"..\..\..\..\src\main\native\Source\WebCore\platform\text" -I"..\..\..\..\src\main\native\Source\WebCore\platform\text\icu" -I"..\..\..\..\src\main\native\Source\WebCore\plugins" -I"..\..\..\..\src\main\native\Source\WebCore\rendering" -I"..\..\..\..\src\main\native\Source\WebCore\rendering\mathml" -I"..\..\..\..\src\main\native\Source\WebCore\rendering\style" -I"..\..\..\..\src\main\native\Source\WebCore\rendering\svg" -I"..\..\..\..\src\main\native\Source\WebCore\rendering\line" -I"..\..\..\..\src\main\native\Source\WebCore\rendering\shapes" -I"..\..\..\..\src\main\native\Source\WebCore\storage" -I"..\..\..\..\src\main\native\Source\WebCore\style" -I"..\..\..\..\src\main\native\Source\WebCore\svg" -I"..\..\..\..\src\main\native\Source\WebCore\svg\animation" -I"..\..\..\..\src\main\native\Source\WebCore\svg\graphics" -I"..\..\..\..\src\main\native\Source\WebCore\svg\graphics\filters" -I"..\..\..\..\src\main\native\Source\WebCore\svg\properties" -I"..\..\..\..\src\main\native\Source\WebCore\testing" -I"..\..\..\..\src\main\native\Source\WebCore\workers" -I"..\..\..\..\src\main\native\Source\WebCore\xml" -I"..\..\..\..\src\main\native\Source\WebCore\xml\parser" -I"..\..\..\..\src\main\native\Source\WebCore\Modules\battery" -I"..\..\..\..\src\main\native\Source\WebCore\Modules\gamepad" -I"..\..\..\..\src\main\native\Source\WebCore\Modules\geolocation" -I"..\..\..\..\src\main\native\Source\WebCore\Modules\indexeddb" -I"..\..\..\..\src\main\native\Source\WebCore\Modules\mediastream" -I"..\..\..\..\src\main\native\Source\WebCore\Modules\mediasource" -I"..\..\..\..\src\main\native\Source\WebCore\Modules\networkinfo" -I"..\..\..\..\src\main\native\Source\WebCore\Modules\notifications" -I"..\..\..\..\src\main\native\Source\WebCore\Modules\quota" -I"..\..\..\..\src\main\native\Source\WebCore\Modules\speech" -I"..\..\..\..\src\main\native\Source\WebCore\Modules\vibration" -I"..\..\..\..\src\main\native\Source\WebCore\Modules\webdatabase" -I"..\..\..\..\src\main\native\Source\WebCore\Modules\websockets" -I"..\..\..\..\src\main\native\Source\WebCore\Modules\plugins" -I"..\..\..\..\src\main\native\Source\JavaScriptCore" -I"..\..\..\..\src\main\native\Source\JavaScriptCore\assembler" -I"..\..\..\..\src\main\native\Source\JavaScriptCore\API" -I"..\..\..\..\src\main\native\Source\JavaScriptCore\bindings" -I"..\..\..\..\src\main\native\Source\JavaScriptCore\bytecode" -I"..\..\..\..\src\main\native\Source\JavaScriptCore\dfg" -I"..\..\..\..\src\main\native\Source\JavaScriptCore\disassembler" -I"..\..\..\..\src\main\native\Source\JavaScriptCore\ForwardingHeaders" -I"..\..\..\..\src\main\native\Source\JavaScriptCore\heap" -I"..\..\..\..\src\main\native\Source\JavaScriptCore\interpreter" -I"..\..\..\..\src\main\native\Source\JavaScriptCore\inspector" -I"..\..\..\..\src\main\native\Source\JavaScriptCore\jit" -I"..\..\..\..\src\main\native\Source\JavaScriptCore\llint" -I"..\..\..\..\src\main\native\Source\JavaScriptCore\parser" -I"..\..\..\..\src\main\native\Source\JavaScriptCore\profiler" -I"..\..\..\..\src\main\native\Source\JavaScriptCore\runtime" -I"..\..\..\..\src\main\native\Source\JavaScriptCore\yarr" -I"..\..\..\..\src\main\native\Source\WTF" -I"..\..\..\..\src\main\native\Source\WTF\wtf" -I"..\..\..\..\src\main\native\Source\WTF\wtf\text" -I"..\..\..\..\src\main\native\Source\WTF\wtf\java" -I"..\..\..\..\src\main\native\Source\WTF\wtf\unicode\java" -I"..\..\..\..\src\main\native\WebKitLibraries\zlib\include" -I"..\..\..\generated-src\headers" -I"..\..\..\..\src\main\native\Source\JavaScriptCore" -I"..\JavaScriptCore\generated" -I"." -I"..\..\..\..\..\..\..\..\..\..\..\Qt5.2.0\5.2.0\msvc2012_64\mkspecs\win32-msvc2013" -Foobj\ @C:\Users\java_re\AppData\Local\Temp\2\nm2D63.tmp
...
PlugInsResourcesData.cpp
XPathGrammar.cpp
generated/XPathGrammar.tab.c(1100) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1106) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1112) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1118) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1124) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1130) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1136) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1142) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1148) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1154) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1160) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1166) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1172) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1178) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1184) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1190) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1196) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1202) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1208) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1214) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1220) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1226) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1232) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1238) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1244) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1250) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1256) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1262) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1268) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1274) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
generated/XPathGrammar.tab.c(1280) : error C2153: hex constants must have at least one hex digit (generated\XPathGrammar.cpp)
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '(' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
Process 'command 'perl'' finished with exit value 2 (state: FAILED)
:web:compileNativeWin FAILED
:web:compileNativeWin (Thread[main,5,main]) completed. Took 22 mins 31.528 secs.

Comments
http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/0576d7a6f137
13-11-2015

+1 I can push it this morning (since it is a build change I won't wait for Alexander to review).
13-11-2015

Webrev for review : http://cr.openjdk.java.net/~ghb/8141345/webrev.00/ Solution : Don't generate #line directives for windows platform Improvement could have done by checking the bison version from build.gradle and let the rule apply for bison > 2.7 version.
12-11-2015

Two solution (work around) for overcoming compilation error 1. Don't generate line directives (#line ..... ) current : bison -d -p xpathyy .... Ignore line directive : bison -l -d -p xpathyy From Bison Manual : "Don���t generate any #line preprocessor commands in the parser implementation file. Ordinarily Bison writes these commands in the parser implementation file so that the C compiler and debuggers will associate errors and object code with your source file (the grammar file). This directive causes them to associate errors with the parser implementation file, treating it as an independent source file in its own right." 2. Post process the XPathGrammar.cpp by replacing single slash with double slash using perl or sed
12-11-2015

This appears to be a bug in the cygwin version of bison3 itself. There are several minor differences between the files generated by bison 2.7 versus 3, but the bug that causes the failure is that some of the CPP #line directives generated by bison 3 are generated without properly escaping the backslash path separator (which is odd because in other cases it is done correctly). Here is an example of the differences: bison 2.7.12 (good) : /* Line 1393 of yacc.c */ #line 66 "..\\..\\..\\..\\src\\main\\native\\Source\\WebCore\\xml\\XPathGrammar.y" bison 3.0.2 (bad) : #line 66 "..\..\..\..\src\main\native\Source\WebCore\xml\XPathGrammar.y" /* yacc.c:1257 */ I also verifed that if I manually patch this one .cpp file replacing all occurrences of '\' with '\\' on all lines beginning with '#line', then the build succeeds.
03-11-2015