-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix building and running under Qt 6.5.3; #24
base: qt6-gha
Are you sure you want to change the base?
Conversation
Fix for QT_GESTURE_EVENTS Fix for TOUCH_EVENTS Fix in harfbuzz rendering engine crash Not tested: Video, Audio, OpenGL (build without them)
@quarcko Hi, we are also trying to build webkit for Qt6. Do you have any build instructions you can share? |
@aquiles2k Hi, what Qt version and what OS are you on? For Ubuntu:
My repo and this commit contains fixes for actually building it and running. OpenGL - is not found and unable to enable it thats it. |
@quarcko Thanks for sharing. We normally did a normal qt mac build with offical sources and just copied the annulen qt webkit binaries. We also did a crosscompile of qt and qt webkit for windows through mxe. Since none of these worked anymore we were in the process of evaluating our options until we stumbled over the movableink fork. Its also very fortunate that it seems to compile with qt6 for you since webkit was the only thing holding us on qt5. I'll try to reproduce your compile with ubuntu and from there move to mac and windows. On your step 1, which source branch exactly do you use? Just the default master branch from movableink? Thanks again and best wishes! |
We use qt6-gha branch. You can clone from my fork, so it will have all neecessary fixes to build it and run on ubuntu. |
@quarcko thank you for this! I'll merge it into my branch. I'm in a bit of limbo at the moment where I now use the qt6 branch myself in prod, but I want to get an actual qt5 release out before merging in the qt6 branch and dropping qt5 altogether. |
Re: OpenGL: I think it's quite a ways off from working. The QtWebKit OpenGL implementation was complex and is very, very behind. I run QtWebKit headless and I'm not likely to be able to work on OpenGL any time soon. The other stuff seems like it should be feasible to get fixed up eventually. |
Hypothetically, wouldn't it be better at this point to skip OpenGL altogether and go straight to Vulkan which is fully supported [and working great] with Qt6? |
Fix pointer types incorrect.
Hi, I just mentioned OpenGL because cmake complained that it cannot find QtOpenGL libraries, so I am no big expert, So this PR fixes building and running on Qt 6.5.3, but there are few issues though:
Otherwise rendering and PDF printing is working all right. |
Oops, HbUniquePtr usage fix;
@quarcko I am in the process of updating @mnutt code to the latest WebKit. I took a different approach in my git repository (https://github.com/elahav/WebKit), which has the main branch following upstream WebKit, and a qt6 branch for the updates. Once I get things working I want to start switching from WebKitLegacy, or there is no hope of getting anything upstreamed. That said, as you seem to be actively maintaining a version of Qt webkit, we should probably join forces... |
@elahav Hi, it would be great, although i am not a very active webkit developer, we just migrate QT version now to 6.5.3 and i need working webkit for Ubuntu (already got it, but scroll wheel is not scrolling pages...) Because i managed to fix-through and compile movableink repo on WIndows MINGW 64bit - but unfortunately |
@quarcko I am not a WebKit developer either, and I'm really only interested in the QNX version as a good system-level test. But then between the two of us we cover three different platforms ;-) Hopefully @mnutt is still interested as well. If we can make the switch from WebKitLegacy then we really only need to worry about the Qt bits. The rest will be upstream issues, and the developers are very responsive. |
I am! Glad to see other people are interested as well. I've been using qtwebkit/qt6 in production for a month and it has been working well for me so far. My ambition is to get things to a point where qutebrowser/wkhtml2pdf/etc can get releases to replace the current ancient qtwebkit dependencies. Packaging has been a bit challenging and I haven't had as much time as I'd like to work on it. Regarding WK2 - the things I use QtWebKit for don't benefit from it, but it'd be awesome if other people want to work on it. It looked like a huge amount of work to get working. |
@mnutt First, thank you for the work on this port. I would have never started a Qt port from scratch (or even from the last official version). This gives us a fighting chance to get a working Qt browser that is not based on Chromium. The reasons I want to switch to WK2 are two-fold:
All that said, I have no idea how much work such a switch entails. |
WK1 (as of now) is still part of upstream (the Mac port) and receives security updates. It may be removed in the future in which case we'd have to maintain it separately. Not to say that WK1 couldn't have security issues, but the vast majority of CVEs I've seen have been in WebCore rather than WK2/WK1. My application relies on pretty low-level integration into WK that is difficult to do performantly in WK2. But for general UI browsing, WK2 is way better: IPC reduces UI jank, and more importantly provides sandboxing. That would be the biggest reason to steer general users away from WK1. |
OK, perhaps I misinterpreted the comments from the upstream developers. See https://blogs.gnome.org/mcatanzaro/2022/11/04/stop-using-qtwebkit/ I may be confusing the variant (WK1 vs WK2) with the version. By the way, apologies to @quarcko for appropriating this pull request for this discussion... We can move it elsewhere if you prefer. |
…3 and MINGW compiler on Windows.
@quarcko this all looks good to me as far as I can tell, given that I don't have easy access to a Windows machine. Anything else needed here before merge? Hopefully with moving to Qt6 it might be easier to get a Windows GitHub Actions setup going? |
Ah, I just saw #35. Happy to merge in a mostly-working windows version and merge future improvements as needed though. |
Also a fixes a huge memory leak that i introduced with my initial hack. Now memory consumption is much lower, although i believe, that there is still room for improvement.
When configuring for msvc i get a cmake error in Source/WebKitLegacy/PlatformQt.cmake I had to comment the code like the following to let it configure:
Is this the right approach? |
Here i found declaration of this macro, i can't tell you for sure if you have to comment this line, or maybe try About non existing asm file - for now try to comment it out. you will figure out soon enough if thats a good solution |
Thanks @quarcko, i'm building with PCH disabled anyway for now. It just seems im still miles away from a working msvc build. I thought msvc is the easy way 😄 Current error:
It seems to have to do with the inspector so i'm trying to build now with web inspector ui disabled. Have anyone of you enabled this? |
Hm, no, disabling webinspector ui didnt fix it. |
FYI - i did not enable webinsperctor on both Linux and Mingw. Anyway, (just curious) why do you need MSVC build anyway? |
It's not msvc specific, i just need ANY working (modern) qtwebkit build since qtwebengine doesn't (yet) work with our project. We mainly use it to display a google map and rely heavily on painting stuff over it, which isn't possible with qtwebengine without a huge refactor. We do try to do this refactor in parallel, but i'm also still trying to revive our qtwebkit component as a side project, since this would then be just a simple replacement without any refactor needed. Mingw would be cool since our win build is using it currently but i'm not against msvc in general if it helps, but we would need to change our current ci infrastructure. We are also still on qt5 which is why i'm trying compile the older code to prevent having also deal with qt6 issues in our app. Unfortunately i'm still failing to have a "simple" working (displaying google maps) qtwebkit on any architecture. BTW: @quarcko Do you have Webassembly enabled? |
Ok, clear on that. Let's hope you will manage it, MSVC is anyway a "supported" compiler :) anyway - yes, i have webassembly enabled, JIT enabled, JSC enabled. Also - please have a look at my latest commit, is you have copied HarfBuzz fix from me before, |
I fixed the above mentioned yarr errors by aligning some declarations and definitions with const and constexpr. I'm now running into linker errors on jsc.exe
|
Your stackpointer is defined here: Please check that this file is included in compilation and compiles. Where is says that |
Fix for QT_GESTURE_EVENTS
Fix for TOUCH_EVENTS
Fix in harfbuzz rendering engine crash
Not tested:
Video, Audio, OpenGL (build without them)
Pull Request Template
File a Bug
All changes should be associated with a bug. The WebKit project is currently using Bugzilla as our bug tracker. Note that multiple changes may be associated with a single bug.
Provided Tooling
The WebKit Project strongly recommends contributors use
Tools/Scripts/git-webkit
to generate pull requests. See Setup and Contributing Code for how to do this.Template
If a contributor wishes to file a pull request manually, the template is below. Manually-filed pull requests should contain their commit message as the pull request description, and their commit message should be formatted like the template below.
Additionally, the pull request should be mentioned on Bugzilla, labels applied to the pull request matching the component and version of the Bugzilla associated with the pull request and the pull request assigned to its author.