Summary: | [Qt] Fix build system to define QWEBKIT_EXPORT macro correctly | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Caio Marcelo de Oliveira Filho <cmarcelo> | ||||
Component: | New Bugs | Assignee: | Caio Marcelo de Oliveira Filho <cmarcelo> | ||||
Status: | RESOLVED WONTFIX | ||||||
Severity: | Normal | CC: | abecsi, ademar, benjamin, cavalcantii, jturcotte, menard, rafael.lobo, savagobr | ||||
Priority: | P2 | Keywords: | Qt, QtTriaged | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Caio Marcelo de Oliveira Filho
2011-08-01 07:54:15 PDT
Created attachment 102519 [details]
Patch
Comment on attachment 102519 [details]
Patch
LGTM, but I'm not a reviewer.
For the record, when building with Qt5 and WebKit r92122 in a Fedora 15 using Tools/Scripts/build-webkit --qt --makeargs="-j48" --qmakearg="CONFIG+=webkit2" I get these error messages: (...) g++ -m64 -Wl,-O1 -Wl,-rpath,/home/cmarcelo/Projects/WebKit/webkit2/WebKitBuild/Release/lib -Wl,-rpath,/home/cmarcelo/Projects/Qt/qt5/qtbase/lib -o tst_commonviewtests obj/release/tst_commonviewtests.o obj/release/webviewabstraction.o obj/release/moc_webviewabstraction.o -L/home/cmarcelo/Projects/WebKit/webkit2/WebKitBuild/Release/lib -L/home/cmarcelo/Projects/Qt/qt5/qtbase/lib -L/usr/X11R6/lib64 -lQtWebKit -lQtDeclarative -lQtOpenGL -lQtGui -lQtTest -lQtCore -lGL -lpthread g++ -m64 -Wl,-O1 -Wl,-rpath,/home/cmarcelo/Projects/WebKit/webkit2/WebKitBuild/Release/lib -Wl,-rpath,/home/cmarcelo/Projects/Qt/qt5/qtbase/lib -o tst_qtouchwebview obj/release/tst_qtouchwebview.o -L/home/cmarcelo/Projects/WebKit/webkit2/WebKitBuild/Release/lib -L/home/cmarcelo/Projects/Qt/qt5/qtbase/lib -L/usr/X11R6/lib64 -lQtWebKit -lQtDeclarative -lQtOpenGL -lQtGui -lQtTest -lQtCore -lGL -lpthread obj/release/tst_qdesktopwebview.o: In function `tst_QDesktopWebView::init()': tst_qdesktopwebview.cpp:(.text+0x109): undefined reference to `QDesktopWebView::QDesktopWebView(QSGItem*)' obj/release/tst_qdesktopwebview.o: In function `tst_QDesktopWebView::navigationActionsStatusAtStartup()': tst_qdesktopwebview.cpp:(.text+0x214): undefined reference to `QDesktopWebView::navigationAction(QtWebKit::NavigationAction) const' tst_qdesktopwebview.cpp:(.text+0x2c2): undefined reference to `QDesktopWebView::navigationAction(QtWebKit::NavigationAction) const' tst_qdesktopwebview.cpp:(.text+0x36a): undefined reference to `QDesktopWebView::navigationAction(QtWebKit::NavigationAction) const' tst_qdesktopwebview.cpp:(.text+0x412): undefined reference to `QDesktopWebView::navigationAction(QtWebKit::NavigationAction) const' obj/release/tst_qdesktopwebview.o: In function `_ZN18LoadStartedCatcher18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv.part.4': tst_qdesktopwebview.cpp:(.text+0x74a): undefined reference to `QDesktopWebView::navigationAction(QtWebKit::NavigationAction) const' obj/release/tst_qdesktopwebview.o:tst_qdesktopwebview.cpp:(.text+0xcd4): more undefined references to `QDesktopWebView::navigationAction(QtWebKit::NavigationAction) const' follow obj/release/tst_qdesktopwebview.o: In function `tst_QDesktopWebView::stopActionEnabledAfterLoadStarted()': tst_qdesktopwebview.cpp:(.text+0xdf5): undefined reference to `QDesktopWebView::load(QUrl const&)' collect2: ld returned 1 exit status make[2]: *** [tst_qdesktopwebview] Error 1 make[2]: Leaving directory `/home/cmarcelo/Projects/WebKit/webkit2/WebKitBuild/Release/WebKit2/UIProcess/API/qt/tests/qdesktopwebview' make[1]: *** [sub-qdesktopwebview-make_default] Error 2 make[1]: *** Waiting for unfinished jobs.... obj/release/webviewabstraction.o: In function `WebViewAbstraction::load(QUrl const&)': webviewabstraction.cpp:(.text+0xa9): undefined reference to `QTouchWebView::page()' webviewabstraction.cpp:(.text+0xb4): undefined reference to `QTouchWebPage::load(QUrl const&)' obj/release/webviewabstraction.o: In function `WebViewAbstraction::url(QUrl&) const': webviewabstraction.cpp:(.text+0xf4): undefined reference to `QTouchWebView::page()' webviewabstraction.cpp:(.text+0xff): undefined reference to `QTouchWebPage::url() const' webviewabstraction.cpp:(.text+0x10d): undefined reference to `QDesktopWebView::url() const' obj/release/webviewabstraction.o: In function `WebViewAbstraction::loadProgress() const': webviewabstraction.cpp:(.text+0xdae): undefined reference to `QTouchWebView::page()' webviewabstraction.cpp:(.text+0xdb6): undefined reference to `QTouchWebPage::loadProgress() const' webviewabstraction.cpp:(.text+0xdc1): undefined reference to `QDesktopWebView::loadProgress() const' obj/release/webviewabstraction.o: In function `WebViewAbstraction::triggerNavigationAction(QtWebKit::NavigationAction)': webviewabstraction.cpp:(.text+0x1490): undefined reference to `QTouchWebView::page()' webviewabstraction.cpp:(.text+0x149a): undefined reference to `QTouchWebPage::navigationAction(QtWebKit::NavigationAction)' webviewabstraction.cpp:(.text+0x14af): undefined reference to `QDesktopWebView::navigationAction(QtWebKit::NavigationAction) const' obj/release/webviewabstraction.o: In function `WebViewAbstraction::WebViewAbstraction()': webviewabstraction.cpp:(.text+0x151e): undefined reference to `QTouchWebView::QTouchWebView(QSGItem*)' webviewabstraction.cpp:(.text+0x1589): undefined reference to `QDesktopWebView::QDesktopWebView(QSGItem*)' webviewabstraction.cpp:(.text+0x1687): undefined reference to `QTouchWebView::page()' webviewabstraction.cpp:(.text+0x16a8): undefined reference to `QTouchWebView::page()' webviewabstraction.cpp:(.text+0x16c9): undefined reference to `QTouchWebView::page()' webviewabstraction.cpp:(.text+0x16ea): undefined reference to `QTouchWebView::page()' obj/release/webviewabstraction.o: In function `WebViewAbstraction::load(QUrl const&)': webviewabstraction.cpp:(.text+0xce): undefined reference to `QDesktopWebView::load(QUrl const&)' collect2: ld returned 1 exit status make[2]: *** [tst_commonviewtests] Error 1 make[2]: Leaving directory `/home/cmarcelo/Projects/WebKit/webkit2/WebKitBuild/Release/WebKit2/UIProcess/API/qt/tests/commonviewtests' make[1]: *** [sub-commonviewtests-make_default] Error 2 obj/release/tst_qtouchwebview.o: In function `tst_QTouchWebView::init()': tst_qtouchwebview.cpp:(.text+0x99): undefined reference to `QTouchWebView::QTouchWebView(QSGItem*)' obj/release/tst_qtouchwebview.o: In function `tst_QTouchWebView::navigationActionsStatusAtStartup()': tst_qtouchwebview.cpp:(.text+0x1a2): undefined reference to `QTouchWebView::page()' tst_qtouchwebview.cpp:(.text+0x1ac): undefined reference to `QTouchWebPage::navigationAction(QtWebKit::NavigationAction)' tst_qtouchwebview.cpp:(.text+0x255): undefined reference to `QTouchWebView::page()' tst_qtouchwebview.cpp:(.text+0x262): undefined reference to `QTouchWebPage::navigationAction(QtWebKit::NavigationAction)' tst_qtouchwebview.cpp:(.text+0x305): undefined reference to `QTouchWebView::page()' tst_qtouchwebview.cpp:(.text+0x312): undefined reference to `QTouchWebPage::navigationAction(QtWebKit::NavigationAction)' tst_qtouchwebview.cpp:(.text+0x3b5): undefined reference to `QTouchWebView::page()' tst_qtouchwebview.cpp:(.text+0x3c2): undefined reference to `QTouchWebPage::navigationAction(QtWebKit::NavigationAction)' obj/release/tst_qtouchwebview.o: In function `tst_QTouchWebView::accessPage()': tst_qtouchwebview.cpp:(.text+0x564): undefined reference to `QTouchWebView::page()' collect2: ld returned 1 exit status make[2]: *** [tst_qtouchwebview] Error 1 make[2]: Leaving directory `/home/cmarcelo/Projects/WebKit/webkit2/WebKitBuild/Release/WebKit2/UIProcess/API/qt/tests/qtouchwebview' make[1]: *** [sub-qtouchwebview-make_default] Error 2 make[1]: Leaving directory `/home/cmarcelo/Projects/WebKit/webkit2/WebKitBuild/Release/WebKit2/UIProcess/API/qt/tests' make: *** [sub-WebKit2-UIProcess-API-qt-tests-make_default-ordered] Error 2 Comment on attachment 102519 [details]
Patch
Just by curiosity was this define in WebCore.pro before the split? I'm wondering why it starts to fail now.
I'm wondering why we do not have this problem on the buildbot: http://build.webkit.sed.hu/waterfall?show=x86-32%20Linux%20Qt%20Release%20WebKit2 This bot has a Qt5 from 26th Jul (last commit in qtbase). Is this occuring with a more recent Qt5 version? (In reply to comment #5) > I'm wondering why we do not have this problem on the buildbot: > > http://build.webkit.sed.hu/waterfall?show=x86-32%20Linux%20Qt%20Release%20WebKit2 > > This bot has a Qt5 from 26th Jul (last commit in qtbase). > > Is this occuring with a more recent Qt5 version? It seems so, now we have to find who is the bad guy. (In reply to comment #5) > Is this occuring with a more recent Qt5 version? My last test was the SHA1 for my qt5 tree bd8f2da15a852e65ef0fb223324425964e6ab7a6 (July 31st) and this commit points to the qtbase 2c3382d30574a56b640c46aab7c407d63435d3bb (Jul 29). Comment on attachment 102519 [details]
Patch
Clearing this from the review queue until Caio find why this suddenly fails/only fail on his computer.
(In reply to comment #7) > (In reply to comment #5) > > Is this occuring with a more recent Qt5 version? > > My last test was the SHA1 for my qt5 tree bd8f2da15a852e65ef0fb223324425964e6ab7a6 (July 31st) and this commit points to the qtbase 2c3382d30574a56b640c46aab7c407d63435d3bb (Jul 29). The bot's qt5 repo SHA1 is bf8a934d958ff799f5a08f8eff83454e5b9b79a5 (Jul 22nd) the qtbase c0589cde3d2d37191490d4421e8503568005682b (Jul 26th) works correctly. (In reply to comment #9) > The bot's qt5 repo SHA1 is bf8a934d958ff799f5a08f8eff83454e5b9b79a5 (Jul 22nd) the qtbase c0589cde3d2d37191490d4421e8503568005682b (Jul 26th) works correctly. Using the given qt5 repo SHA1 also doesn't work here. I'm suspecting it might be related to my environment. I'll try to investigate a bit more later what's happening here. However I still think that we are missing somehow setting QT_SHARED in our .pro or .pri files. I have the same problem on my machine. I'm running Fedora13 (old) and have only qt5 installed. The build works fine if I apply the patch from Caio. This happens in my computer too (Ubuntu 10.10, gcc 4.4.5) using Qt5 at revision 187b66aec258d17dcad0afa6fe0bf3c0f0f0af55 (Wed Aug 3) and WebKit at 241998880470e73528a92124bf632b0685ac170c (Fri Aug 5). Applying the patch fixed the compiler error just fine. Regards Adenilson (In reply to comment #8) > (From update of attachment 102519 [details]) > Clearing this from the review queue until Caio find why this suddenly fails/only fail on his computer. This patch also solved my build issue. :) qtbase: 8ef86d05f199ebab216da43d5e0a9dc322b657b3 (Aug 3) webkit: d08472405870dee1e3b79d7b75185d796249915c (Aug 5) platform; openSUSE 11.4 (In reply to comment #13) > This patch also solved my build issue. :) > > qtbase: 8ef86d05f199ebab216da43d5e0a9dc322b657b3 (Aug 3) > webkit: d08472405870dee1e3b79d7b75185d796249915c (Aug 5) > platform; openSUSE 11.4 Also happens to me on Archlinux. It seems that it is trigger from a fresh clean build of Qt5 :D so it may explain why the bot didn't catch it. Can someone look at what changed in Qt5 recently so we now if we should land this? :( (In reply to comment #15) > Can someone look at what changed in Qt5 recently so we now if we should land this? :( I've tried again to investigate. I was suspecting of some "misbehaving" (compiling without the patch) when Qt4 headers were also available, but couldn't make it work. Also inspected the qtbase logs and couldn't find any obvious change. The only mention of defining QT_SHARED was in qbase.pri (that we don't include for regular/independent QtWebKit builds), and that was moved to qt_module_config. Could someone with a machine that still build without the patch investigate from which pro, pri or prf the define QT_SHARED is coming from? (In reply to comment #16) > I've tried again to investigate. I was suspecting of some "misbehaving" (compiling without the patch) when Qt4 headers were also available, but couldn't make it work. Also inspected the qtbase logs and couldn't find any obvious change. Hmm. New clean / updated build of Qt5. The difference is this time I'm building all the modules instead of just the ones QtWebKit needed. So "make" instead of the "make module-qtdeclarative module-qtscript" (make module does proper dependency compilation). Now it works. Another difference, now qtbase/lib/libQtDeclarative.prl have "QMAKE_PRL_DEFINES = QT_SHARED". So that's where the QT_SHARED is coming from. (In reply to comment #17) > Now it works. Another difference, now qtbase/lib/libQtDeclarative.prl have "QMAKE_PRL_DEFINES = QT_SHARED". So that's where the QT_SHARED is coming from. Good work. So it build by accident due to the hacks in another module.... Anything we can do to use qt_module_config is we are building for Qt5? What's the status of this? Does the build system need a change, or is this a Qt5 issue? (In reply to comment #19) > What's the status of this? Does the build system need a change, or is this a Qt5 issue? Our build system is relying on QT_SHARED being defined elsewhere. We get our definition by accident because the QtDeclarative module (and others) export this definition. But, the build is currently working with Qt5 (at least last week's Qt5). After all the investigation, one clear improvement for the build system is to use the proper macros for modules available in Qt5. This task could be easier to do once we can get rid of the requirement that the build system support the case of building QtWebKit bundled inside Qt. Closing. Build system was completely redone by Tor-Arne and people are not facing build problems anymore. |