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
gnucash: update webkit-gtk dependency #8069
Conversation
Notifying maintainers: |
Travis Build #13306 Errored. Lint results
The build timed out. |
In order for anyone who has this port installed to see this change, the |
* change webkit-gtk3 dependency to webkit2-gtk * add post-patch reinplace to enable webkit2-gtk Closes: https://trac.macports.org/ticket/52404
6d42f26
to
5c17b7b
Compare
Done. |
Travis Build #13309 Errored. Lint results
The build timed out. |
Have you confirmed that this works, in particular with reports? It doesn't seem to for me - all the reports are rendered blank. I'm also getting
errors, which suggests that this is a problem with gnucash adding /opt/local to DYLD_LIBRARY_PATH when it starts up. (It does that to find some of the plugin libraries... I thought I had fixed that at some point in the past.) |
Reports are blank for me, too. I never use reports and so didn't think to check that part.
I get those as well when I tried running a report. |
Since GnuCash uses WebKit solely to generate reports it seems rather pointless to link it against a version of WebKit that doesn't render them. That said, if someone in the MacPorts community can figure out why GnuCash works with WebKit2 on Linux but not on Mac and can offer a patch to fix it we'd love to get a PR! |
I've been updating our webkit2-gtk ports the past while, and there are a few small patches we have to use to get it to build, but up to now, seemed everything was working. I'm also familiair with building gnucash. What would be the most effective way to debug this for you? Is there some kind of logging-enhanced env var to set, or some simple reproducer to focus on? Does it happen only with the quartz variant? As you know, webkit2-gtk is a behemoth... |
@kencu, FWIW, I installed with +x11, and the reports are blank for me. |
@jjstickel, Interesting about the reports on x11. Does the toy browser work (I've forgotten its name, it's part of the WebKit build)? All GnuCash does with text reports is write them to a temp file and then point the GtkWebKitWebView at them. @kencu, I haven't tried webkit2 in GnuCash for a couple of years mostly because it's such a PITA to build. The last time I did the text reports displayed but the graphs would go off into javascript la-la land and never come back. I couldn't figure out how to debug it and the WebKitGtk guys weren't interested in helping so I took the easy way out of switching GnuCash to the WebKit1 API. |
The MiniBrowser works perfectly on +x11 and +quartz, I use it all the time.
Perhaps someone might put a sample temp file here -- is it html? -- and we can see what is going on with that.
And yet it works on Linux, you say? Maybe with an example file we might see why this happens. |
I don't know that that will be productive, but here you go: I expect that the minibrowser will have no trouble with it. It's GnuCash that has trouble, so build it with WebKit2 using this PR, generate graphical report and debug away. Since another user has reported that it doesn't even work to display a text report it's perhaps worthwhile to investigate that first. The temporary report files are written to $TMPDIR and have names like |
I downloaded that file, and it opens up blank with every browser I tried on MacOS -- Safari, quicklook, Google Chrome, and "Arctic Fox" all show a blank window. At least that's a clue, I guess. I have no idea how to fix it, but perhaps someone does. |
Oh -- a clue:
MacPorts installs it's applications in |
OK, I don't use MacPorts. Edit the file and adjust the path. Being html it's plain text. |
Is it possible that
is being written into the html reports, even if the application is in If so -- there's the problem, perhaps. |
Or make your own: Reports>Income and Expense>Income Piechart. You can find the temporary file as noted above or use the export button on the GnuCash toolbar to write a copy anywhere you please. |
No, the path that's written is to where ever share/gnucash is. Like I said, I don't use MacPorts. I dunno about MacPorts application bundles, but the ones I build for distribution can be put anywhere the user pleases. /Applications is where I please so that's where the path in the report points to. |
Macports is installing that file here:
Next -- we see where gnucash on MacPorts is thinking that file is when it writes the html file... |
the (edited) file displays properly in Safari, Google Chrome, Arctic Fox, and MiniBrowser, but not with Quicklook. |
I can't make any headway here:
back to those who use this port -- needs some major surgery -- or perhaps just download the prebuilt binary and use that? |
Thank you for the effort. I was using the prebuilt binary until recently when the Gnucash port worked again (for awhile, before webkit-gtk3 breakage). The macports version just loads faster and, I hoped, would be easier to diagnose and tweak aqbanking and ofx import issues. Since I do not use reports, I can keep using macports gnucash with my local portfile, but I sure hope some others can help keep it going. I'm willing to help test, and do a little hacking, if someone points me in the right direction. |
Okay, it looks like we have working reports if we apply this patch + fix up the environment to avoid the dyld problems mentioned above (#8069 (comment)). Actually, I'm trying this with gnucash 4.2 since I was in the middle of updating the port, but I don't have any reason to think there are any relevant changes there. Not sure why this works with MacPorts and its version of webkit2 but apparently not the prebuilt binary -- the issue with the environment is MacPorts-specific (and, as I mentioned above, something that I was pretty sure we fixed before; maybe the fix got broken by the move to cmake or something) I'll push a patch later tonight. |
Did you test graph reports, e.g. Reports>Assets & Liabilities>Asset Piechart? |
Yes, all the reports I tried (both graph and text) look fine! |
I have only tried it with the x11 version of webkit2 so far. I'm dusting off a machine with a +quartz install to test that. |
Very good. Fingers crossed that it works on Quartz. |
* switch to webkit2-gtk instead of outdated webkit-gtk3 * add patch to fix DYLD_LOAD_PATH Closes: https://trac.macports.org/ticket/52404 Closes: macports#8069
Looks like it works on +quartz, too. Each report spawns a WebKitWebProcess that creates its own dock icon, which is a little weird, but apart from that the text and graph reports I tried (Income Piechart, Net Worth Barchart, Transaction Report) look okay. |
Well, who would have believed my patch from 2 years ago actually worked fine, except for gnucash monkeying around with DYLD_LIBRARY_PATH that I didn't know was being done... |
Followup: I got it built in gtk-osx by pinching the macports patches and adding a couple more that I think were mostly required from building with Xcode-12's clang (so you might want to get them from gtk-osx). I've pushed a commit to GnuCash maint changing CMakeLists.txt so your patch won't be necessary in GnuCash 4.3. I'll ask on webkit-gtk about the bogus WebKitWebProcess showing up in the dock, the task switcher, and on the menubar. It's pretty annoying. There's also a StackOverflow about it. |
And the answer, actually worked out by the browser project Nyxt: Call |
That's something of a left over. I've removed it for 4.3, replacing it with the more generally correct |
Closes: https://trac.macports.org/ticket/52404
Description
I changed the path dependency to a direct port dependency. If it should remain a path dependency for webkit2-gtk, just let me know what it should be and I will amend the commit. I also labeled it
bugfix
because of https://trac.macports.org/ticket/60977 .Type(s)
Tested on
macOS 10.15.6 19G73
Xcode 11.6 11E708
Verification
Have you
port lint
?sudo port test
?sudo port -vst install
?