fyne-io / fyne-cross-images Goto Github PK
View Code? Open in Web Editor NEWRepository for managing fyne-cross images
License: BSD 3-Clause "New" or "Revised" License
Repository for managing fyne-cross images
License: BSD 3-Clause "New" or "Revised" License
Fyne officially supports FreeBSD, OpenBSD and NetBSD. We should consider adding cross-compile support to all these systems.
Hello, i've be trying to use the darwin image(fyneio/fyne-cross-images:1.1.3-darwin) from this repo in my CI/CD pipeline to build my fyne app.
Locally, to get in the image, i do this command:
Note: I'm in my project directory.
docker run -ti --rm -v .:/src -v .\SDKs\MacOSX11.3.sdk\:/sdk fyneio/fyne-cross-images:1.1.3-darwin /bin/bash
in the image, i set these variables coming from the fyne-cross repository (line 233):
go env -w CC="zig cc -v -target x86_64-macos.10.12 -isysroot /sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks"
go env -w CXX="zig c++ -v -target x86_64-macos.10.12 -isysroot /sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks"
go env -w CGO_LDFLAGS="--sysroot /sdk -F/System/Library/Frameworks -L/usr/lib"
go env -w GOOS=darwin
however, after trying:
fyne package --appID myapp --os darwin
I get this error:
log.txt
am i missing something ?
Thanks to the work from Rik Arends, it seems only 36 files and 195Mb are necessary to compile with the NDK/SDK. This is for Rust application, but I would be surprised if Go require much more than that.
A link to Rik Arends script: https://github.com/makepad/makepad/blob/rik/tools/android/strip_android_33_darwin_x86_64.sh and discussion on twitter: https://twitter.com/rikarends/status/1621782820145217536?s=20 .
The macOS images (darwin ) use a different version of Zig but does not motivate exactly whey. If this is fixed with newer versions, we should try to move to using the same one for all targets to avoid code complexity.
See
fyne-cross-images/darwin/Dockerfile
Line 9 in 25ee723
Potentially related to #21.
The CI tests for FreeBSD arm64 are currently commented out in the ci.yml
workflow to get the calculator build to work for that target. We should diagnose the issue and find out why it happens.
When running the test, it seemed like fyne-cross said that “freebsd/amd64” was the target in line two. Might be a good place to start.
We should consider using the stable Zig 0.11.0 release instead of the development version.
I'm using features new in Go 1.20 for my project, and it fails to compile.
internal/ui_authentication.go:16:6: cmd.WaitDelay undefined (type *exec.Cmd has no field or method WaitDelay)
internal/ui_authentication.go:52:6: cmd.WaitDelay undefined (type *exec.Cmd has no field or method WaitDelay)
note: module requires Go 1.20
[✗] exit status 2
Upon investigation, I saw that the base image is still using Go 1.18.4
and Fyne v2.2.3
.
As I develop on an M2 Macbook, fyne-cross is my simplest solution to build for Linux x64 systems consistently.
N/A
A simple update to the latest Go and Fyne versions would be more than enough.
Once we have CI (#28), it would be great to automate deployment of the image to docker. I would love that just pushing a tag would trigger an automated process. Alternatively would be great if just merging to main trigger tagging and push automatically to docker.
Our FreeBSD images use LLVM version 12 which is three years old in April 2024.
See
fyne-cross-images/freebsd/base/Dockerfile
Line 52 in 25ee723
We should consider updating to a newer version for various improvements. It might be a good plan to match the version to the default LLVM version in the FreeBSD sources we use?
If we update to FreeBSD 13.3 for the sources, that would suggest using LLVM 17.
After watching this talk: https://archive.fosdem.org/2021/schedule/event/zig_android/ , I think it might be possible to reduce the Android image size even further using zig directly and with an even more minimal part of the SDK/NDK in the container.
Just throwing this issue here to discuss how we would see an acceptable way to do CI for this repo.
General idea is that on change, we build image for each target we can and run them with latest fyne-cross against a set of defined representative application.
It would relieve the amount of work required to maintain this repository if we could also depends on some automation to automatically update our Fyne and Go version. General idea would be to have a github action for each. For Fyne, it could poke github API to figure out the latest release with a tag of the form (vX.Y.Z) and update base/Dockerfile:FYNE_VERSION accordingly. For Golang, it is a bit more complex, as we will need to figure out the latest release from tag (similar to Fyne), but then lookup on the website what are the expected value for checksum of the relevant linux arm64 and linux amd64 package.
The fyne-cross tool has removed the need for using fixuid. We should remove it sometime going forward. Might require new versions as this would be a breaking change for someone using the old tools.
The tinygo project has recoded a minimal sdk for cross compiling application to darwin. No idea if that would be enough for fyne, but this would be just an amazing step forward worth trying: https://github.com/aykevl/macos-minimal-sdk .
Newer versions of Fyne (v2.5.0 and maybe v2.4.5) uses a Glfw version which has improved support for Wayland. Installing libdecor is not a requirement but it will result in a better Wayland experience for most people when running the binaries.
Latest Android NDK do support ARM64 as a host. This would enable building for Android from RPi and Apple M* host.
Fyne officially supports FreeBSD, OpenBSD and NetBSD. We should consider adding cross-compile support to all these systems.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.