fyne-io / fyne-cross Goto Github PK
View Code? Open in Web Editor NEWCross compiler tool for Fyne apps
License: BSD 3-Clause "New" or "Revised" License
Cross compiler tool for Fyne apps
License: BSD 3-Clause "New" or "Revised" License
It looks like we added libegl1 but it should have been libgles2 (or maybe we need both)?
Steps to replicate:
$ fyne-cross linux -arch arm64 -tags mobile
...
# github.com/fyne-io/mobile/gl
In file included from /go/pkg/mod/github.com/fyne-io/[email protected]/gl/work.go:32:
./work.h:12:10: fatal error: GLES3/gl3.h: No such file or directory
#include <GLES3/gl3.h> // install on Ubuntu with: sudo apt-get install libegl1-mesa-dev libgles2-mesa-dev libx11-dev
^~~~~~~~~~~~~
Go 1.14 added support for building against the arm64
target of FreeBSD (see https://golang.org/doc/go1.14#freebsd). Given that we now use Go 1.14, this should technically be possible to do. This would be a very addition given the recent increase and excitement in arm64
over amd64
.
I am on linux debian and my linux version is 4.19.0-13-amd64.
My go version is go1.16beta1 linux/amd64.
The fyne-cross version is v1.0.0.
I have two modules, a lib and an app.
The lib's go mod:
module github.com/Cookie04DE/Lib
go 1.16
require fyne.io/fyne v1.4.3
The app's go mod:
module github.com/Cookie04DE/App
go 1.16
require (
fyne.io/fyne v1.4.3
github.com/Cookie04DE/Lib v0.0.0
github.com/stretchr/testify v1.6.1 // indirect
github.com/webview/webview v0.0.0-20210115112615-0f8224c31374
)
replace github.com/Cookie04DE/Lib => /absolute/path/to/Lib
I opened a terminal in the app's folder and executed the following command: fyne-cross windows .
.
I got the following output:
[i] Target: windows/amd64
[i] Cleaning target directories...
[✓] "dist" dir cleaned: /absolute/path/to/App/fyne-cross/dist/windows-amd64
[✓] "temp" dir cleaned: /absolute/path/to/App/fyne-cross/tmp/windows-amd64
[✓] "bin" dir cleaned: /absolute/path/to/App/fyne-cross/bin/windows-amd64
[i] Checking for go.mod: /absolute/path/to/App/go.mod
[✓] go.mod found
[i] Building binary...
go: github.com/Cookie04DE/[email protected]: parsing /absolute/path/to/Lib/go.mod: open /absolute/path/to/Lib/go.mod: no such file or directory
[✗] exit status 1
The error message says that it can't find /absolute/path/to/Lib/go.mod
.
The file exists and when I execute cat /absolute/path/to/Lib/go.mod
I get the correct output:
module github.com/Cookie04DE/Lib
go 1.16
require fyne.io/fyne v1.4.3
Allow to inject a .gitconfig in fyne-cross docker image to be able to pull from private repositories.
Hello,
After #5 was fixed I updated fyne-cross locally here to test, and that worked well.
Unfortunately, it looks like -tags
are broken now.
Testing with https://github.com/AOSPAlliance/device-flasher
Working:
fyne-cross linux
Broken:
fyne-cross linux -tags GUI
It actually builds fine, it's packaging that's broken,
$ fyne-cross linux -tags GUI
[i] Target: linux/amd64
[i] Cleaning target directories...
[✓] "bin" dir cleaned: /path/fyne-cross/bin/linux-amd64
[✓] "dist" dir cleaned: /path/fyne-cross/dist/linux-amd64
[✓] "temp" dir cleaned: /path/fyne-cross/tmp/linux-amd64
[i] Checking for go.mod: /path/go.mod
[✓] go.mod found
[i] Building binary...
[✓] Binary: /path/fyne-cross/bin/linux-amd64/device-flasher
[i] Packaging app...
flag provided but not defined: -tags
Usage: fyne [command] [parameters], where command is one of:
<<< Usage text cut >>>
[✗] could not package the Fyne app: could not package the Fyne app: exit status 2
Command used in the pipeline where both the dependencies go
and docker
are present.
fyne-cross windows -output file-transfer-service ./src/cmd/gui/
Error :
could not create the rc file: open /app/fyne-cross/tmp/windows-amd64/main.rc: permission denied
[✗] could not package the Fyne app: exit status 1
When building for windows, some projects fail to add the icon to the exe file. Doesn't matter if building for x64 or x86 or when building from a different machine.
The project that it doesn't work on is my [email protected]
it has a structure that is something like
BeatList/
| - cmd/
| | - gui/
| - fyne-cross/
| | - tmp/
| | - bin/
| | - dist/
| - Icon.png
| - go.mod
When building with a working dir of BeatList with fyne-cross windows ./cmd/gui
it works fine and it generates the exe file, but it doesn't add the icon to the exe file.
The ico file is generated in the temp folder of fyne-cross but it just doesn't get applied to the exe.
I have another project I'm working with a very similar structure, only difference being that the base dir and the dir in cmd have the same name, it is working perfectly and the icon gets applied to the exe, so I tried renaming the folder in this project to be the same as the base dir to no effect.
If I go into the gui dir and use fyne package
then it works fine and generates an icon with the exe,
in the end
I did manage to get fyne cross to compile the exe with an icon, but I had to make another go mod file in the gui dir and move the Icon png to the gui dir (v0.1.3)
fyne-cross version v1.1.0
fyne version v2.0.4
I talked about this in the gophers discord as well and @andydotxyz mentioned a person with the same issue on the slack
go 1.16 windows10 64
D:\project\mygosoft\src\urlPreciseBlockingWithLoginV2>fyne-cross android -app-id cn.xfeng
[i] Target: android
[i] Cleaning target directories...
[✓] "temp" dir cleaned: D:\project\mygosoft\src\urlPreciseBlockingWithLoginV2\fyne-cross\tmp\android
[✓] "bin" dir cleaned: D:\project\mygosoft\src\urlPreciseBlockingWithLoginV2\fyne-cross\bin\android
[✓] "dist" dir cleaned: D:\project\mygosoft\src\urlPreciseBlockingWithLoginV2\fyne-cross\dist\android
[i] Checking for go.mod: D:\project\mygosoft\src\urlPreciseBlockingWithLoginV2\go.mod
[✓] go.mod found
[i] Packaging app...
go build -buildmode=c-shared -o /tmp/gomobile-work-422684388/lib/armeabi-v7a/liburlPreciseBlockingWithLoginV2.so urlPreciseBlockingWithLoginV2 failed: exit status 1
go: downloading github.com/fyne-io/mobile v0.1.2
/go/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/gomobile/clipboard_android.go:17:2: github.com/fyne-io/[email protected]: Get "https://proxy.golang.org/github.com/fyne-io/mobile/@v/v0.1.2.zip": dial tcp 172.217.24.17:443: connect: connection refused
/go/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/gomobile/driver.go:9:2: github.com/fyne-io/[email protected]: Get "https://proxy.golang.org/github.com/fyne-io/mobile/@v/v0.1.2.zip": dial tcp 172.217.24.17:443: connect: connection refused
/go/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/gomobile/driver.go:10:2: github.com/fyne-io/[email protected]: Get "https://proxy.golang.org/github.com/fyne-io/mobile/@v/v0.1.2.zip": dial tcp 172.217.24.17:443: connect: connection refused
/go/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/gomobile/driver.go:11:2: github.com/fyne-io/[email protected]: Get "https://proxy.golang.org/github.com/fyne-io/mobile/@v/v0.1.2.zip": dial tcp 172.217.24.17:443: connect: connection refused
/go/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/gomobile/device.go:5:2: github.com/fyne-io/[email protected]: Get "https://proxy.golang.org/github.com/fyne-io/mobile/@v/v0.1.2.zip": dial tcp 172.217.24.17:443: connect: connection refused
/go/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/gomobile/driver.go:13:2: github.com/fyne-io/[email protected]: Get "https://proxy.golang.org/github.com/fyne-io/mobile/@v/v0.1.2.zip": dial tcp 172.217.24.17:443: connect: connection refused
/go/pkg/mod/fyne.io/fyne/[email protected]/internal/painter/gl/gl_gomobile.go:11:2: github.com/fyne-io/[email protected]: Get "https://proxy.golang.org/github.com/fyne-io/mobile/@v/v0.1.2.zip": dial tcp 172.217.24.17:443: connect: connection refused
/go/pkg/mod/fyne.io/fyne/[email protected]/internal/painter/gl/gl_gomobile.go:12:2: github.com/fyne-io/[email protected]: Get "https://proxy.golang.org/github.com/fyne-io/mobile/@v/v0.1.2.zip": dial tcp 172.217.24.17:443: connect: connection refused
[✗] could not package the Fyne app: could not package the Fyne app: exit status 1
Windows arm64 laptops are becoming more accessible nowadays and arm specifically is getting very popular. It would be great if we could build binaries for arm64 as well. With Go 1.17, support for this architecture was added so we should at least be halfway to adding this support now. Go 1.18 seems to have a few improvements to the port, so it might not hurt to hold off to that version (not saying that we need, but it might not hurt).
With the API yes, but I don't know how good the cross-compiling toolchains are from Linux to Windows when
it comes to arm64. We probably need some research in this space.
Support for building to Windows on arm64, similar to how we can build for M1 macs or Linux on arm64.
NOTE: No one in our team has an arm64 Windows computer as far as I know. I am opening this mostly so we can add this when the time comes.
I build the application using fyne_cross on Macosx.
When i start the application on CentOS 7. I get this error /lib64/libm.so.6: version `GLIBC_2.27' not found.
May i know, how to overcome this error and launch the fyne application on CentOS 7
Ability to build and run mac and ios apps on a non mac machine
https://github.com/sickcodes/Docker-OSX works well on Local Linux, Github and Digital Ocean ( as it provides nested virtualisation)
As you can see, using go build
works (my build machine is macOS/amd64), but using fyne-cross
to cross-compile a windows binary does not.
$ make go-build
go build -o test-bin ./gui/...
$ make fyne-cross
fyne-cross windows -app-id net.synfin.FyneCrossTest \
-developer "Aaron Turner" -app-version 0.0.1 \
-icon /Users/aturner/go/src/github.com/synfinatic/fyne-cross-test/gui/Icon.png \
-name windows.exe /Users/aturner/go/src/github.com/synfinatic/fyne-cross-test/gui
[i] Target: windows/amd64
[i] Cleaning target directories...
[✓] "dist" dir cleaned: /Users/aturner/go/src/github.com/synfinatic/fyne-cross-test/fyne-cross/dist/windows-amd64
[✓] "temp" dir cleaned: /Users/aturner/go/src/github.com/synfinatic/fyne-cross-test/fyne-cross/tmp/windows-amd64
[✓] "bin" dir cleaned: /Users/aturner/go/src/github.com/synfinatic/fyne-cross-test/fyne-cross/bin/windows-amd64
[i] Checking for go.mod: /Users/aturner/go/src/github.com/synfinatic/fyne-cross-test/go.mod
[✓] go.mod found
Wrote manifest: /app/fyne-cross/tmp/windows-amd64/windows.exe.manifest
[i] Building binary...
# github.com/synfinatic/fyne-cross-test/gui
gui/test_windows.go:3:6: Test redeclared in this block
previous declaration at gui/test_unix.go:4:6
gui/test_windows.go:7:16: (*Test).Text redeclared in this block
previous declaration at gui/test_unix.go:8:6
[✗] exit status 2
make: *** [fyne-cross] Error 1
As you can see the offending two files should prevent these errors with fyne-cross:
$ head -3 gui/test*
==> gui/test_unix.go <==
// +build linux darwin
package main
==> gui/test_windows.go <==
package main
type Test struct {
you can look at and play with the code here: https://github.com/synfinatic/fyne-cross-test
While compiling, I came across a small discrepancy with the -tag flag.
For compiling I am using the following command:
fyne-cross linux -arch arm -tags wayland,gles,mesa
To be able to use this command, I had to use fyne-cross version 1.1.0, because the usage of the version 1.2.0 leads in the error:
[i] Target: linux/arm
[i] Cleaning target directories...
[✓] "bin" dir cleaned: /home/devel/Dokumente/smart-home/fyne-cross/bin/linux-arm
[✓] "dist" dir cleaned: /home/devel/Dokumente/smart-home/fyne-cross/dist/linux-arm
[✓] "temp" dir cleaned: /home/devel/Dokumente/smart-home/fyne-cross/tmp/linux-arm
[i] Checking for go.mod: /home/devel/Dokumente/smart-home/go.mod
[✓] go.mod found
[i] Building binary...
cmd/go: -tags space-separated list contains comma
[✗] exit status 2
But when I display the help menu in the command line (fyne-cross linux -arch arm --help
) it says for the desription of the -tags: List of additional build tags separated by comma.
Is this meant to be like this or a bug? And how am I supposed to execute my command in version 1.2.0?
I want to build a fyne app for a smart home usecase on a debian bullseye virtual machine. The target device is an embedded device with a connected touch panel with linux debian operating system and arm architecture.
I use the library https://github.com/faiface/beep to play mp3 music and in the virtual machine it works fine. But when I try to cross compile with fyne-cross, I get an error that alsa is missing.
I already tried to manually add libasound2-dev:armhf
in the docker container, but it did not work. Do you have any suggestions or ideas how to fix the problem?
Fyne-cross compiling results in an error. I use the following command:
fyne-cross linux -arch arm
And the output is the following:
[i] Target: linux/arm
[i] Cleaning target directories...
[✓] "temp" dir cleaned: /home/devel/Dokumente/smart-home/fyne-cross/tmp/linux-arm
[✓] "bin" dir cleaned: /home/devel/Dokumente/smart-home/fyne-cross/bin/linux-arm
[✓] "dist" dir cleaned: /home/devel/Dokumente/smart-home/fyne-cross/dist/linux-arm
[i] Checking for go.mod: /home/devel/Dokumente/smart-home/go.mod
[✓] go.mod found
[i] Building binary...
# pkg-config --cflags -- alsa
Package alsa was not found in the pkg-config search path.
Perhaps you should add the directory containing `alsa.pc'
to the PKG_CONFIG_PATH environment variable
No package 'alsa' found
pkg-config: exit status 1
[✗] exit status 2
func Play() {
f, err := os.Open("music.mp3")
if err != nil {
log.Fatalln(err)
}
streamer, format, err := mp3.Decode(f)
if err != nil {
log.Fatalln(err)
}
speaker.Init(format.SampleRate, format.SampleRate.N(time.Second/10))
speaker.Play(streamer)
}
[i] Target: linux/arm command.Context{Volume:volume.Volume{binDirHost:"/home/devel/Dokumente/smart-home/fyne-cross/bin", cacheDirHost:"/home/devel/.cache/fyne-cross", distDirHost:"/home/devel/Dokumente/smart-home/fyne-cross/dist", tmpDirHost:"/home/devel/Dokumente/smart-home/fyne-cross/tmp", workDirHost:"/home/devel/Dokumente/smart-home"}, Architecture:"arm", Env:[]string{"GOOS=linux", "GOARCH=arm", "CC=arm-linux-gnueabihf-gcc", "GOARM=7"}, ID:"linux-arm", LdFlags:[]string(nil), OS:"linux", Tags:[]string{"gles"}, AppBuild:"1", AppID:"", AppVersion:"1.0", CacheEnabled:false, DockerImage:"docker.io/fyneio/fyne-cross:1.2-linux-arm", Icon:"/home/devel/Dokumente/smart-home/Icon.png", Name:"smart-home", Package:".", Release:false, StripDebug:true, Debug:true, Pull:false, Category:"", Certificate:"", Developer:"", Keystore:"", KeystorePass:"", KeyPass:"", Password:"", Profile:""} [i] Cleaning target directories... [✓] "bin" dir cleaned: /home/devel/Dokumente/smart-home/fyne-cross/bin/linux-arm [✓] "dist" dir cleaned: /home/devel/Dokumente/smart-home/fyne-cross/dist/linux-arm [✓] "temp" dir cleaned: /home/devel/Dokumente/smart-home/fyne-cross/tmp/linux-arm [i] Checking for go.mod: /home/devel/Dokumente/smart-home/go.mod [✓] go.mod found [i] Building binary... /usr/bin/docker run --rm -t -w /app -v /home/devel/Dokumente/smart-home:/app:z -u 1001:1001 --entrypoint fixuid -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e GOOS=linux -e GOARCH=arm -e CC=arm-linux-gnueabihf-gcc -e GOARM=7 -e CGO_LDFLAGS=-w -s docker.io/fyneio/fyne-cross:1.2-linux-arm go build -trimpath -tags 'gles' -o /app/fyne-cross/bin/linux-arm/smart-home -v . fixuid: fixuid should only ever be used on development systems. DO NOT USE IN PRODUCTION fixuid: updating user 'docker' to UID '1001' fixuid: updating group 'docker' to GID '1001' fixuid: recursively searching path / fixuid: chown /home/docker fixuid: chown /home/docker/.bash_logout fixuid: chown /home/docker/.bashrc fixuid: chown /home/docker/.profile go: downloading fyne.io/fyne/v2 v2.1.3 go: downloading github.com/fsnotify/fsnotify v1.4.9 go: downloading github.com/godbus/dbus/v5 v5.0.4 go: downloading golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 go: downloading github.com/wcharczuk/go-chart/v2 v2.1.0 go: downloading gorm.io/driver/sqlite v1.3.1 go: downloading gorm.io/gorm v1.23.2 go: downloading github.com/hajimehoshi/go-mp3 v0.3.0 go: downloading github.com/hajimehoshi/oto v0.7.1 go: downloading github.com/robtec/newsapi v0.0.0-20180922142248-e986ded8a669 go: downloading github.com/bpicode/fritzctl v1.4.23 go: downloading github.com/yuin/goldmark v1.3.8 go: downloading github.com/fredbi/uri v0.0.0-20181227131451-3dcfdacbaaf3 go: downloading github.com/go-gl/glfw/v3.3/glfw v0.0.0-20211024062804-40e447a793be go: downloading github.com/mattn/go-sqlite3 v1.14.9 go: downloading github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 go: downloading golang.org/x/image v0.0.0-20200927104501-e162460cd6b5 go: downloading github.com/goki/freetype v0.0.0-20181231101311-fa8a33aabaff go: downloading github.com/srwiley/oksvg v0.0.0-20200311192757-870daf9aa564 go: downloading github.com/srwiley/rasterx v0.0.0-20200120212402-85cb7272f5e9 go: downloading github.com/go-gl/gl v0.0.0-20210813123233-e4099ee2221f go: downloading github.com/jinzhu/inflection v1.0.0 go: downloading github.com/jinzhu/now v1.1.4 go: downloading golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d go: downloading gopkg.in/yaml.v2 v2.4.0 go: downloading github.com/fatih/color v1.13.0 go: downloading golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 go: downloading github.com/mattn/go-colorable v0.1.9 go: downloading github.com/mattn/go-isatty v0.0.14 go: downloading golang.org/x/text v0.3.6 internal/unsafeheader internal/goexperiment internal/abi internal/cpu runtime/internal/sys internal/race sync/atomic unicode runtime/internal/math internal/bytealg runtime/internal/atomic unicode/utf8 internal/itoa math/bits image/color math runtime container/list crypto/internal/subtle crypto/subtle unicode/utf16 vendor/golang.org/x/crypto/cryptobyte/asn1 internal/nettrace vendor/golang.org/x/crypto/internal/subtle encoding fyne.io/fyne/v2/internal/color golang.org/x/image/colornames golang.org/x/net/html/atom golang.org/x/text/encoding/internal/identifier golang.org/x/text/internal/utf8internal golang.org/x/image/math/f64 golang.org/x/sys/internal/unsafeheader github.com/bpicode/fritzctl/internal/stringutils github.com/hajimehoshi/go-mp3/internal/bits github.com/wcharczuk/go-chart/v2/roboto github.com/hajimehoshi/go-mp3/internal/imdct internal/reflectlite sync internal/testlog math/rand internal/singleflight runtime/cgo errors sort io strconv internal/oserror syscall bytes strings reflect bufio internal/syscall/unix time internal/syscall/execenv path image internal/poll io/fs hash hash/crc32 context crypto crypto/elliptic/internal/fiat os crypto/internal/randutil crypto/hmac internal/fmtsort encoding/binary crypto/rc4 vendor/golang.org/x/net/dns/dnsmessage vendor/golang.org/x/crypto/hkdf vendor/golang.org/x/text/transform crypto/cipher crypto/sha512 fmt io/ioutil crypto/aes crypto/des crypto/ed25519/internal/edwards25519/field crypto/md5 crypto/sha1 crypto/ed25519/internal/edwards25519 crypto/sha256 encoding/base64 net log compress/flate math/big encoding/hex encoding/pem net/url compress/gzip path/filepath vendor/golang.org/x/crypto/chacha20 vendor/golang.org/x/crypto/poly1305 vendor/golang.org/x/crypto/chacha20poly1305 vendor/golang.org/x/crypto/curve25519 vendor/golang.org/x/text/unicode/bidi vendor/golang.org/x/text/unicode/norm crypto/rand crypto/elliptic encoding/asn1 crypto/ed25519 crypto/rsa vendor/golang.org/x/crypto/cryptobyte crypto/dsa crypto/x509/pkix vendor/golang.org/x/text/secure/bidirule vendor/golang.org/x/net/http2/hpack vendor/golang.org/x/net/idna crypto/ecdsa mime mime/quotedprintable net/http/internal net/http/internal/ascii regexp/syntax encoding/json image/internal/imageutil image/draw encoding/xml regexp golang.org/x/image/math/fixed crypto/x509 net/textproto vendor/golang.org/x/net/http/httpproxy github.com/fredbi/uri github.com/goki/freetype/raster vendor/golang.org/x/net/http/httpguts mime/multipart golang.org/x/image/font golang.org/x/image/vector golang.org/x/net/html github.com/goki/freetype/truetype github.com/srwiley/rasterx crypto/tls golang.org/x/text/transform golang.org/x/text/internal/tag golang.org/x/text/internal/language golang.org/x/text/encoding golang.org/x/text/encoding/internal golang.org/x/text/runes golang.org/x/text/encoding/charmap golang.org/x/text/encoding/japanese golang.org/x/text/encoding/korean golang.org/x/text/encoding/simplifiedchinese golang.org/x/text/encoding/traditionalchinese golang.org/x/text/encoding/unicode golang.org/x/text/internal/language/compact golang.org/x/image/draw net/http/httptrace image/jpeg golang.org/x/text/language net/http hash/adler32 compress/zlib image/png golang.org/x/text/encoding/htmlindex golang.org/x/net/html/charset github.com/srwiley/oksvg github.com/go-gl/gl/v3.1/gles2 github.com/goki/freetype github.com/yuin/goldmark/util github.com/go-gl/glfw/v3.3/glfw fyne.io/fyne/v2 fyne.io/fyne/v2/internal/cache fyne.io/fyne/v2/internal/driver fyne.io/fyne/v2/internal/app fyne.io/fyne/v2/storage/repository fyne.io/fyne/v2/storage fyne.io/fyne/v2/canvas fyne.io/fyne/v2/driver/desktop fyne.io/fyne/v2/theme fyne.io/fyne/v2/internal/widget fyne.io/fyne/v2/internal fyne.io/fyne/v2/internal/animation fyne.io/fyne/v2/internal/async fyne.io/fyne/v2/internal/painter fyne.io/fyne/v2/internal/repository fyne.io/fyne/v2/layout fyne.io/fyne/v2/data/binding fyne.io/fyne/v2/driver/mobile golang.org/x/sys/unix github.com/fsnotify/fsnotify os/exec os/user github.com/godbus/dbus/v5 golang.org/x/sys/execabs github.com/golang/freetype/raster github.com/yuin/goldmark/text github.com/yuin/goldmark/ast github.com/golang/freetype/truetype github.com/yuin/goldmark/parser github.com/yuin/goldmark/renderer github.com/yuin/goldmark/renderer/html github.com/wcharczuk/go-chart/v2/drawing github.com/wcharczuk/go-chart/v2/matrix github.com/yuin/goldmark github.com/wcharczuk/go-chart/v2 fyne.io/fyne/v2/widget database/sql/driver fyne.io/fyne/v2/container database/sql go/token go/scanner go/ast github.com/mattn/go-sqlite3 gorm.io/gorm/clause gorm.io/gorm/utils gorm.io/gorm/logger encoding/gob github.com/jinzhu/inflection github.com/jinzhu/now gorm.io/gorm/schema gorm.io/gorm gorm.io/gorm/callbacks gorm.io/gorm/migrator smart-home/services/weather github.com/bpicode/fritzctl/internal/errors github.com/mattn/go-isatty github.com/mattn/go-colorable github.com/fatih/color golang.org/x/crypto/ssh/terminal github.com/bpicode/fritzctl/logger gopkg.in/yaml.v2 github.com/bpicode/fritzctl/internal/console encoding/csv github.com/bpicode/fritzctl/httpread github.com/hajimehoshi/go-mp3/internal/consts github.com/hajimehoshi/go-mp3/internal/frameheader github.com/hajimehoshi/go-mp3/internal/huffman github.com/hajimehoshi/go-mp3/internal/sideinfo github.com/hajimehoshi/go-mp3/internal/maindata github.com/hajimehoshi/go-mp3/internal/frame github.com/hajimehoshi/go-mp3 github.com/bpicode/fritzctl/config github.com/hajimehoshi/oto/internal/mux github.com/hajimehoshi/oto # pkg-config --cflags -- alsa Package alsa was not found in the pkg-config search path. Perhaps you should add the directory containing `alsa.pc' to the PKG_CONFIG_PATH environment variable No package 'alsa' found pkg-config: exit status 1 github.com/robtec/newsapi/api github.com/bpicode/fritzctl/fritz smart-home/services/news smart-home/services/fritzbox fyne.io/fyne/v2/internal/painter/gl fyne.io/fyne/v2/internal/driver/common fyne.io/fyne/v2/internal/driver/glfw fyne.io/fyne/v2/app gorm.io/driver/sqlite smart-home/services/clock smart-home/database [✗] exit status 2
By omitting the music playback feature and thus not using faiface/beep and alsa, I can cross-compile for my target device and also execute the application on it. Although the touch does work on the system and thus on other applications, the problem is that the touch does not work in the fyne application. The target device uses wayland-weston. In addition, the application only starts when a mouse is plugged in. The same problem does not occur on an android device. Maybe the problem is that for linux/arm compilations the desktop driver gets choosen and there is no touch driver like there is for android devices. Do you have any ideas to fix this problem to enable the touch?
I get the following error output, when running the program on my target device:
For the problem before I used the following command:
fyne-cross linux -arch arm -tags wayland,gles,mesa
To be able to use this command, I had to use fyne-cross version 1.1.0, because the usage of the version 1.2.0 leads in the error:
[i] Target: linux/arm
[i] Cleaning target directories...
[✓] "bin" dir cleaned: /home/devel/Dokumente/smart-home/fyne-cross/bin/linux-arm
[✓] "dist" dir cleaned: /home/devel/Dokumente/smart-home/fyne-cross/dist/linux-arm
[✓] "temp" dir cleaned: /home/devel/Dokumente/smart-home/fyne-cross/tmp/linux-arm
[i] Checking for go.mod: /home/devel/Dokumente/smart-home/go.mod
[✓] go.mod found
[i] Building binary...
cmd/go: -tags space-separated list contains comma
[✗] exit status 2
But when I display the help menu in the command line (fyne-cross linux -arch arm --help
) it says for the desription of the -tags: List of additional build tags separated by comma
.
Is this meant to be like this or a bug? And how am I supposed to execute my command in version 1.2.0?
Current develop branch of Fyne does provide a new target for packaging: web which does use go 1.17 to compile a wasm binary and gopherjs for generating a JS output (for use by Chrome browser).
Gopherjs is only supported on Linux. This is where fyne-cross would help by providing all other platform with a working solution.
Hopefully yes.
Add gopherjs in the docker image and add a new target.
I installed fyne-cross on Xubuntu 20.04. No Android Studio, SDK, NDK, just plain fresh Xubuntun 20.04 plus the fyne cross installation guide. When building the example for Windows (fyne-cross windows), this works like a charm and the resulting exe runs smoothly on Windows 10. Building for Android (fyne-cross android) works as well without any error message (though the resulting apk comes in at about 54M). When transferring the apk to an Android device and trying to install it (Android 6 and Android 8) I get an error message "There was a problem parsing the package.".
Any idea what I am missing?
For building this module, libsnap.so is required
to install that we need to run following commands
$ sudo add-apt-repository ppa:gijzelaar/snap7
$ sudo apt-get update
$ sudo apt-get install libsnap7-dev libsnap7-1
But the docker container doesn't have this so it'll just throw a compilation erro
[i] Building binary...
# github.com/avikki/snap7-go
/usr/bin/ld: cannot find -lsnap7
collect2: error: ld returned 1 exit status
[✗] exit status 2
Is there a way to remove this dependency while compiling?
and is it possible to add libsnap7-dev
installation process to the docker image?
I figured out that there is -image
cli argument, so I built custom docker images, over the base docker image for each architecture with libsnap7
on it.
them simply compiled with command fyne-cross linux -image <my-image-name>-linux64
PS: there are a lot of undocumented flags, I may update it later.
I get this error when trying to build for linux with arch amd64
i] Target: linux/amd64
[i] Cleaning target directories...
[✓] "dist" dir cleaned: /home/mohammadreza/Projects/me_fynetest/fyne-cross/dist/linux-amd64
[✓] "temp" dir cleaned: /home/mohammadreza/Projects/me_fynetest/fyne-cross/tmp/linux-amd64
[✓] "bin" dir cleaned: /home/mohammadreza/Projects/me_fynetest/fyne-cross/bin/linux-amd64
[i] Checking for go.mod: /home/mohammadreza/Projects/me_fynetest/go.mod
[✓] go.mod found
[i] Building binary...
[✓] Binary: /home/mohammadreza/Projects/me_fynetest/fyne-cross/bin/linux-amd64/me_fynetest
[i] Packaging app...
[!] Default icon not found at "/home/mohammadreza/Projects/me_fynetest/Icon.png"
[✓] Created a placeholder icon using Fyne logo for testing purpose
unsupported target operating system "linux/amd64"
[✗] could not package the Fyne app: could not package the Fyne app: exit status 1
The binary build but I get this error but compressed .zip file not available on fyne-cross/dist
folder and get error.
When running the command...
fyne-cross linux -pull -app-id=com.glasstty.telstar-client -arch=amd64,arm64
I receive the following error:
Failed to create archive with tar: exit status 1
[✗] could not package the Fyne app: could not package the Fyne app: exit status 1
The binary itself is created successfully.
All builds and packaging work as expected for Windows (386/amd64) and Darwin (amd64 and arm64).
The docker images I am using are:
fyneio/fyne-cross 1.1-windows 877befb40c44 3 weeks ago 1.62GB
fyneio/fyne-cross 1.1-linux-arm64 05adcb22a5ba 3 weeks ago 1.48GB
fyneio/fyne-cross 1.1-base 7e37d8c376af 3 weeks ago 1.07GB
$ fyne-cross linux -pull -debug -no-cache -app-id=com.glasstty.telstar-client -arch=amd64,arm64
....
github.com/yuin/goldmark/renderer
github.com/yuin/goldmark/parser
github.com/yuin/goldmark/renderer/html
github.com/yuin/goldmark
fyne.io/fyne/v2/widget
fyne.io/fyne/v2/container
fyne.io/fyne/v2/dialog
bitbucket.org/johnnewcombe/telstar-client/display
fyne.io/fyne/v2/internal/painter/gl
fyne.io/fyne/v2/internal/driver/common
fyne.io/fyne/v2/internal/driver/glfw
fyne.io/fyne/v2/app
bitbucket.org/johnnewcombe/telstar-client
[✓] Binary: /Users/john/Development/Repositories/Telstar/telstar-client/fyne-cross/bin/linux-amd64/telstar-client
[i] Packaging app...
/usr/local/bin/docker run --rm -t -w /app -v /Users/john/Development/Repositories/Telstar/telstar-client:/app -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e fyne_uid=501 fyneio/fyne-cross:1.1-base /usr/local/bin/fyne version
fyne cli version: v2.1.2
/usr/local/bin/docker run --rm -t -w /app/fyne-cross/tmp/linux-amd64 -v /Users/john/Development/Repositories/Telstar/telstar-client:/app -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e GOOS=linux -e GOARCH=amd64 -e CC=gcc -e fyne_uid=501 fyneio/fyne-cross:1.1-base /usr/local/bin/fyne package -os linux -name telstar-client -icon /app/fyne-cross/tmp/linux-amd64/Icon.png -appBuild 1 -appVersion 1.0 -appID com.glasstty.telstar-client -executable /app/fyne-cross/bin/linux-amd64/telstar-client
Failed to create archive with tar: exit status 1
[✗] could not package the Fyne app: could not package the Fyne app: exit status 1
Currently, only binaries are built when cross-compiling for freebsd
. The support for running the package
command in fyne.io/fyne/cmd/fyne
landed in v1.4.0
. It would be great if we could update to support this.
D:\project\mygosoft\src\riskExcel2021>fyne-cross windows -arch=386
[i] Target: windows/386
[i] Cleaning target directories...
[✓] "bin" dir cleaned: D:\project\mygosoft\src\riskExcel2021\fyne-cross\bin\windows-386
[✓] "dist" dir cleaned: D:\project\mygosoft\src\riskExcel2021\fyne-cross\dist\windows-386
[✓] "temp" dir cleaned: D:\project\mygosoft\src\riskExcel2021\fyne-cross\tmp\windows-386
[i] Checking for go.mod: D:\project\mygosoft\src\riskExcel2021\go.mod
[✓] go.mod found
[i] Building binary...
go: fyne.io/fyne/[email protected]: Get "https://proxy.golang.org/fyne.io/fyne/v2/@v/v2.0.3.mod": dial tcp 172.217.24.17:443: connect: connection refused
[✗] exit status 1
I have a 64-bit only application that I'd like to build for Android. Currently, fyne-cross only supports building for all architectures on Android, so my app fails to build.
Since the desktop builders already have an -arch
flag, I think it would be natural to support the same for Android.
Modern web browser do not happily open local files anymore. They need to be served by a web server. fyne command line does provide that, but for the web, we need gopherjs and wasm as an output which might or might not work on your system. It would be nice for fyne-cross to provide fyne serve inside its container to simplify developer development cycle.
This would be a follow up to #92
It might require adding a new command.
Once #92 is solved this command should most likely just be about running fyne serve.
the new xcode contains no longer bz2 files, they are .xz:
> fyne-cross darwin-image --xcode-path=Command_Line_Tools_for_Xcode_13.1.dmg
...
---> 624ebd9b4d71
Step 14/18 : RUN echo "Available SDKs:" && ls -1 MacOSX*.tar.bz2 && if [ -z "$SDK_VERSION" ] ; then ls -1 MacOSX*.tar.bz2 | sort -Vr | head -1 | xargs -i mv {} tarballs ; else mv MacOSX*.tar.bz2 tarballs ; fi
---> Running in 66dc7a372baf
Available SDKs:
ls: cannot access 'MacOSX*.tar.bz2': No such file or directory
The command '/bin/sh -c echo "Available SDKs:" && ls -1 MacOSX*.tar.bz2 && if [ -z "$SDK_VERSION" ] ; then ls -1 MacOSX*.tar.bz2 | sort -Vr | head -1 | xargs -i mv {} tarballs ; else mv MacOSX*.tar.bz2 tarballs ; fi' returned a non-zero code: 2
[✗] could not create the docker darwin image: exit status 2
When I try to build for darwin
, I get
[✓] go.mod found
[i] Packaging app...
[i] Building binary...
Unable to find image 'fyneio/fyne-cross:1.1-darwin' locally
docker: Error response from daemon: manifest for fyneio/fyne-cross:1.1-darwin not found: manifest unknown: manifest unknown.
See 'docker run --help'.
[✗] exit status 125
Windows and Linux work though. Any ideas on how to fix?
It is possible to setup a cluster of machine that will be able to run multiple containers at the same time or sequentially using Kubernetes based infrastructure. Technically, it should be possible to reuse most of the existing logic in fyne-cross to drive a cluster to do the build work.
Specifying the cluster is done implicitly with the kubernetes config file. What could be necessary and trigger the switch to use kubernetes could be the specification of a namespace to use with the '-n' parameter usually used by kubectl command.
This is still a reflection and not something where I am sure on how things need to be done.
A little bit of background, kubernetes has an API which orchestrate things in the cluster. This has to use it, but this API is low bandwidth. We shouldn't for example transfer file through it in large quantity. It is ok for debug purpose, but not for production. The container in a kubernetes cluster are named pods. They have ressource attached to them, like filesystem and config. The pods are what fyne-cross should control.
Each machine that form a cluster is named a node and with certain configuration, they can scale on demand too. That's something fyne-cross shouldn't try to control.
You can experiment locally with tool like minikube.
The main difference between podman/docker backend and kubernetes backend is that the container is not going to run on the same machine. Which means all the necessary data must be send over to the container and not rely on the availability of the local file system.
My current idea for that purpose is that all the mounting point are packaged with tar zstd and uploaded to a S3 bucket by fyne-cross. This is usually available has a public front service and can be mimicked with open source solution like min.io. Then the pod during initialization is pointed to that S3 bucket and locally unpack the content. This allow for uploading things once and reusing it potentially for multiple build in a row. Once a build is done, the resulting artifact would also be uploaded to S3. fyne-cross could then download them back on the local machine.
All the configuration for this cloud services are usually stored in environment variable or yaml file. We might start by just supporting environment variable. I will try to build a prototype of this shortly to see how usable it is.
Starting from v2.1.0 Fyne CLI adds a FyneApp.toml metadata file to hold defaults for the package process.
fyne-cross should be updated to support the FyneApp.toml file.
Yes.
Update fyne-cross to support the FyneApp.toml file out of the box.
Running fyne-cross dawrin-image on my new M1 Air. After an hour or so building various things, we eventually end with the following failure. Is there any additional info I can share to help diagnose?
macos 11.3.1, Command_Line_Tools_for_Xcode_12.5.dmg, docker 20.10.6, go 1.16.5 darwin/arm64
executor failed running [/bin/sh -c UNATTENDED=yes SDK_VERSION=${SDK_VERSION} OSX_VERSION_MIN=${OSX_VERSION_MIN} ./build.sh]: exit code: 1
[✗] could not create the docker darwin image: exit status 1
Fyne 1.4.2 adds priliminary support for Wayland, but fyne-cross is missing some dependencies.
❯ fyne-cross linux -arch arm -tags wayland
[i] Target: linux/arm
[i] Cleaning target directories...
[✓] "bin" dir cleaned: /tmp/fyne/cmd/fyne_demo/fyne-cross/bin/linux-arm
[✓] "dist" dir cleaned: /tmp/fyne/cmd/fyne_demo/fyne-cross/dist/linux-arm
[✓] "temp" dir cleaned: /tmp/fyne/cmd/fyne_demo/fyne-cross/tmp/linux-arm
[i] Checking for go.mod: /tmp/fyne/cmd/fyne_demo/go.mod
[✓] go.mod found
[i] Building binary...
# github.com/go-gl/glfw/v3.3/glfw
In file included from ./glfw/src/internal.h:190,
from ./glfw/src/context.c:30,
from /go/pkg/mod/github.com/go-gl/glfw/v3.3/[email protected]/c_glfw.go:4:
./glfw/src/wl_platform.h:28:10: fatal error: xkbcommon/xkbcommon.h: No such file or directory
#include <xkbcommon/xkbcommon.h>
^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[✗] exit status 2
I'm using podman + docker-podman, it should be compatible.
Looking on the Dockerfile, it seems that you're using gosu to change the right + user id, but the directory continues to be owned by root:
fyne@ccd04cf246dd:/app/fyne-cross/tmp/windows-amd64$ ls -la .
total 8
drwxr-xr-x. 1 root root 46 Apr 21 19:45 .
drwxr-xr-x. 1 root root 26 Apr 21 19:45 ..
-rw-rw-r--. 1 root root 4886 Apr 21 19:45 fyne-completion.exe.ico
This way, the container wouldn't create files in the current directory.
I suggest the use of fixuid instead of using gosu: https://github.com/boxboat/fixuid
Then the command should not use fyne_uid
but the standard --user
option. That would be more efficient and would work with any container engine.
One note, you should suffix path volumes with ":z
to avoid SELinux constraints :)
Before 1.0.0 we should support the "release" version of packages.
This partly is internal detail ("fyne release" instead of "fyne package") but also will require some new flags to be passed in for certificates / passwords.
This is still a work in progress upstream, but should be ready in a week or two.
The current Buster base for the images has packages that were (apart from various backported security fixes) initially from 2019. Upgrading would mean that we get a much less ancient gcc compiler (and probably a few other nice, but less important, updates).
This would mean going from gcc 8 to gcc 10 and newer versions of gcc should contain various performance improvements and probably a few security improvements as well (hardening changes, those that are not directly vulnerability fixes to the old version we have now). It also means upping the glibc version from 2.28 to 2.31. I don't know if there is anything there that will benefit us though (unless any of our deps can take advantage of that) as we link shared to it.
Yes, but it is worth noting that this will make the Linux binaries no long run on a few of the older systems with glibc 2.30 and earlier. We might want to hold off with this until Bullseye is more than just half a year old.
Just changing the base to a new Debian release. I'm opening this issue mostly as a reminder and to write down my thoughts about why we should consider doing so in the future.
Hello,
We're using GitLab CI currently to build our fyne-cross project, and since that runs in a docker container by default, it needs a docker image where one can run fyne-cross. Since fyne-cross uses docker itself, we need docker in docker, and additionally we also need golang to install and run fyne-cross
or the fyne
cmd.
There's docker images and golang images (which is what we were using), but from a quick search I didn't find anything with both.
I was thinking of creating a new image, either:
Could also add the fyne
cmd and fyne-cross
to the images.
Figured I'd ask here first if something like this already exists, or if not, would there be any additional interest in this.
It is currently not possible to build release binaries for windows. Could the required dependency be bundled into a docker image?
Windows binaries seems to no longer pass "-H windowsgui", which means that all binaries (even those built without -console
) show a console when opened. This was recently reported to me at Jacalz/rymdport#34.
I suspect that this broke with https://github.com/fyne-io/fyne-cross/pull/42/files#r692376503 but I sadly don't have time to look at it right now.
Steps to reproduce the behaviour:
-console
flag.Any code will do.
I did not bother with --no-cache because `--debug` has enough meaningful information. ```bash [jacob@vostro rymdport]$ ~/go/bin/fyne-cross windows -arch amd64 --debug [i] Target: windows/amd64 command.Context{Volume:volume.Volume{binDirHost:"/home/jacob/Git/rymdport/fyne-cross/bin", cacheDirHost:"/home/jacob/.cache/fyne-cross", distDirHost:"/home/jacob/Git/rymdport/fyne-cross/dist", tmpDirHost:"/home/jacob/Git/rymdport/fyne-cross/tmp", workDirHost:"/home/jacob/Git/rymdport"}, Architecture:"amd64", Env:[]string{"GOOS=windows", "GOARCH=amd64", "CC=x86_64-w64-mingw32-gcc"}, ID:"windows-amd64", LdFlags:[]string{"-H=windowsgui"}, OS:"windows", Tags:[]string(nil), AppBuild:"16", AppID:"io.github.jacalz.rymdport", AppVersion:"3.0.0", CacheEnabled:true, DockerImage:"docker.io/fyneio/fyne-cross:1.2-windows", Icon:"internal/assets/icon/icon-512.png", Name:"rymdport.exe", Package:".", Release:false, StripDebug:true, Debug:true, Pull:false, Category:"", Certificate:"", Developer:"", Keystore:"", KeystorePass:"", KeyPass:"", Password:"", Profile:""} [i] Cleaning target directories... [✓] "bin" dir cleaned: /home/jacob/Git/rymdport/fyne-cross/bin/windows-amd64 [✓] "dist" dir cleaned: /home/jacob/Git/rymdport/fyne-cross/dist/windows-amd64 [✓] "temp" dir cleaned: /home/jacob/Git/rymdport/fyne-cross/tmp/windows-amd64 [i] Checking for go.mod: /home/jacob/Git/rymdport/go.mod [✓] go.mod found /usr/bin/podman run --rm -t -w /app/fyne-cross/tmp/windows-amd64 -v /home/jacob/Git/rymdport:/app:z --userns keep-id -e use_podman=1 -e CGO_ENABLED=1 -e GOCACHE=/go/go-build docker.io/fyneio/fyne-cross:1.2-windows /usr/local/bin/gowindres -arch amd64 -output rymdport.exe -workdir /app/fyne-cross/tmp/windows-amd64 [i] Building binary... [go build -trimpath -o /app/fyne-cross/bin/windows-amd64/rymdport.exe -v .] /usr/bin/podman run --rm -t -w /app -v /home/jacob/Git/rymdport:/app:z -v /home/jacob/.cache/fyne-cross:/go:z --userns keep-id -e use_podman=1 -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e GOOS=windows -e GOARCH=amd64 -e CC=x86_64-w64-mingw32-gcc -e CGO_LDFLAGS=-w -s docker.io/fyneio/fyne-cross:1.2-windows go build -trimpath -o /app/fyne-cross/bin/windows-amd64/rymdport.exe -v . [✓] Binary: /home/jacob/Git/rymdport/fyne-cross/bin/windows-amd64/rymdport.exe [i] Packaging app... [✓] Package: /home/jacob/Git/rymdport/fyne-cross/dist/windows-amd64/rymdport.exe.zip ```
fyne-cross is unable to create the darwin docker image on M1
From #45 (comment):
#10 230.7 make[1]: Leaving directory '/osxcross/build/p7zip/CPP/7zip/UI/Console'
#10 230.8 ./install.sh /osxcross/target/SDK/tools/bin /osxcross/target/SDK/tools/lib/p7zip /osxcross/target/SDK/tools/man /osxcross/target/SDK/tools/share/doc/p7zip
#10 231.1 - installing /osxcross/target/SDK/tools/bin/7z
#10 231.1 - installing /osxcross/target/SDK/tools/lib/p7zip/7z.so
#10 231.2 - installing /osxcross/target/SDK/tools/lib/p7zip/Codecs
#10 231.2 - installing /osxcross/target/SDK/tools/man/man1/7z.1
#10 231.2 - installing /osxcross/target/SDK/tools/man/man1/7za.1
#10 231.3 - installing /osxcross/target/SDK/tools/man/man1/7zr.1
#10 231.3 - installing /osxcross/target/SDK/tools/share/doc/p7zip/README
#10 231.4 - installing /osxcross/target/SDK/tools/share/doc/p7zip/ChangeLog
#10 231.4 - installing HTML help in /osxcross/target/SDK/tools/share/doc/p7zip/DOC
#10 233.1
#10 233.1 Unpacking /tmp/command_line_tools_for_xcode.dmg ...
#10 233.1 /osxcross/target/SDK/tools/bin/7z x "/tmp/command_line_tools_for_xcode.dmg" "Command Line Developer Tools/Command Line Tools.pkg"
#10 233.7
#10 233.7 7-Zip [64] 9.38 beta Copyright (c) 1999-2014 Igor Pavlov 2015-01-03
#10 233.7 p7zip Version 9.38.1 (locale=C,Utf16=off,HugeFiles=on,4 CPUs)
#10 233.7
#10 233.7 Processing archive: /tmp/command_line_tools_for_xcode.dmg
#10 233.7
#10 233.7 Errors:
#10 233.7 Unexpected end of archive
#10 233.7
#10 233.7 CLTools_Executables.pkg/Payload
#10 233.7 Errors:
#10 233.7 There are data after the end of archive
#10 233.7
#10 233.7 Warning:
#10 233.7 /tmp/command_line_tools_for_xcode.dmg
#10 233.7 Can not open the file as [Dmg] archive
#10 233.7 The file is open as [Xar] archive
#10 233.7
#10 233.7
#10 233.7 No files to process
#10 233.7
#10 233.7
#10 233.7 Archives with Errors: 1
#10 233.7
#10 233.7 Open Errors: 2
#10 233.7
#10 233.7 Removing /osxcross/build/tmp_7722 ...
------
executor failed running [/bin/sh -c ./tools/gen_sdk_package_tools_dmg.sh /tmp/command_line_tools_for_xcode.dmg]: exit code: 2
[✗] could not create the docker darwin image: exit status 1
exit status 1
Go 1.16 was released today with support for the new MacOS platform, darwin/arm64.
Hey there, Every time I go to build for an android device I recieve a clang error linker command failed
[i] Target: android
[i] Cleaning target directories...
[✓] "bin" dir cleaned: /home/gianni/Desktop/GoCode/LearnJapanese/GUIs/fyne-cross/bin/android
[✓] "dist" dir cleaned: /home/gianni/Desktop/GoCode/LearnJapanese/GUIs/fyne-cross/dist/android
[✓] "temp" dir cleaned: /home/gianni/Desktop/GoCode/LearnJapanese/GUIs/fyne-cross/tmp/android
[i] Checking for go.mod: /home/gianni/Desktop/GoCode/LearnJapanese/GUIs/go.mod
[✓] go.mod found
[i] Packaging app...
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/create: dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.
[✗] could not package the Fyne app: could not package the Fyne app: exit status 126
┌─[gianni@pop-os] - [~/Desktop/GoCode/LearnJapanese/GUIs] - [Fri Dec 18, 16:17]
└─[$] <> usermod -aG docker gianni
usermod: Permission denied.
usermod: cannot lock /etc/passwd; try again later.
┌─[gianni@pop-os] - [~/Desktop/GoCode/LearnJapanese/GUIs] - [Fri Dec 18, 16:17]
└─[$] <> sudo usermod -aG docker gianni
┌─[gianni@pop-os] - [~/Desktop/GoCode/LearnJapanese/GUIs] - [Fri Dec 18, 16:17]
└─[$] <> newgrp docker
┌─[gianni@pop-os] - [~/Desktop/GoCode/LearnJapanese/GUIs] - [Fri Dec 18, 16:17]
└─[$] <> fyne-cross android
[i] Target: android
[i] Cleaning target directories...
[✓] "bin" dir cleaned: /home/gianni/Desktop/GoCode/LearnJapanese/GUIs/fyne-cross/bin/android
[✓] "dist" dir cleaned: /home/gianni/Desktop/GoCode/LearnJapanese/GUIs/fyne-cross/dist/android
[✓] "temp" dir cleaned: /home/gianni/Desktop/GoCode/LearnJapanese/GUIs/fyne-cross/tmp/android
[i] Checking for go.mod: /home/gianni/Desktop/GoCode/LearnJapanese/GUIs/go.mod
[✓] go.mod found
[i] Packaging app...
go build -buildmode=c-shared -o /tmp/gomobile-work-932417829/lib/armeabi-v7a/libGUIs.so GUIs failed: exit status 2
# fyne.io/fyne/internal/driver/gomobile
android.c:50:9: warning: returning 'const char *' from a function with result type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
android.c:67:48: warning: incompatible integer to pointer conversion passing 'uintptr_t' (aka 'unsigned int') to parameter of type 'jobject' (aka 'void *') [-Wint-conversion]
android.c:71:55: warning: incompatible integer to pointer conversion passing 'uintptr_t' (aka 'unsigned int') to parameter of type 'jobject' (aka 'void *') [-Wint-conversion]
android.c:122:48: warning: incompatible integer to pointer conversion passing 'uintptr_t' (aka 'unsigned int') to parameter of type 'jobject' (aka 'void *') [-Wint-conversion]
android.c:125:48: warning: incompatible integer to pointer conversion passing 'uintptr_t' (aka 'unsigned int') to parameter of type 'jobject' (aka 'void *') [-Wint-conversion]
android.c:161:50: warning: passing 'char *' to parameter of type 'jbyte *' (aka 'signed char *') converts between pointers to integer types with different sign [-Wpointer-sign]
# fyne.io/fyne/app
app_mobile_and.c:46:48: warning: incompatible integer to pointer conversion passing 'uintptr_t' (aka 'unsigned int') to parameter of type 'jobject' (aka 'void *') [-Wint-conversion]
app_mobile_and.c:49:48: warning: incompatible integer to pointer conversion passing 'uintptr_t' (aka 'unsigned int') to parameter of type 'jobject' (aka 'void *') [-Wint-conversion]
app_mobile_and.c:72:33: warning: incompatible pointer to integer conversion passing 'JNIEnv *' (aka 'const struct JNINativeInterface **') to parameter of type 'uintptr_t' (aka 'unsigned int') [-Wint-conversion]
app_mobile_and.c:42:36: note: passing argument to parameter 'jni_env' here
# GUIs
/usr/local/go/pkg/tool/linux_amd64/link: running /usr/local/android_sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi16-clang failed: exit status 1
/usr/local/android_sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: /tmp/go-link-633107991/000000.o:1:2: invalid character
/usr/local/android_sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: /tmp/go-link-633107991/000000.o:1:2: syntax error, unexpected $end
/usr/local/android_sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: /tmp/go-link-633107991/000000.o: not an object or archive
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[✗] could not package the Fyne app: could not package the Fyne app: exit status 1
Hi!
Setting FYNE_SCALE is not working. The build target is Linux/ARM.
I'm building with:
fyne-cross linux -arch=arm --env FYNE_SCALE=2.0
Any ideas why this is happening?
Thanks!
Hello.
Just tried to getting started with flyne.
I've package the Your First App with flyn-cross.
I've created the package for Windows with (I run it from Ubuntu 18.04)
fyne-cross windows -arch=*
Result - the Application not starting (32 and 64 bit versions) without error messages and without any loggers.
I tried to run the build in Windows 10.
What I miss?
Could be some runtime have to be installed?
Hi,
we're using fyne for our cross-platform Android factory image flasher (https://github.com/AOSPAlliance/device-flasher)
I noticed that fyne-cross builds the application even when there are missing dependencies in vendor (go build fails).
Wanted to ask if this is expected and what should be done.
Thank you
My project builds and runs on Darwin using Go 1.16. But when I use fyne-cross to build a Windows binary, several dependency libraries fail to compile because—it appears—the Go version in the Docker containers are older.
From the output:
api/authenticate.go:77:16: undefined: io.ReadAll
api/diagnostics.go:44:16: undefined: io.ReadAll
note: module requires Go 1.16
# github.com/xuri/excelize/v2
/go/pkg/mod/github.com/xuri/excelize/[email protected]/calc.go:1907:18: undefined: strconv.ParseComplex
/go/pkg/mod/github.com/xuri/excelize/[email protected]/calc.go:1923:18: undefined: strconv.ParseComplex
/go/pkg/mod/github.com/xuri/excelize/[email protected]/calc.go:1939:18: undefined: strconv.ParseComplex
/go/pkg/mod/github.com/xuri/excelize/[email protected]/calc.go:1955:18: undefined: strconv.ParseComplex
/go/pkg/mod/github.com/xuri/excelize/[email protected]/calc.go:1971:18: undefined: strconv.ParseComplex
/go/pkg/mod/github.com/xuri/excelize/[email protected]/calc.go:1987:18: undefined: strconv.ParseComplex
/go/pkg/mod/github.com/xuri/excelize/[email protected]/calc.go:2003:18: undefined: strconv.ParseComplex
/go/pkg/mod/github.com/xuri/excelize/[email protected]/calc.go:2019:18: undefined: strconv.ParseComplex
/go/pkg/mod/github.com/xuri/excelize/[email protected]/calc.go:2039:18: undefined: strconv.ParseComplex
/go/pkg/mod/github.com/xuri/excelize/[email protected]/calc.go:2059:19: undefined: strconv.ParseComplex
/go/pkg/mod/github.com/xuri/excelize/[email protected]/calc.go:2059:19: too many errors
note: module requires Go 1.15
[✗] exit status 2
I can update the version of Go in a running fyne-cross docker container, but how can I tell the fyne-cross
command to use my own container or image?
I've tried running fyne-cross
for Windows, Mac, and Linux, but I keep getting this same error:
[i] Building binary...
docker: Error response from daemon: failed to create endpoint quirky_mirzakhani on network bridge: failed to add the host (veth241569b) <=> sandbox (vethefcfd83) pair interfaces: operation not supported.
[✗] exit status 125
It might be some kind of incompatiblity with systemd-networkd. Was this intented to be run with Network Manager?
Host Information:
uname -a
Linux hostname 5.8.13-arch1-1 #1 SMP PREEMPT Thu, 01 Oct 2020 20:40:35 +0000 x86_64 GNU/Linux
networkctl --version
systemd 246 (246.6-1-arch)
+PAM +AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +ZSTD +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid
GOPROXY
supports more than one proxy, which are separated by the comma. But the option --env
also requires that the arguments must be separated by the comma. They are not compatible with each other.
$ fyne-cross windows -env GOPROXY='https://goproxy.io,direct'
invalid value "GOPROXY=https://goproxy.io,direct" for flag -env: env var must defined as KEY=VALUE or KEY=
After removing ,direct
, it works.
Question: How will I set the environment GOPROXY
to many proxies by the option --env
or others.
PS D:\project\mygosoft\src\IpTools> fyne-cross windows -icon Icon.png -env GOPROXY=https://goproxy.io
[i] Target: windows/amd64
[i] Cleaning target directories...
[✓] "bin" dir cleaned: D:\project\mygosoft\src\IpTools\fyne-cross\bin\windows-amd64
[✓] "dist" dir cleaned: D:\project\mygosoft\src\IpTools\fyne-cross\dist\windows-amd64
[✓] "temp" dir cleaned: D:\project\mygosoft\src\IpTools\fyne-cross\tmp\windows-amd64
[i] Checking for go.mod: D:\project\mygosoft\src\IpTools\go.mod
[✓] go.mod found
[i] Building binary...
go: [email protected] (replaced by ../findDomainWhoisInfo): reading /findDomainWhoisInfo/go.mod: open /findDomainWhoisInfo/go.mod: no such file or directory
I just noticed that if you omit -app-id
it says that appID
is required. This led me to notice a few inconsistencies that should be tidied up to avoid confusion.
building/packaging for Darwin fails due to the directory hierarchy being partly missing.
the darwin
subcommand cleans its build environment rather aggressively by deleting directories recursively and recreating the bases.
during packaging, fyne fails to create its own base directories due to the way fyne-cross mounts the directories
[i] Packaging app...
Fyne error: Failed to create dirrectory
Cause: mkdir /app/fyne-cross/tmp/darwin-amd64/builds/examples/project-01/project-01.app: no such file or directory
At: /go/pkg/mod/fyne.io/[email protected]/cmd/f
yne/internal/util/file.go:36
Fyne error: Failed to create dirrectory
Cause: mkdir /app/fyne-cross/tmp/darwin-amd64/builds/examples/project-01/project-01.app/Contents: no such file or directory
At: /go/pkg/mod/fyne.io/[email protected]/cmd/f
yne/internal/util/file.go:36
Failed to write plist template: invalid argument
[✗] could not package the Fyne app: could not package the Fyne app:
exit status 1
i wasn't really sure where to create this issue, since packaging with fyne
locally works just fine.
this issue could as well be fixed in fyne by creating directories recursively.
When I run the command
fyne-cross darwin -arch amd64,arm64 -app-id $(APPID) -icon $(ICON) -output $(NAME)
I end with two build for AMD64 even it creates two separated dist folders. Also if I only use the ARM64 it still build AMD64. I'm probably missing something but I don't get any error or warning during the build.
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.