RESOLVED FIXED Bug 105818
[Qt] Can't link Qt5WebKit.dll - wrong library linking order
https://bugs.webkit.org/show_bug.cgi?id=105818
Summary [Qt] Can't link Qt5WebKit.dll - wrong library linking order
Jonathan Liu
Reported 2012-12-27 23:02:01 PST
Compiler: MinGW-builds GCC 4.7.2 64-bit rev 5 Configuration: Qt 5 stable branch with desktop OpenGL (ANGLE is disabled) mingw32-make[3]: Entering directory 'C:/Work/git/qt5/qtwebkit/Source' g++ -shared -Wl,--out-implib,C:\Work\git\qt5\qtbase\lib\libQt5WebKitd.a -o C:\Work\git\qt5\qtbase\lib\Qt5WebKitd.dll .obj/debug_shared/qrc_WebCore.o .obj/debug_shared/qrc_WebKit.o .obj/debug_shared/qrc_InspectorBackendCommands.o -lglu32 -lopengl32 -lgdi32 -luser32 -LC:\Qt\qt5_deps\icu\dist\lib -LC:\Qt\qt5_deps\openssl-1.0.1c\dist\lib -LC:\Qt\qt5_deps\icu\dist\lib -LC:\Qt\qt5_deps\openssl-1.0.1c\dist\lib -LC:/Work/git/qt5/qtbase/lib -lQt5Networkd -LC:/Work/git/qt5/qtbase/lib -lQt5Guid -LC:/Work/git/qt5/qtbase/lib -lQt5Cored .obj\debug_shared\Qt5WebKitd_resource_res.o -Wl,-whole-archive -lWebKit1d -Wl,-no-whole-archive -LC:/Work/git/qt5/qtwebkit/Source/WebKit/debug -Wl,-whole-archive -lWebCored -Wl,-no-whole-archive -LC:/Work/git/qt5/qtwebkit/Source/WebCore/debug -ladvapi32 -lgdi32 -lshell32 -lshlwapi -luser32 -lversion -lgdi32 -lole32 -luser32 -Wl,-whole-archive -lJavaScriptCored -Wl,-no-whole-archive -LC:/Work/git/qt5/qtwebkit/Source/JavaScriptCore/debug -lwinmm -Wl,-whole-archive -lWTFd -Wl,-no-whole-archive -LC:/Work/git/qt5/qtwebkit/Source/WTF/debug -licuin -licuuc -licudt -lwinmm -lgdi32 -LC:/Work/git/qt5/qtbase/lib -lQt5Guid -LC:/Work/git/qt5/qtbase/lib -lQt5Sqld -LC:/Work/git/qt5/qtbase/lib -lQt5Cored mingw32-make[3]: Entering directory 'C:/Work/git/qt5/qtwebkit/Source' g++ -Wl,-s -shared -Wl,--out-implib,C:\Work\git\qt5\qtbase\lib\libQt5WebKit.a -o C:\Work\git\qt5\qtbase\lib\Qt5WebKit.dll .obj/release_shared/qrc_WebCore.o .obj/release_shared/qrc_WebKit.o .obj/release_shared/qrc_InspectorBackendCommands.o -lglu32 -lopengl32 -lgdi32 -luser32 -LC:\Qt\qt5_deps\icu\dist\lib -LC:\Qt\qt5_deps\openssl-1.0.1c\dist\lib -LC:\Qt\qt5_deps\icu\dist\lib -LC:\Qt\qt5_deps\openssl-1.0.1c\dist\lib -LC:/Work/git/qt5/qtbase/lib -lQt5Network -LC:/Work/git/qt5/qtbase/lib -lQt5Gui -LC:/Work/git/qt5/qtbase/lib -lQt5Core .obj\release_shared\Qt5WebKit_resource_res.o -Wl,-whole-archive -lWebKit1 -Wl,-no-whole-archive -LC:/Work/git/qt5/qtwebkit/Source/WebKit/release -Wl,-whole-archive -lWebCore -Wl,-no-whole-archive -LC:/Work/git/qt5/qtwebkit/Source/WebCore/release -ladvapi32 -lgdi32 -lshell32 -lshlwapi -luser32 -lversion -lgdi32 -lole32 -luser32 -Wl,-whole-archive -lJavaScriptCore -Wl,-no-whole-archive -LC:/Work/git/qt5/qtwebkit/Source/JavaScriptCore/release -lwinmm -Wl,-whole-archive -lWTF -Wl,-no-whole-archive -LC:/Work/git/qt5/qtwebkit/Source/WTF/release -licuin -licuuc -licudt -lwinmm -lgdi32 -LC:/Work/git/qt5/qtbase/lib -lQt5Gui -LC:/Work/git/qt5/qtbase/lib -lQt5Sql -LC:/Work/git/qt5/qtbase/lib -lQt5Core C:/Work/git/qt5/qtwebkit/Source/WebKit/release/libWebKit1.a(QWebPageAdapter.o):QWebPageAdapter.cpp:(.text+0x950): undefined reference to `__imp__ZN21QNetworkAccessManagerC1EP7QObject' C:/Work/git/qt5/qtwebkit/Source/WebKit/release/libWebKit1.a(QWebFrameAdapter.o):QWebFrameAdapter.cpp:(.text+0x270b): undefined reference to `__imp__ZNK15QNetworkRequest3urlEv' C:/Work/git/qt5/qtwebkit/Source/WebKit/release/libWebKit1.a(QWebFrameAdapter.o):QWebFrameAdapter.cpp:(.text+0x2943): undefined reference to `__imp__ZNK15QNetworkRequest9attributeENS_9AttributeERK8QVariant' C:/Work/git/qt5/qtwebkit/Source/WebKit/release/libWebKit1.a(QWebFrameAdapter.o):QWebFrameAdapter.cpp:(.text+0x29c2): undefined reference to `__imp__ZNK15QNetworkRequest13rawHeaderListEv' C:/Work/git/qt5/qtwebkit/Source/WebKit/release/libWebKit1.a(QWebFrameAdapter.o):QWebFrameAdapter.cpp:(.text+0x2bad): undefined reference to `__imp__ZNK15QNetworkRequest9rawHeaderERK10QByteArray' C:/Work/git/qt5/qtwebkit/Source/WebKit/release/libWebKit1.a(QWebFrameAdapter.o):QWebFrameAdapter.cpp:(.text+0x33f2): undefined reference to `__imp__ZNK15QNetworkRequest9attributeENS_9AttributeERK8QVariant' c:/mingw64-4.7.2/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Work/git/qt5/qtwebkit/Source/WebKit/release/libWebKit1.a(QWebFrameAdapter.o): bad reloc address 0x0 in section `.pdata$_ZN3JSC14SourceProvider16cacheSizeChangedEi' collect2.exe: error: ld returned 1 exit status Makefile.api.Release:81: recipe for target 'C:\Work\git\qt5\qtbase\lib\Qt5WebKit.dll' failed mingw32-make[3]: *** [C:\Work\git\qt5\qtbase\lib\Qt5WebKit.dll] Error 1 mingw32-make[3]: Leaving directory 'C:/Work/git/qt5/qtwebkit/Source' It seems that -lQt5Network is in the wrong place. It needs to be specified after -lWebKit1 and -lWebCore. In Tools/qmake/mkspecs/features/default_post.prf, the creating_module scope moves libraries from LIBS to LIBS_PRIVATE which places -lWebKit1 and -lWebCore after the Qt libraries.
Attachments
Patch (1.60 KB, patch)
2012-12-29 17:21 PST, Jonathan Liu
no flags
Jonathan Liu
Comment 1 2012-12-29 17:21:35 PST
Jonathan Liu
Comment 2 2013-01-03 03:19:18 PST
Ping.
WebKit Review Bot
Comment 3 2013-01-03 06:15:02 PST
Comment on attachment 180948 [details] Patch Clearing flags on attachment: 180948 Committed r138707: <http://trac.webkit.org/changeset/138707>
WebKit Review Bot
Comment 4 2013-01-03 06:15:05 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.