Bug 223070 - [WPE] Qt API build failure on 2.31.90
Summary: [WPE] Qt API build failure on 2.31.90
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WPE WebKit (show other bugs)
Version: WebKit Local Build
Hardware: Other Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-11 08:02 PST by Bastian Krause
Modified: 2021-04-20 09:50 PDT (History)
7 users (show)

See Also:


Attachments
Patch (7.00 KB, patch)
2021-04-19 01:53 PDT, Marco Felsch
no flags Details | Formatted Diff | Diff
Patch (8.59 KB, patch)
2021-04-19 08:05 PDT, Marco Felsch
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (8.59 KB, patch)
2021-04-20 03:34 PDT, Marco Felsch
pnormand: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (8.68 KB, patch)
2021-04-20 07:52 PDT, Marco Felsch
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bastian Krause 2021-03-11 08:02:54 PST
When configuring wpewebkit 2.31.90 (with libwpe 1.9.90, wpebackend-fdo 1.9.1) with -DENABLE_WPE_QT_API=ON and then building with cmake, I stumble upon:

[...]
[4722/4722] Linking CXX shared library lib/libqtwpe.so
FAILED: lib/libqtwpe.so 
/opt/OSELAS.Toolchain-2020.08.0/arm-v7a-linux-gnueabihf/gcc-10.2.1-clang-10.0.1-glibc-2.32-binutils-2.35-kernel-5.8-sanitized/lib/gcc/arm-v7a-linux-gnueabihf/10.2.1/../../../../arm-v7a-linux-gnueabihf/bin/ld: Source/WebKit/CMakeFiles/qtwpe.dir/UIProcess/API/wpe/qt/WPEQtView
Backend.cpp.o: in function `WPEQtViewBackend::create(QSizeF const&, QPointer<QOpenGLContext>, void*, QPointer<WPEQtView>)':
WPEQtViewBackend.cpp:(.text+0x382): undefined reference to `WTF::fastMalloc(unsigned int)'
/opt/OSELAS.Toolchain-2020.08.0/arm-v7a-linux-gnueabihf/gcc-10.2.1-clang-10.0.1-glibc-2.32-binutils-2.35-kernel-5.8-sanitized/lib/gcc/arm-v7a-linux-gnueabihf/10.2.1/../../../../arm-v7a-linux-gnueabihf/bin/ld: Source/WebKit/CMakeFiles/qtwpe.dir/UIProcess/API/wpe/qt/WPEQtView
Backend.cpp.o: in function `WPEQtViewBackend::~WPEQtViewBackend()':
WPEQtViewBackend.cpp:(.text+0xeaa): undefined reference to `WTF::fastFree(void*)'
/opt/OSELAS.Toolchain-2020.08.0/arm-v7a-linux-gnueabihf/gcc-10.2.1-clang-10.0.1-glibc-2.32-binutils-2.35-kernel-5.8-sanitized/lib/gcc/arm-v7a-linux-gnueabihf/10.2.1/../../../../arm-v7a-linux-gnueabihf/bin/ld: Source/WebKit/CMakeFiles/qtwpe.dir/UIProcess/API/wpe/qt/WPEQtView.cpp.o: in function `WPEQtView::notifyLoadFailedCallback(_WebKitWebView*, WebKitLoadEvent, char const*, _GError*, WPEQtView*)':
WPEQtView.cpp:(.text+0x1ce): undefined reference to `WTF::fastMalloc(unsigned int)'
/opt/OSELAS.Toolchain-2020.08.0/arm-v7a-linux-gnueabihf/gcc-10.2.1-clang-10.0.1-glibc-2.32-binutils-2.35-kernel-5.8-sanitized/lib/gcc/arm-v7a-linux-gnueabihf/10.2.1/../../../../arm-v7a-linux-gnueabihf/bin/ld: Source/WebKit/CMakeFiles/qtwpe.dir/UIProcess/API/wpe/qt/WPEQtView.cpp.o: in function `WPEQtView::notifyLoadChangedCallback(_WebKitWebView*, WebKitLoadEvent, WPEQtView*)':
WPEQtView.cpp:(.text+0xbf6): undefined reference to `WTF::fastMalloc(unsigned int)'
/opt/OSELAS.Toolchain-2020.08.0/arm-v7a-linux-gnueabihf/gcc-10.2.1-clang-10.0.1-glibc-2.32-binutils-2.35-kernel-5.8-sanitized/lib/gcc/arm-v7a-linux-gnueabihf/10.2.1/../../../../arm-v7a-linux-gnueabihf/bin/ld: Source/WebKit/CMakeFiles/qtwpe.dir/UIProcess/API/wpe/qt/WPEQtView.cpp.o: in function `WPEQtView::runJavaScript(QString const&, QJSValue const&)':
WPEQtView.cpp:(.text+0x100e): undefined reference to `WTF::fastMalloc(unsigned int)'
/opt/OSELAS.Toolchain-2020.08.0/arm-v7a-linux-gnueabihf/gcc-10.2.1-clang-10.0.1-glibc-2.32-binutils-2.35-kernel-5.8-sanitized/lib/gcc/arm-v7a-linux-gnueabihf/10.2.1/../../../../arm-v7a-linux-gnueabihf/bin/ld: Source/WebKit/CMakeFiles/qtwpe.dir/UIProcess/API/wpe/qt/WPEQtView.cpp.o: in function `jsAsyncReadyCallback(_GObject*, _GAsyncResult*, void*)':
WPEQtView.cpp:(.text+0x12ee): undefined reference to `WTF::fastFree(void*)'
/opt/OSELAS.Toolchain-2020.08.0/arm-v7a-linux-gnueabihf/gcc-10.2.1-clang-10.0.1-glibc-2.32-binutils-2.35-kernel-5.8-sanitized/lib/gcc/arm-v7a-linux-gnueabihf/10.2.1/../../../../arm-v7a-linux-gnueabihf/bin/ld: Source/WebKit/CMakeFiles/qtwpe.dir/UIProcess/API/wpe/qt/WPEQtViewLoadRequest.cpp.o: in function `WPEQtViewLoadRequest::~WPEQtViewLoadRequest()':
WPEQtViewLoadRequest.cpp:(.text+0xf6): undefined reference to `WTF::fastFree(void*)'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Comment 1 Bastian Krause 2021-04-14 05:38:53 PDT
This is also broken in the latest stable wpewebkit 2.32.0.
Comment 2 Marco Felsch 2021-04-19 01:53:27 PDT
Created attachment 426400 [details]
Patch

