Bug 36212 - [Qt] Problem with building QtWebKit against Qt compiled statically
Summary: [Qt] Problem with building QtWebKit against Qt compiled statically
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P3 Major
Assignee: QtWebKit Unassigned
URL:
Keywords: Qt
Depends on:
Blocks: 29418 32435
  Show dependency treegraph
 
Reported: 2010-03-17 03:03 PDT by Jędrzej Nowacki
Modified: 2010-06-23 04:34 PDT (History)
3 users (show)

See Also:


Attachments
symbols (30.03 KB, text/plain)
2010-03-17 03:03 PDT, Jędrzej Nowacki
no flags Details
gdb output (3.05 KB, text/plain)
2010-03-17 03:05 PDT, Jędrzej Nowacki
no flags Details
Hack to make the symbols be exported (900 bytes, patch)
2010-03-17 03:34 PDT, Kent Hansen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jędrzej Nowacki 2010-03-17 03:03:16 PDT
Created attachment 50886 [details]
symbols

There is a problem with compilation of the WebKit (trunk) against the Qt 4.7 (trunk). 
The problem was found on Linux (i386 Debian/testing) with gcc 4.4.3.

After a successful compilation of the Qt (./configure --static with and without --no-webkit option), building WebKit in release mode (./build-webkit --qt --release) is not possible, because of bunch of unresolved symbols (see attachment "symbols").

Compilation in debug mode can be finished without errors, but produced binary is invalid. The QtLauncher crashes immediately after startup.
Comment 1 Jędrzej Nowacki 2010-03-17 03:05:17 PDT
Created attachment 50887 [details]
gdb output

I tried to debug the QtLauncher crash, but it doesn't make sense... It seems that build is broken.
Comment 2 Kent Hansen 2010-03-17 03:34:42 PDT
Created attachment 50890 [details]
Hack to make the symbols be exported

qwebkitglobal.h is using the Qt defines (QT_MAKEDLL, QT_SHARED) to determine how QWEBKIT_EXPORT should be defined.
This seems wrong when Qt is built statically, since QtWebKit is still built as a shared library (is there a way to build it statically too?).

The attached hack forces the symbols to be exported when building against a static Qt. This makes QtLauncher and friends link, but there is a second issue: QtLauncher crashes. When QCoreApplication::instance() is called from main.cpp, it returns a valid pointer, but when the same function is called from within libQtWebKit, it returns 0.
Comment 3 Kent Hansen 2010-03-17 04:10:12 PDT
For the record, I don't know if building with a static Qt has ever worked / is supposed to work.
Comment 4 Jędrzej Nowacki 2010-06-23 04:34:36 PDT
With Qt 4.7 we are unfortunately not going to support static linking of QtWebKit anymore.