Bug 18442 - Build fails in WebCore/css/CSSParser.cpp
Summary: Build fails in WebCore/css/CSSParser.cpp
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Other
: P2 Major
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2008-04-12 13:57 PDT by Adam Hoka
Modified: 2008-07-22 07:42 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Hoka 2008-04-12 13:57:50 PDT
I have tried to compile the snapshot WebKit-r31823, and I have encountered the following error:

=========SNIPPET==========
gmake[1]: Entering directory `/tnf/pkgsrc/wip/webkit-gtk/work/WebKit-r31823'
/bin/sh ./libtool --tag=CXX   --mode=compile c++ -DHAVE_CONFIG_H -I.  -DWTF_USE_ICU_UNICODE=1 -DBUILDING_GTK__=1 -DWTF_CHANGES  -DXP_UNIX -DNDEBUG     -I./WebCore -I./WebCore/platform -I./WebCore/platform/network -I./WebCore/platform/graphics -I./WebCore/platform/text -I./WebCore/loader -I./WebCore/loader/archive -I./WebCore/loader/icon -I./WebCore/css -I./WebCore/dom -I./WebCore/page -I./WebCore/bridge -I./WebCore/bridge/c -I./WebCore/editing -I./WebCore/history -I./WebCore/xml -I./WebCore/html -I./WebCore/bindings/js -I./WebCore/platform/image-decoders -I./WebCore/platform/image-decoders/bmp -I./WebCore/platform/image-decoders/gif -I./WebCore/platform/image-decoders/ico -I./WebCore/platform/image-decoders/jpeg -I./WebCore/platform/image-decoders/png -I./WebCore/platform/image-decoders/xbm -I./WebCore/plugins -I./WebCore/rendering -I./WebCore/bindings/js -DWTF_USE_CURL=1 -I./WebCore/platform/network/curl  -DENABLE_CROSS_DOCUMENT_MESSAGING=1 -DENABLE_DATABASE=1 -I./WebCore/platform/sql -I./WebCore/storage  -DENABLE_ICONDATABASE=1   -DENABLE_XPATH=1 -DENABLE_XSLT=1        -I./JavaScriptCore -I./JavaScriptCore/ForwardingHeaders -I./JavaScriptCore/wtf -I./JavaScriptCore/kjs -I./DerivedSources -I./JavaScriptCore/ForwardingHeaders -I./JavaScriptCore/wtf/unicode -I./JavaScriptCore/pcre -I./JavaScriptCore/kjs  -I./WebKit/gtk/webkit -DBUILDING_CAIRO__=1 -DBUILD_WEBKIT -I./WebCore/platform/gtk -I./WebCore/platform/graphics/gtk -I./WebCore/platform/graphics/cairo -I./WebCore/loader/gtk -I./WebCore/page/gtk -I./WebKit/gtk -I./WebKit/gtk/WebCoreSupport -I./WebKit/gtk/webkit -DUSE_FREETYPE=1   -I/usr/pkg/include -I/usr/pkg/include/freetype2 -I/usr/include/krb5 -DLDAP_DEPRECATED -I/usr/include -fno-strict-aliasing -fvisibility-inlines-hidden -fno-rtti -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wundef -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -fno-exceptions -fvisibility=hidden -pthread -I/usr/pkg/include/glib/glib-2.0 -I/usr/pkg/lib/glib-2.0/include   -D_REENTRANT -I/usr/pkg/include -D_POSIX_THREAD_SAFE_FUNCTIONS -I/usr/pkg/include/gtk-2.0 -I/usr/pkg/lib/gtk-2.0/include -I/usr/pkg/include/atk-1.0 -I/usr/pkg/include/cairo -I/usr/pkg/include/pango-1.0 -I/usr/pkg/include -I/usr/pkg/include/glib/glib-2.0 -I/usr/pkg/lib/glib-2.0/include -I/usr/pkg/include/freetype2 -I/usr/pkg/include/libpng12 -I/usr/pkg/include/libxml2   -I/usr/pkg/include    -I/usr/pkg/include    -I/usr/pkg/include -I/usr/pkg/include/libxml2     -O2 -march=i686 -I/usr/pkg/include -I/usr/pkg/include/freetype2 -I/usr/include/krb5 -DLDAP_DEPRECATED -I/usr/include -MT WebCore/css/libWebCore_la-CSSParser.lo -MD -MP -MF WebCore/css/.deps/libWebCore_la-CSSParser.Tpo -c -o WebCore/css/libWebCore_la-CSSParser.lo `test -f 'WebCore/css/CSSParser.cpp' || echo './'`WebCore/css/CSSParser.cpp
 c++ -DHAVE_CONFIG_H -I. -DWTF_USE_ICU_UNICODE=1 -DBUILDING_GTK__=1 -DWTF_CHANGES -DXP_UNIX -DNDEBUG -I./WebCore -I./WebCore/platform -I./WebCore/platform/network -I./WebCore/platform/graphics -I./WebCore/platform/text -I./WebCore/loader -I./WebCore/loader/archive -I./WebCore/loader/icon -I./WebCore/css -I./WebCore/dom -I./WebCore/page -I./WebCore/bridge -I./WebCore/bridge/c -I./WebCore/editing -I./WebCore/history -I./WebCore/xml -I./WebCore/html -I./WebCore/bindings/js -I./WebCore/platform/image-decoders -I./WebCore/platform/image-decoders/bmp -I./WebCore/platform/image-decoders/gif -I./WebCore/platform/image-decoders/ico -I./WebCore/platform/image-decoders/jpeg -I./WebCore/platform/image-decoders/png -I./WebCore/platform/image-decoders/xbm -I./WebCore/plugins -I./WebCore/rendering -I./WebCore/bindings/js -DWTF_USE_CURL=1 -I./WebCore/platform/network/curl -DENABLE_CROSS_DOCUMENT_MESSAGING=1 -DENABLE_DATABASE=1 -I./WebCore/platform/sql -I./WebCore/storage -DENABLE_ICONDATABASE=1 -DENABLE_XPATH=1 -DENABLE_XSLT=1 -I./JavaScriptCore -I./JavaScriptCore/ForwardingHeaders -I./JavaScriptCore/wtf -I./JavaScriptCore/kjs -I./DerivedSources -I./JavaScriptCore/ForwardingHeaders -I./JavaScriptCore/wtf/unicode -I./JavaScriptCore/pcre -I./JavaScriptCore/kjs -I./WebKit/gtk/webkit -DBUILDING_CAIRO__=1 -DBUILD_WEBKIT -I./WebCore/platform/gtk -I./WebCore/platform/graphics/gtk -I./WebCore/platform/graphics/cairo -I./WebCore/loader/gtk -I./WebCore/page/gtk -I./WebKit/gtk -I./WebKit/gtk/WebCoreSupport -I./WebKit/gtk/webkit -DUSE_FREETYPE=1 -I/usr/pkg/include -I/usr/pkg/include/freetype2 -I/usr/include/krb5 -DLDAP_DEPRECATED -I/usr/include -fno-strict-aliasing -fvisibility-inlines-hidden -fno-rtti -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wundef -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -fno-exceptions -fvisibility=hidden -pthread -I/usr/pkg/include/glib/glib-2.0 -I/usr/pkg/lib/glib-2.0/include -D_REENTRANT -I/usr/pkg/include -D_POSIX_THREAD_SAFE_FUNCTIONS -I/usr/pkg/include/gtk-2.0 -I/usr/pkg/lib/gtk-2.0/include -I/usr/pkg/include/atk-1.0 -I/usr/pkg/include/cairo -I/usr/pkg/include/pango-1.0 -I/usr/pkg/include -I/usr/pkg/include/glib/glib-2.0 -I/usr/pkg/lib/glib-2.0/include -I/usr/pkg/include/freetype2 -I/usr/pkg/include/libpng12 -I/usr/pkg/include/libxml2 -I/usr/pkg/include -I/usr/pkg/include -I/usr/pkg/include -I/usr/pkg/include/libxml2 -O2 -march=i686 -I/usr/pkg/include -I/usr/pkg/include/freetype2 -I/usr/include/krb5 -DLDAP_DEPRECATED -I/usr/include -MT WebCore/css/libWebCore_la-CSSParser.lo -MD -MP -MF WebCore/css/.deps/libWebCore_la-CSSParser.Tpo -c WebCore/css/CSSParser.cpp  -fPIC -DPIC -o WebCore/css/.libs/libWebCore_la-CSSParser.o
WebCore/css/tokenizer.flex: In member function 'int WebCore::CSSParser::lex()':
WebCore/css/tokenizer.flex:6: warning: unused variable 'yy_current_state'
WebCore/css/tokenizer.flex:7: warning: unused variable 'yy_cp'
WebCore/css/tokenizer.flex:7: warning: unused variable 'yy_bp'
WebCore/css/tokenizer.flex:8: warning: unused variable 'yy_act'
WebCore/css/CSSParser.cpp: At global scope:
WebCore/css/CSSParser.cpp:4023: error: expected `}' at end of input
gmake[1]: *** [WebCore/css/libWebCore_la-CSSParser.lo] Error 1
gmake[1]: Leaving directory `/tnf/pkgsrc/wip/webkit-gtk/work/WebKit-r31823'
gmake: *** [all] Error 2
*** Error code 2
=========SNIPPET==========

The build system is:

replaced$ uname -a
NetBSD grimnismal.regius.local 4.99.55 NetBSD 4.99.55 (GRIMNISMAL) #0: Mon Mar  3 10:43:13 CET 2008  replaced@grimnismal.hoka.micronet.pipenet.hu:/usr/build/obj/sys/arch/i386/compile/GRIMNISMAL i386
replaced$ gcc -v
Using built-in specs.
Target: i386--netbsdelf
Configured with: /usr/src/tools/gcc/../../gnu/dist/gcc4/configure --enable-long-long --disable-multilib --enable-threads --disable-symvers --build=x86_64-unknown-netbsd4.99.52 --host=i386--netbsdelf --target=i386--netbsdelf --enable-__cxa_atexit
Thread model: posix
gcc version 4.1.3 20080202 prerelease (NetBSD nb1 20080202)

Any ideas?
Comment 1 Julien Chaffraix 2008-05-27 04:16:08 PDT
Can you reproduce this bug with the latest revision or should we consider it solved? (there is some build breakages and you may have been unlucky)
Comment 2 Adam Hoka 2008-05-29 11:09:36 PDT
The last one I tried was WebKit-r34096, and it was still broken.
Someone contacted me who could build it with his local patches, but he wanted to test them and I couldn't contact him since.
He mentioned a missing '}'.

Should I try a more up to date snapshot or wait till those patches show up and send them here?
Comment 3 Julien Chaffraix 2008-05-30 09:13:47 PDT
(In reply to comment #2)
> The last one I tried was WebKit-r34096, and it was still broken.
> Someone contacted me who could build it with his local patches, but he wanted
> to test them and I couldn't contact him since.
> He mentioned a missing '}'.

That's what gcc is also pointing at. Unfortunately our buildbot (and I) have no issue. I tried some analysis on the code but as flex/bison is involved, it may be an issue with the generated files.

> Should I try a more up to date snapshot or wait till those patches show up and
> send them here?

We usually come up with build fixes quite fast (~1/2 days). In your case, it is surely a matter of platform / options that we do not cover.
I have little hope that it will help you but you could try a clean build (by removing WebKitBuild) with the latest revision. I would also use the default options (use `WebKitTools/Scripts/build-webkit --gtk` to build) as it is what is tracked by the buildbots. If it does build, you can try to narrow down the issue.

As I will not be able to test on NetBSD, I cannot help you much. You are better trying to come with a patch yourself or ask your contact for it (make sure you follow our guidelines for contributing patches).
Comment 4 Shawn Novak 2008-07-21 08:02:36 PDT
This bug is a result of a problem with the copy of flex included with NetBSD v4.0 (at least).  I didn't check any other version but a fresh build of flex-2.4.5a resolves this roadbump and less one other small change it compiles now.  It doesn't run but that's a different matter.
Comment 5 Pierre-Luc Beaudoin 2008-07-22 07:42:26 PDT
Closing as per Shawn Novak's request.