sunoru / Webviews.jl

🌐 Julia implementation of webview, a tiny library for creating web-based desktop GUIs.
https://sunoru.github.io/Webviews.jl/
MIT License
33 stars 0 forks source link

Can't load webviews #11

Closed pdeffebach closed 1 year ago

pdeffebach commented 1 year ago
julia> webview1 = Webview()
ERROR: could not load library "libwebkit2gtk-4.0.so.37"
/home/peterwd/.julia/juliaup/julia-1.8.3+0.x64.linux.gnu/bin/../lib/julia/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /lib/x86_64-linux-gnu/libjavascriptcoregtk-4.0.so.18)

I'm interested in using this package to replace Blink.jl in my package FloatingTableView.jl.

But I can't get it to work.

This is after installing via the command in the readme (Ubuntu 22) and calling build.

Thanks!

How hard would it be to just use BinaryBuilder and JLLs for everything?

sunoru commented 1 year ago

Hi, this is a known issue related to https://github.com/JuliaLang/julia/pull/45582

That's why Julia 1.9 is required on Linux platforms right now. I guess it won't be backported to 1.8 since 1.9 is about to be released soon.

sunoru commented 1 year ago

Ah by the way, it is just too much work to do to build and maintain the libraries by ourselves. Only Linux needs users to install the dependency manually, and you probably don't want to use WebView with other GUI libraries (especially those involved in window management) together right now?

pdeffebach commented 1 year ago

I certainly don't need anything complicated.

But I don't know if I want to depend on a package that isn't using JLLs because I'm worried I might get issue reports I have no hope of fixing.

My understanding is that BinaryBuilder.jl is pretty easy. I may give it a try if possible.

sunoru commented 1 year ago

BTW I forgot to say, thanks for trying out this package 😄

Actually, my original intention was to build JLLs with BinaryBuilder.jl for WebKitGTK. But it has so many dependencies that need to be provided as JLL as well. To give you a sense of what it's like:

$ ldd /usr/lib64/libwebkit2gtk-4.0.so.37 | wc -l
130

And I guess maybe someone has been working on it (JuliaPackaging/Yggdrasil#5231)

Besides, users won't have to install anything manually if they are using Windows/macOS, because they both provide system-wide webview libraries by default.

pdeffebach commented 1 year ago

Fair enough!

I will upgrade to 1.9 and see if I can get my table viewing package working.

sunoru commented 1 year ago

Nice. I had a look at FloatingTableView.jl and just wanted to mention that you might run into an issue that run(webview) can only be called synchronously in the main thread on Linux if you want to bind functions.

But if you only want to use html! to change the content without binding functions, it's safe to just use @async run(webview).

pdeffebach commented 1 year ago

it is a nice package! Much more responsive than Blink.jl.

Unfortunately I can't seem to get TableView.jl to work with it. I keep running into "WebIO not found" errors and I don't have enough experience with web technologies to debug.

I don't think this is a knock against your package, only that the ecosystem on the TableView side is complicated and I don't really understand it.

sunoru commented 1 year ago

Thanks!

Oh they used WebIO! It would be definitely interesting if this package was made compatible with it. It can be done directly or by making a new package to handle WebIO input. I'll take note and maybe look into it in the future.

In you case, perhaps you can try to find a way to convert WebIO's dom"" into a plain string to pass to webview?

sunoru commented 1 year ago

WebIO is now supported.