This patch reverts the WTF usage since this code has nothing to do with webkit internals at all.
Comment 3 Philippe Normand 2021-04-19 05:18:37 PDT
Comment on attachment 426400 [details]
Patch

LGTM. Can you add these files in a new allow-list for the style-checker? Should be in Tools/Scripts/webkitpy/style/checker.py
Comment 4 Marco Felsch 2021-04-19 05:27:38 PDT
Yep, I can add those files.
Comment 5 Marco Felsch 2021-04-19 08:05:01 PDT
Created attachment 426421 [details]
Patch

This adds the style checker allow-list.
Comment 6 Philippe Normand 2021-04-19 08:10:41 PDT
Comment on attachment 426421 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=426421&action=review

> Tools/Scripts/webkitpy/style/checker.py:167
> +      os.path.join('Source', 'WebKit', 'UIProcess', 'API', 'wpe', 'qt')],

I think this works only for files, not individual directories.
Comment 7 Marco Felsch 2021-04-19 08:17:11 PDT
(In reply to Philippe Normand from comment #6)
> Comment on attachment 426421 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=426421&action=review
> 
> > Tools/Scripts/webkitpy/style/checker.py:167
> > +      os.path.join('Source', 'WebKit', 'UIProcess', 'API', 'wpe', 'qt')],
> 
> I think this works only for files, not individual directories.

I've tested it and saw no more errors after applying it.
Comment 8 Marco Felsch 2021-04-19 08:18:11 PDT
But.. My indent is wrong.. Damn
Comment 9 Marco Felsch 2021-04-19 09:54:03 PDT
I don't see how this failures are related to my commit
Comment 10 Philippe Normand 2021-04-19 09:56:02 PDT
Please fix the style EWS. The wincairo failure looks indeed unrelated.
Comment 11 Marco Felsch 2021-04-19 10:02:53 PDT
(In reply to Philippe Normand from comment #10)
> Please fix the style EWS. The wincairo failure looks indeed unrelated.

I followed the style within the checker.py list. Don't see what I did wrong.
Comment 12 Philippe Normand 2021-04-19 10:19:56 PDT
(In reply to Marco Felsch from comment #11)
> (In reply to Philippe Normand from comment #10)
> > Please fix the style EWS. The wincairo failure looks indeed unrelated.
> 
> I followed the style within the checker.py list. Don't see what I did wrong.

Me neither. This pep thing is quite pedantic.

Anyway, the fix I found is to dedent all 4 lines by one space. No idea why:

    ([
     # The WPE QT wrapper lib is not part of Webkit and therefore don't need to statically
     # link the WTF framwork. Instead it uses the standard alloc mechanism.
     os.path.join('Source', 'WebKit', 'UIProcess', 'API', 'wpe', 'qt')],
     ["-runtime/wtf_make_unique"]),

You can run Tools/Scripts/check-webkit-style locally btw.
Comment 13 Philippe Normand 2021-04-19 10:20:55 PDT
Comment on attachment 426421 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=426421&action=review

> Tools/Scripts/webkitpy/style/checker.py:166
> +      # link the WTF framwork. Instead it uses the standard alloc mechanism.

And fix the framwork typo while you're at it ;)
Comment 14 Marco Felsch 2021-04-20 03:34:55 PDT
Created attachment 426535 [details]
Patch

Now the style is fixed :)
Comment 15 Marco Felsch 2021-04-20 03:35:19 PDT
(In reply to Philippe Normand from comment #13)
> Comment on attachment 426421 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=426421&action=review
> 
> > Tools/Scripts/webkitpy/style/checker.py:166
> > +      # link the WTF framwork. Instead it uses the standard alloc mechanism.
> 
> And fix the framwork typo while you're at it ;)

Did that as well.
Comment 16 EWS 2021-04-20 03:49:14 PDT
/Volumes/Data/worker/Commit-Queue/build/Source/WebKit/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).
Comment 17 Marco Felsch 2021-04-20 03:55:42 PDT
Sorry for the noise but how is fixed that failure..
Comment 18 Philippe Normand 2021-04-20 04:02:40 PDT
Comment on attachment 426535 [details]
Patch

You should have left the "Reviewed by OOPS" lines...
Comment 19 Philippe Normand 2021-04-20 04:03:20 PDT
https://webkit.org/contributing-code/#changelog-files
Comment 20 Marco Felsch 2021-04-20 07:52:55 PDT
Created attachment 426547 [details]
Patch

Hopefully the last version...
Comment 21 EWS 2021-04-20 09:05:29 PDT
commit-queue failed to commit attachment 426547 [details] to WebKit repository. To retry, please set cq+ flag again.
Comment 22 EWS 2021-04-20 09:50:31 PDT
Committed r276308 (236790@main): <https://commits.webkit.org/236790@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 426547 [details].