...would be nice as it would allow a single (statically linked) binary to be built/shipped (potentially).
approaches:
by hand - figure out (wip) the CFLAGS and LDFLAGS to pass to the pre-build phase (nix)
with help usingzig - this has caveats (works well for "simple" packages such as go-sqlite mentioned in the post but not so much for this one)
...would be nice as it would allow a single (statically linked) binary to be built/shipped (potentially).
approaches:
* by hand - figure out (wip) the `CFLAGS` and `LDFLAGS` to pass to the pre-build phase (`nix`)
* with help [using](https://dev.to/kristoff/zig-makes-go-cross-compilation-just-work-29ho) [`zig`](https://zig.news/kristoff/building-sqlite-with-cgo-for-every-os-4cic) - this has caveats (works well for "simple" packages such as `go-sqlite` mentioned in the post but not so much for this one)
That not only means we're stuck with CGO, it also means we can only link dynamically, which is even worse.
Any further insights of any random internet passer-by would, of course, be appreciated.
alright, even though there have apparently been [attempts](http://lucor.dev/post/cross-compile-golang-fyne-project-using-zig/) to solve this (be it without using Nix) even during the past few months, it looks like this issue cannot be solved using Zig or any other way to cross-compile [because GLFW (and consequently `go-glfw`, which is Fyne's hard dependency) does not support (or endorse) static linking](https://github.com/go-gl/glfw/issues/263#issuecomment-583867615), at least with the current [state of affairs](https://github.com/go-gl/glfw/issues/263).
That not only means we're stuck with CGO, it also means we can only link dynamically, which is even worse.
Any further insights of any random internet passer-by would, of course, be appreciated.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
...would be nice as it would allow a single (statically linked) binary to be built/shipped (potentially).
approaches:
CFLAGSandLDFLAGSto pass to the pre-build phase (nix)zig- this has caveats (works well for "simple" packages such asgo-sqlitementioned in the post but not so much for this one)alright, even though there have apparently been attempts to solve this (be it without using Nix) even during the past few months, it looks like this issue cannot be solved using Zig or any other way to cross-compile because GLFW (and consequently
go-glfw, which is Fyne's hard dependency) does not support (or endorse) static linking, at least with the current state of affairs.That not only means we're stuck with CGO, it also means we can only link dynamically, which is even worse.
Any further insights of any random internet passer-by would, of course, be appreciated.