linux-arm: Build fails with 'EGL/egl.h' file not found when using -tags wayland
Checklist
- I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
- This issue only relates to a single bug. I will open new issues for any other problems.
Describe the bug
I am trying to cross-compile a Fyne application for linux/arm (32-bit armv7l) targeting an environment without X11 (Wayland/GLES || Buildroot with weston). The standard build fails because the cross-compiler cannot find the EGL headers.
How to reproduce
fyne-cross linux -arch=arm
Result: The executable resulted returns missing libGL, because the device has libGLESv2 and not libGL
fyne-cross linux -arch=arm -tags gles,wayland --no-cache
The build fails immediately because it cannot find the EGL headers:
# github.com/go-gl/glfw/v3.3/glfw In file included from /go/pkg/mod/github.com/go-gl/glfw/v3.3/[email protected]/native_linbsd_wayland.go:11: ./glfw/include/GLFW/glfw3native.h:144:12: fatal error: 'EGL/egl.h' file not found 144 | #include <EGL/egl.h> | ^~~~~~~~~~~ 1 error generated.
Screenshots
Example code
go: downloading fyne.io/fyne/v2 v2.7.1 go: downloading github.com/godbus/dbus/v5 v5.1.0 go: downloading github.com/rymdport/portal v0.4.2 go: downloading github.com/fsnotify/fsnotify v1.9.0 go: downloading github.com/BurntSushi/toml v1.5.0 go: downloading github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 go: downloading github.com/fredbi/uri v1.1.1 go: downloading github.com/fyne-io/image v0.1.1 go: downloading fyne.io/systray v1.11.1-0.20250603113521-ca66a66d8b58 go: downloading github.com/go-gl/glfw/v3.3/glfw v0.0.0-20240506104042-037f3cc74f2a go: downloading github.com/go-text/typesetting v0.2.1 go: downloading github.com/yuin/goldmark v1.7.8 go: downloading golang.org/x/image v0.24.0 go: downloading github.com/go-text/render v0.2.0 go: downloading github.com/srwiley/rasterx v0.0.0-20220730225603-2ab79fcdd4ef go: downloading github.com/go-gl/gl v0.0.0-20231021071112-07e5d0ea2e71 go: downloading github.com/jeandeaual/go-locale v0.0.0-20250612000132-0ef82f21eade go: downloading github.com/fyne-io/oksvg v0.2.0 go: downloading github.com/nicksnyder/go-i18n/v2 v2.5.1 go: downloading golang.org/x/text v0.22.0 go: downloading github.com/jsummers/gobmp v0.0.0-20230614200233-a9de23ed2e25 go: downloading golang.org/x/sys v0.30.0 go: downloading golang.org/x/net v0.35.0 go: downloading github.com/srwiley/oksvg v0.0.0-20221011165216-be6e8873101c
github.com/go-gl/glfw/v3.3/glfw
In file included from /go/pkg/mod/github.com/go-gl/glfw/v3.3/[email protected]/native_linbsd_wayland.go:11: ./glfw/include/GLFW/glfw3native.h:144:12: fatal error: 'EGL/egl.h' file not found 144 | #include <EGL/egl.h> | ^~~~~~~~~~~ 1 error generated.
error building application: exit status 1 [✗] could not package the Fyne app: could not package the Fyne app: exit status 1
Fyne version
fyne cli version: v2.7.1
Go compiler version
go version go1.24.9 linux/amd64
Operating system and version
Linux 6.16.8+kali-amd64 #1 SMP PREEMPT_DYNAMIC Kali 6.16.8-1kali1 (2025-09-24) x86_64 GNU/Linux
Additional Information
No response
Source: fyne-io/fyne