Link error in messagelib (QWebEngineUrlRequestInterceptor)
David Faure
faure at kde.org
Tue Nov 19 13:46:02 GMT 2019
After switching to the release/19.12 branch (and/or Qt 5.14 from git), I'm hitting these link errors in messagelib.
networkurlinterceptor.cpp.o: in function `WebEngineViewer::NetworkUrlInterceptorPrivate::interceptRequest(QWebEngineUrlRequestInfo&)':
messagelib/webengineviewer/src/urlinterceptor/networkurlinterceptor.cpp:59: undefined reference to `QWebEngineUrlRequestInfo::block(bool)'
(and some more about QWebEngineUrlRequestInfo::qt_metacall/qt_metacast/staticMetaObject)
This is odd because those symbols are in Qt5WebEngineCore, and they are exported:
$ objdump -t $QTDIR/lib/libQt5WebEngineCore.so.5 | c++filt | grep QWebEngineUrlRequestInterceptor::
000000000e43fcb2 g F .text 0000000000000034 QWebEngineUrlRequestInterceptor::qt_metacall(QMetaObject::Call, int, void**)
000000000e43fc1a g F .text 0000000000000048 QWebEngineUrlRequestInterceptor::metaObject() const
000000000e43fc62 g F .text 0000000000000050 QWebEngineUrlRequestInterceptor::qt_metacast(char const*)
00000000152bf4c0 g O .data.rel.ro 0000000000000030 QWebEngineUrlRequestInterceptor::staticMetaObject
("g" means global, i.e. exported)
Now Qt5WebEngineCore isn't actually in the link line, but Qt5WebEngineWidgets is there, and it links to Qt5WebEngineCore:
$ objdump -p $QTDIR/lib/libQt5WebEngineWidgets.so.5.14.0 | grep EngineCore
NEEDED libQt5WebEngineCore.so.5
Surely that should bring WebEngineCore into the link.... but apparently it doesn't?
Adding -Q -v -Wl,-t to the link line (which is supposed to show all libs being actually used at link time) doesn't show WebEngineCore.
If I manually add $QTDIR/lib/libQt5WebEngineCore.so to the link line, then the link SUCCEEDS.
I'm reaching the limits of my knowledge on link errors. Any ideas?
Anyone else seeing this?
PS: gcc 7.4.1, ld is "GNU ld (GNU Binutils; openSUSE Leap 15.1) 2.31.1.20180828-lp151.2"
but surely ld has no bugs? ;-)
--
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5
More information about the kde-pim
mailing list