Bug 60357 - JavaScriptCore fails to build with gcc 4.6
Summary: JavaScriptCore fails to build with gcc 4.6
Status: RESOLVED DUPLICATE of bug 60265
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-06 01:33 PDT by Bernhard Rosenkraenzer
Modified: 2011-05-06 10:28 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Rosenkraenzer 2011-05-06 01:33:34 PDT
(Seen in the qtwebkit-2.2 branch, but given it doesn't seem Qt related, it's probably also a problem for the other platforms)

-Werror is in the default compiler flags (at least for QtWebKit on X11), causing NullPtr.h to fail because of a new gcc 4.6 warning:

make[1]: Entering directory `/usr/src/ark/BUILD/qtwebkit/WebKitBuild/Release/JavaScriptCore'
g++ -c -m64 -pipe -Wall -Wextra -Wreturn-type -fno-strict-aliasing -Wcast-align -Wchar-subscripts -Wformat-security -Wreturn-type -Wno-unused-parameter -Wno-sign-compare -Wno-switch -Wno-switch-enum -Wundef -Wmissing-noreturn -Winit-self -Werror -fno-stack-protector -O3 -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -D_REENTRANT -DENABLE_DEVICE_ORIENTATION=1 -DENABLE_DIRECTORY_UPLOAD=1 -DENABLE_INPUT_SPEECH=1 -DENABLE_LINK_PREFETCH=1 -DENABLE_MATHML=1 -DUSE_SYSTEM_MALLOC=1 -DENABLE_SVG_DOM_OBJC_BINDINGS=1 -DNDEBUG -DBUILDING_QT__=1 -DNDEBUG -DQT_ASCII_CAST_WARNINGS -DBUILDING_JavaScriptCore -DBUILDING_WTF -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++-64 -I../../../Source/JavaScriptCore -I/usr/lib64/qt4/include/QtCore -I/usr/lib64/qt4/include -I../../../Source/JavaScriptCore -I../../../Source -I../../../Source/ThirdParty -I../../../Source/JavaScriptCore/assembler -I../../../Source/JavaScriptCore/bytecode -I../../../Source/JavaScriptCore/bytecompiler -I../../../Source/JavaScriptCore/heap -I../../../Source/JavaScriptCore/dfg -I../../../Source/JavaScriptCore/debugger -I../../../Source/JavaScriptCore/interpreter -I../../../Source/JavaScriptCore/jit -I../../../Source/JavaScriptCore/parser -I../../../Source/JavaScriptCore/profiler -I../../../Source/JavaScriptCore/runtime -I../../../Source/JavaScriptCore/wtf -I../../../Source/JavaScriptCore/wtf/gobject -I/usr/src/ark/BUILD/qtwebkit/Source/JavaScriptCore/wtf/symbian -I../../../Source/JavaScriptCore/wtf/unicode -I../../../Source/JavaScriptCore/yarr -I../../../Source/JavaScriptCore/API -I../../../Source/JavaScriptCore/ForwardingHeaders -Igenerated -I../../../Source -I../include/QtWebKit -I../include -I. -I../../../Source/JavaScriptCore -I. -o obj/release/YarrInterpreter.o ../../../Source/JavaScriptCore/yarr/YarrInterpreter.cpp
In file included from ../../../Source/JavaScriptCore/wtf/PassRefPtr.h:25:0,
                 from ../../../Source/JavaScriptCore/wtf/CrossThreadRefCounted.h:35,
                 from ../../../Source/JavaScriptCore/wtf/text/StringImpl.h:28,
                 from ../../../Source/JavaScriptCore/runtime/UString.h:26,
                 from ../../../Source/JavaScriptCore/yarr/YarrPattern.h:30,
                 from ../../../Source/JavaScriptCore/yarr/YarrInterpreter.h:29,
                 from ../../../Source/JavaScriptCore/yarr/YarrInterpreter.cpp:28:
../../../Source/JavaScriptCore/wtf/NullPtr.h:48:1: error: identifier 'nullptr' will become a keyword in C++0x [-Werror=c++0x-compat]
cc1plus: all warnings being treated as errors

make[1]: *** [obj/release/YarrInterpreter.o] Error 1


The easiest fixes are to either not use -Werror, given the warning in this context is clearly harmless, or to put gcc 4.6 into c++0x mode (in that case, NullPtr.h already does the right thing and uses the compiler's nullptr
Comment 1 Alexis Menard (darktears) 2011-05-06 10:28:35 PDT
it has been fixed :

*** This bug has been marked as a duplicate of bug 60265 ***