Bug 60951 - [Qt] bad codegen, pointer diff in JSC::JSCallbackConstructor::JSCallbackConstructor
Summary: [Qt] bad codegen, pointer diff in JSC::JSCallbackConstructor::JSCallbackConst...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.6
: P2 Major
Assignee: Zeno Albisser
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-17 04:30 PDT by Benjamin Reed
Modified: 2011-11-01 03:17 PDT (History)
2 users (show)

See Also:


Attachments
patch against the qtwebkit 2.0 branch (411 bytes, application/octet-stream)
2011-05-17 04:30 PDT, Benjamin Reed
no flags Details
patch against the 2.1 and 2.2/HEAD branches (403 bytes, patch)
2011-05-17 04:31 PDT, Benjamin Reed
no flags Details | Formatted Diff | Diff
patch for review. (1.03 KB, patch)
2011-11-01 02:00 PDT, Zeno Albisser
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Reed 2011-05-17 04:30:31 PDT
Created attachment 93754 [details]
patch against the qtwebkit 2.0 branch

(I left the version at "Nightly build" since I wasn't sure what versions correspond to the 2.0/2.1/2.2 branches...)

On Mac OS X, when building QtWebkit as a standalone project, compilation fails with an error like os:

---(snip!)---
g++-4.2 -O -c -pipe -I/32sw/lib/system-openssl/include -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 -O2 -D__USE_WS_X11__ -DBUILDING_QT__=1 -DWTF_USE_ACCELERATED_COMPOSITING -DNDEBUG -DBUILDING_QT__ -DBUILDING_JavaScriptCore -DBUILDING_WTF -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_SHARED -I/32sw/lib/qt4-x11/mkspecs/darwin-g++ -I../../../JavaScriptCore -I/32sw/lib/qt4-x11/include/QtCore -I/32sw/lib/qt4-x11/include -I../../../JavaScriptCore -I../../../../qtwebkit-build -I../../../JavaScriptCore/assembler -I../../../JavaScriptCore/bytecode -I../../../JavaScriptCore/bytecompiler -I../../../JavaScriptCore/debugger -I../../../JavaScriptCore/interpreter -I../../../JavaScriptCore/jit -I../../../JavaScriptCore/parser -I../../../JavaScriptCore/pcre -I../../../JavaScriptCore/profiler -I../../../JavaScriptCore/runtime -I../../../JavaScriptCore/wtf -I/private/tmp/qtwebkit-build/JavaScriptCore/wtf/symbian -I../../../JavaScriptCore/wtf/unicode -I../../../JavaScriptCore/yarr -I../../../JavaScriptCore/API -I../../../JavaScriptCore/ForwardingHeaders -Igenerated -I../include/QtWebKit -I. -I../../../JavaScriptCore -I. -o obj/release/jsc.o ../../../JavaScriptCore/jsc.cpp
g++-4.2 -headerpad_max_install_names -L/32sw/lib/system-openssl/lib -prebind -o ./jsc obj/release/jsc.o    -L./release -L/32sw/lib/qt4-x11/lib -ljscore -lQtCore -L/32sw/lib/system-openssl/lib -L/32sw/lib/freetype219/lib -L/32sw/lib/fontconfig2/lib -L/32sw/lib -L/usr/X11R6/lib -L/32sw/lib/qt4-x11/lib -liconv -Wl,-framework,Carbon -Wl,-framework,AppKit -Wl,-framework,ApplicationServices -Wl,-framework,SystemConfiguration -lcrypto -lpng -lresolv -lssl -lz 
ld: bad codegen, pointer diff in JSC::JSCallbackConstructor::JSCallbackConstructor(JSC::JSGlobalObject*, WTF::NonNullPassRefPtr<JSC::Structure>, OpaqueJSClass*, OpaqueJSValue* (*)(OpaqueJSContext const*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**))to global weak symbol vtable for JSC::JSCellfor architecture i386
collect2: ld returned 1 exit status
---(snip!)---

This is the error you get in the webkit project in the 2.1 or 2.2 branches, in 2.0 it fails linking the QtWebKit framework itself.  The problem is a mixing-and-matching the use of "hide_symbols."

The fix is the attached changes to qtwebkit 2.0 and 2.1, which add a check for "reduce_exports" in QT_CONFIG to the relevant .pro files.
Comment 1 Benjamin Reed 2011-05-17 04:31:02 PDT
Created attachment 93755 [details]
patch against the 2.1 and 2.2/HEAD branches
Comment 2 Zeno Albisser 2011-11-01 02:00:14 PDT
Created attachment 113143 [details]
patch for review.
Comment 3 Simon Hausmann 2011-11-01 02:08:46 PDT
Comment on attachment 113143 [details]
patch for review.

r=me

Looks like it got lost in the build system refactorings. This should also be done in WebKit2.pro, but I understand that this single patch is easier to backport first :)
Comment 4 Zeno Albisser 2011-11-01 03:10:05 PDT
(In reply to comment #3)
> (From update of attachment 113143 [details])
> r=me
> 
> Looks like it got lost in the build system refactorings. This should also be done in WebKit2.pro, but I understand that this single patch is easier to backport first :)

i created a separate bugreport for that, and will fix it asap: https://bugs.webkit.org/show_bug.cgi?id=71276
Comment 5 WebKit Review Bot 2011-11-01 03:17:20 PDT
Comment on attachment 113143 [details]
patch for review.

Clearing flags on attachment: 113143

Committed r98947: <http://trac.webkit.org/changeset/98947>
Comment 6 WebKit Review Bot 2011-11-01 03:17:24 PDT
All reviewed patches have been landed.  Closing bug.