gotraceui icon indicating copy to clipboard operation
gotraceui copied to clipboard

Unable to run on OpenBSD

Open jrick opened this issue 1 year ago • 10 comments

gotraceui opens a new window for a split second before exiting with this error:

$ gotraceui                                            
2024/10/18 14:16:02 gl: no OpenGL implementation could be loaded (tried ["libGLESv2.so.2"])

I have the library /usr/X11R6/lib/libGLESv2.so.3.0 but the gio version currently used is too old and is missing this fix:

https://git.sr.ht/~eliasnaur/gio/commit/05d28ad76a4946b4e0d0cb0ceb34c9337fd81724

LD_PRELOAD does not help because gio is trying to dlopen() the wrong name.

Unfortunately the gio api has changed somewhat in the latest version and updating it will take more than just requiring the latest, but with a local replacement and that fix cherrypicked, gotraceui does run.

jrick avatar Oct 18 '24 18:10 jrick

Another (admittedly unpleasant) workaround for the time being would be creating a symlink pointing to the right library, stored in some directory of your choice that gets added to LD_LIBRARY_PATH. At least I think that should work.

I could see about using a fork of Gio with the patch applied for the time being, as updating to the new API is out of the question. However, Gotraceui will stop supporting X11 in the near future. Unless OpenBSD makes the move to Wayland, Gotraceui will stop working, anyway.

dominikh avatar Oct 18 '24 21:10 dominikh

Wayland already works on OpenBSD, though my preferred desktop environment does not yet support it. Happy to test anything if you want it.

The LD_LIBRARY_PATH hack also works with an unpatched gio.

jrick avatar Oct 18 '24 21:10 jrick

as updating to the new API is out of the question.

Could you please elaborate? Is the upgrade something that you don't want to spend time on, but that you would accept contributions for? Or it does not make sense to do it at all?

I tried some quick experiment in April and most of the changes seemed to be straightforward replacements as far as I remember. One tricky part was the event spy. But yeah, it would be at least a few days of work.

martin-sucha avatar Oct 21 '24 07:10 martin-sucha

Could you please elaborate? Is the upgrade something that you don't want to spend time on, but that you would accept contributions for? Or it does not make sense to do it at all?

Gotraceui will eventually (hopefully in the next couple of months) switch to a different GUI library, which is why I don't want to invest time (neither doing it myself nor reviewing such a change) in upgrading to a newer version of Gio. It's also why development on Gotraceui in general has stalled for now.

dominikh avatar Oct 21 '24 14:10 dominikh

我升级了表格控件到最新版,其它控件没有升级 https://github.com/ddkwork/ux/blob/master/table2.go

ddkwork avatar Oct 23 '24 08:10 ddkwork

Could you please elaborate? Is the upgrade something that you don't want to spend time on, but that you would accept contributions for? Or it does not make sense to do it at all?

Gotraceui will eventually (hopefully in the next couple of months) switch to a different GUI library, which is why I don't want to invest time (neither doing it myself nor reviewing such a change) in upgrading to a newer version of Gio. It's also why development on Gotraceui in general has stalled for now.

Hi,which different ui library you will try?

ddkwork avatar Oct 23 '24 08:10 ddkwork

@ddkwork the one I am writing.

dominikh avatar Oct 23 '24 13:10 dominikh

@ddkwork the one I am writing.

Can I view your code repository?

ddkwork avatar Oct 23 '24 13:10 ddkwork

https://github.com/dominikh/gutter contains several branches at several states of development, but nothing is in its final state yet.

dominikh avatar Oct 23 '24 13:10 dominikh

https://github.com/dominikh/gutter contains several branches at several states of development, but nothing is in its final state yet.

Nice work,i will look it.

ddkwork avatar Oct 23 '24 13:10 ddkwork