Giter Site home page Giter Site logo

fyne-cross's Introduction

Fyne Cross

CI Go Report Card GoDoc version

fyne-cross is a simple tool to cross compile and create distribution packages for Fyne applications using docker images that include Linux, the MinGW compiler for Windows, FreeBSD, and a macOS SDK, along with the Fyne requirements.

Supported targets are:

  • darwin/amd64
  • darwin/arm64
  • freebsd/amd64
  • freebsd/arm64
  • linux/amd64
  • linux/386
  • linux/arm
  • linux/arm64
  • windows/amd64
  • windows/arm64
  • windows/386
  • android (multiple architectures)
  • android/386
  • android/amd64
  • android/arm
  • android/arm64
  • ios

Note:

  • iOS compilation is supported only on darwin hosts. See fyne pre-requisites for details.
  • macOS packaging for public distribution (release mode) is supported only on darwin hosts.
  • windows packaging for public distribution (release mode) is supported only on windows hosts.
  • starting from v1.1.0:
    • cross-compile from NOT darwin (i.e. linux) to darwin: requires a copy of the macOS SDK on the host. The fyne-cross darwin-sdk-extractor command can be used to extract the SDK from the XCode CLI Tool file, see the Extract the macOS SDK section below.
    • cross-compile from darwin to darwin by default will use under the hood the fyne CLI tool and requires Go and the macOS SDK installed on the host.
  • starting from v1.4.0, Arm64 hosts are supported for all platforms except Android.

Requirements

  • go >= 1.14
  • docker

Installation

For go >= 1.16:

go install github.com/fyne-io/fyne-cross@latest

To install a fyne-cross with kubernetes engine support:

go install -tags k8s github.com/fyne-io/fyne-cross@latest

For older go:

GO111MODULE=on go get -u github.com/fyne-io/fyne-cross

fyne-cross will be installed in GOPATH/bin, unless GOBIN is set.

Updating docker images

To update to a newer docker image the --pull flag can be specified. If set, fyne-cross will attempt to pull the image required to cross compile the application for the specified target.

For example:

fyne-cross linux --pull

will pull only the fyne-cross:base-latest image required to cross compile for linux target.

Usage

fyne-cross <command> [options]

The commands are:

	darwin        Build and package a fyne application for the darwin OS
	linux         Build and package a fyne application for the linux OS
	windows       Build and package a fyne application for the windows OS
	android       Build and package a fyne application for the android OS
	ios           Build and package a fyne application for the iOS OS
	freebsd       Build and package a fyne application for the freebsd OS
	version       Print the fyne-cross version information

Use "fyne-cross <command> -help" for more information about a command.

Wildcards

The arch flag support wildcards in case want to compile against all supported GOARCH for a specified GOOS

Example:

fyne-cross windows -arch=*

is equivalent to

fyne-cross windows -arch=amd64,386

Example

The example below cross compile and package the fyne examples application

git clone https://github.com/fyne-io/examples.git
cd examples

Compile and package the main example app

fyne-cross linux

Note: by default fyne-cross will compile the package into the current dir.

The command above is equivalent to: fyne-cross linux .

Compile and package a particular example app

fyne-cross linux -output bugs ./cmd/bugs

Extract the macOS SDK for OSX/Darwin/Apple cross-compiling

cross-compile from NOT darwin (i.e. linux) to darwin requires a copy of the macOS SDK on the host. The fyne-cross darwin-sdk-extractor command can be used to extract the SDK from the XCode CLI Tool file.

Please ensure you have read and understood the Xcode license terms before continuing.

To extract the SDKs:

  1. Download Command Line Tools for Xcode >= 12.4 (macOS SDK 11.x)
  2. Run: fyne-cross darwin-sdk-extract --xcode-path /path/to/Command_Line_Tools_for_Xcode_12.5.dmg
  • Once extraction has been done, you should have a SDKs directory created. This directory contains at least 2 SDKs (ex. SDKs/MacOSX12.3.sdk/ and SDKs/MacOSX13.3.sdk/ in Command_Line_Tools_for_Xcode_14.3.1.dmg)
  1. Specify explicitly which SDK you want to use in your fyne-cross command with --macosx-sdk-path: fyne-cross darwin --macosx-sdk-path /full/path/to/SDKs/MacOSX12.3.sdk -app-id your.app.id

Contribute

  • Fork and clone the repository
  • Make and test your changes
  • Open a pull request against the develop branch

Contributors

See contributors page

Credits

  • osxcross for the macOS Cross toolchain for Linux
  • golang-cross for the inspiration and the docker images used in the initial versions
  • xgo for the inspiration

fyne-cross's People

Contributors

alexadhy avatar alexrudd avatar andydotxyz avatar bluebugs avatar brokedown avatar dependabot[bot] avatar diptag avatar fiam avatar girbons avatar itsjustdel avatar jacalz avatar jeandeaual avatar lucor avatar metal3d avatar mhkarimi1383 avatar mrctms avatar oq-x avatar russellsteadman avatar zwindler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fyne-cross's Issues

Android apk - "There was a problem parsing the package."

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?

Update Debian base to bullseye

Is your feature request related to a problem? Please describe:

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.

Is it possible to construct a solution with the existing API?

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.

Describe the solution you'd like to see:

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.

Add a serve command to fyne-cross

Is your feature request related to a problem? Please describe:

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

Is it possible to construct a solution with the existing API?

It might require adding a new command.

Describe the solution you'd like to see:

Once #92 is solved this command should most likely just be about running fyne serve.

Building for windows fails to add icon

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)

note: for the full build script I used you can check the bash script in the scripts dir on both versions

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

Add support for web target

Is your feature request related to a problem? Please describe:

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.

Is it possible to construct a solution with the existing API?

Hopefully yes.

Describe the solution you'd like to see:

Add gopherjs in the docker image and add a new target.

Docker image creation for darwin fails on M1

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

-tags cause packaging failure

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

Bug in -tag flag

Describe the bug:

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?

Fails to build for linux mobile

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
          ^~~~~~~~~~~~~

Doesn't work with podman (docker-podman) because of write persmission

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 :)

/lib64/libm.so.6: version `GLIBC_2.27' not found

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

Add support for FyneApp.toml

Is your feature request related to a problem? Please describe:

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.

Is it possible to construct a solution with the existing API?

Yes.

Describe the solution you'd like to see:

Update fyne-cross to support the FyneApp.toml file out of the box.

Add Kubernetes cluster support

Is your feature request related to a problem? Please describe:

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.

Is it possible to construct a solution with the existing API?

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.

Describe the solution you'd like to see:

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.

Add support for Linux Wayland

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

Support specifying target architectures for Android

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.

The program built with fyne-cross does not start in Windows

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?

Add support for Windows on arm64

Is your feature request related to a problem? Please describe:

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).

Is it possible to construct a solution with the existing API?

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.

Describe the solution you'd like to see:

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.

Failure to honor `// +build` and `xxxx_windows.go` for optional code building

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

unsupported target operating system "linux/amd64"

Describe the bug:

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.

Device and debug info (please complete the following information):

Device info
  • OS: Kubuntu
  • Version: 20.04
  • Go version: 1.16.8
  • fyne-cross version: 1.1.1
  • Fyne version: 2.1

fyne-cross fails when trying to create TAR file.

Describe the bug:

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 

Device and debug info (please complete the following information):

Device info
  • OS: MacOS
  • Version: 11.6
  • Go version: go version go1.17.1 darwin/amd64
  • fyne-cross version: v1.1.3
  • Fyne version: fyne cli version: v2.1.2
Debug info

$ 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

Fyne error: Failed to create dirrectory

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.

Unable to set FYNE_SCALE during build

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!

Problem creating darwin image on M1 macos

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

#12 2660.8 create_symlink x86_64-apple-darwin20.4-wrapper arm64e-apple-darwin20.4-xcodebuild
#12 2660.8
#12 2661.1
#12 2661.1 testing x86_64-apple-darwin20.4-clang++ -stdlib=libc++ -std=c++11 ... failed (ignored)
#12 2665.1
#12 2665.1 testing x86_64h-apple-darwin20.4-clang ... works
#12 2665.9 testing x86_64h-apple-darwin20.4-clang++ ... Undefined symbols for architecture x86_64h:
#12 2670.3 "std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from:
#12 2670.3 _main in test-8ae03b.o
#12 2670.3 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-8ae03b.o
#12 2670.3 "std::__1::ios_base::getloc() const", referenced from:
#12 2670.3 _main in test-8ae03b.o
#12 2670.3 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-8ae03b.o
#12 2670.3 "std::__1::basic_ostream<char, std::__1::char_traits >::put(char)", referenced from:
#12 2670.3 _main in test-8ae03b.o
#12 2670.3 "std::__1::basic_ostream<char, std::__1::char_traits >::flush()", referenced from:
#12 2670.3 _main in test-8ae03b.o
#12 2670.3 "std::__1::basic_ostream<char, std::__1::char_traits >::sentry::sentry(std::__1::basic_ostream<char, std::__1::char_traits >&)", referenced from:
#12 2670.3 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-8ae03b.o
#12 2670.3 "std::__1::basic_ostream<char, std::__1::char_traits >::sentry::~sentry()", referenced from:
#12 2670.3 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-8ae03b.o
#12 2670.3 "std::__1::cout", referenced from:
#12 2670.3 _main in test-8ae03b.o
#12 2670.3 "std::__1::ctype::id", referenced from:
#12 2670.3 _main in test-8ae03b.o
#12 2670.3 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-8ae03b.o
#12 2670.3 "std::__1::locale::~locale()", referenced from:
#12 2670.3 _main in test-8ae03b.o
#12 2670.3 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-8ae03b.o
#12 2670.3 "std::__1::ios_base::__set_badbit_and_consider_rethrow()", referenced from:
#12 2670.3 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-8ae03b.o
#12 2670.3 "std::__1::ios_base::clear(unsigned int)", referenced from:
#12 2670.3 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-8ae03b.o
#12 2670.3 "std::terminate()", referenced from:
#12 2670.3 ___clang_call_terminate in test-8ae03b.o
#12 2670.3 "operator delete(void*)", referenced from:
#12 2670.3 std::__1::ostreambuf_iterator<char, std::__1::char_traits > std::__1::__pad_and_output<char, std::__1::char_traits >(std::__1::ostreambuf_iterator<char, std::__1::char_traits >, char const*, char const*, char const*, std::__1::ios_base&, char) in test-8ae03b.o
#12 2670.3 "operator new(unsigned long)", referenced from:
#12 2670.3 std::__1::ostreambuf_iterator<char, std::__1::char_traits > std::__1::__pad_and_output<char, std::__1::char_traits >(std::__1::ostreambuf_iterator<char, std::__1::char_traits >, char const*, char const*, char const*, std::__1::ios_base&, char) in test-8ae03b.o
#12 2670.3 "___cxa_begin_catch", referenced from:
#12 2670.3 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-8ae03b.o
#12 2670.3 ___clang_call_terminate in test-8ae03b.o
#12 2670.3 "___cxa_end_catch", referenced from:
#12 2670.3 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-8ae03b.o
#12 2670.3 "___gxx_personality_v0", referenced from:
#12 2670.3 _main in test-8ae03b.o
#12 2670.3 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-8ae03b.o
#12 2670.3 std::__1::ostreambuf_iterator<char, std::__1::char_traits > std::__1::__pad_and_output<char, std::__1::char_traits >(std::__1::ostreambuf_iterator<char, std::__1::char_traits >, char const*, char const*, char const*, std::__1::ios_base&, char) in test-8ae03b.o
#12 2670.3 Dwarf Exception Unwind Info (__eh_frame) in test-8ae03b.o
#12 2670.3 ld: symbol(s) not found for architecture x86_64h
#12 2670.3 clang: error: linker command failed with exit code 1 (use -v to see invocation)
#12 2670.3 failed (ignored)
#12 2670.3
#12 2670.3 testing arm64-apple-darwin20.4-clang ... works
#12 2671.1 testing arm64-apple-darwin20.4-clang++ ... Undefined symbols for architecture arm64:
#12 2674.7 "std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from:
#12 2674.7 _main in test-b43544.o
#12 2674.8 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-b43544.o
#12 2674.8 "std::__1::ios_base::getloc() const", referenced from:
#12 2674.8 _main in test-b43544.o
#12 2674.8 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-b43544.o
#12 2674.8 "std::__1::basic_ostream<char, std::__1::char_traits >::put(char)", referenced from:
#12 2674.8 _main in test-b43544.o
#12 2674.8 "std::__1::basic_ostream<char, std::__1::char_traits >::flush()", referenced from:
#12 2674.8 _main in test-b43544.o
#12 2674.8 "std::__1::basic_ostream<char, std::__1::char_traits >::sentry::sentry(std::__1::basic_ostream<char, std::__1::char_traits >&)", referenced from:
#12 2674.8 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-b43544.o
#12 2674.8 "std::__1::basic_ostream<char, std::__1::char_traits >::sentry::~sentry()", referenced from:
#12 2674.8 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-b43544.o
#12 2674.8 "std::__1::cout", referenced from:
#12 2674.8 _main in test-b43544.o
#12 2674.8 "std::__1::ctype::id", referenced from:
#12 2674.8 _main in test-b43544.o
#12 2674.8 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-b43544.o
#12 2674.8 "std::__1::locale::~locale()", referenced from:
#12 2674.8 _main in test-b43544.o
#12 2674.8 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-b43544.o
#12 2674.8 "std::__1::ios_base::__set_badbit_and_consider_rethrow()", referenced from:
#12 2674.8 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-b43544.o
#12 2674.8 "std::__1::ios_base::clear(unsigned int)", referenced from:
#12 2674.8 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-b43544.o
#12 2674.8 "std::terminate()", referenced from:
#12 2674.8 ___clang_call_terminate in test-b43544.o
#12 2674.8 "operator delete(void*)", referenced from:
#12 2674.8 std::__1::ostreambuf_iterator<char, std::__1::char_traits > std::__1::__pad_and_output<char, std::__1::char_traits >(std::__1::ostreambuf_iterator<char, std::__1::char_traits >, char const*, char const*, char const*, std::__1::ios_base&, char) in test-b43544.o
#12 2674.8 "operator new(unsigned long)", referenced from:
#12 2674.8 std::__1::ostreambuf_iterator<char, std::__1::char_traits > std::__1::__pad_and_output<char, std::__1::char_traits >(std::__1::ostreambuf_iterator<char, std::__1::char_traits >, char const*, char const*, char const*, std::__1::ios_base&, char) in test-b43544.o
#12 2674.8 "___cxa_begin_catch", referenced from:
#12 2674.8 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-b43544.o
#12 2674.8 ___clang_call_terminate in test-b43544.o
#12 2674.8 "___cxa_end_catch", referenced from:
#12 2674.8 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-b43544.o
#12 2674.8 "___gxx_personality_v0", referenced from:
#12 2674.8 _main in test-b43544.o
#12 2674.8 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-b43544.o
#12 2674.8 std::__1::ostreambuf_iterator<char, std::__1::char_traits > std::__1::__pad_and_output<char, std::__1::char_traits >(std::__1::ostreambuf_iterator<char, std::__1::char_traits >, char const*, char const*, char const*, std::__1::ios_base&, char) in test-b43544.o
#12 2674.8 ld: symbol(s) not found for architecture arm64
#12 2674.8 clang: error: linker command failed with exit code 1 (use -v to see invocation)
#12 2674.8 failed (ignored)
#12 2674.8
#12 2674.8 testing arm64e-apple-darwin20.4-clang ... ld: warning: object file /tmp/test-01b6fe.o was built with an incompatible arm64e ABI compiler
#12 2675.6 works
#12 2675.6 testing arm64e-apple-darwin20.4-clang++ ... ld: warning: object file /tmp/test-af06eb.o was built with an incompatible arm64e ABI compiler
#12 2679.7 Undefined symbols for architecture arm64e:
#12 2679.7 "std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from:
#12 2679.7 _main in test-af06eb.o
#12 2679.7 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-af06eb.o
#12 2679.7 "std::__1::ios_base::getloc() const", referenced from:
#12 2679.7 _main in test-af06eb.o
#12 2679.7 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-af06eb.o
#12 2679.7 "std::__1::basic_ostream<char, std::__1::char_traits >::put(char)", referenced from:
#12 2679.7 _main in test-af06eb.o
#12 2679.7 "std::__1::basic_ostream<char, std::__1::char_traits >::flush()", referenced from:
#12 2679.7 _main in test-af06eb.o
#12 2679.7 "std::__1::basic_ostream<char, std::__1::char_traits >::sentry::sentry(std::__1::basic_ostream<char, std::__1::char_traits >&)", referenced from:
#12 2679.7 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-af06eb.o
#12 2679.7 "std::__1::basic_ostream<char, std::__1::char_traits >::sentry::~sentry()", referenced from:
#12 2679.7 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-af06eb.o
#12 2679.7 "std::__1::cout", referenced from:
#12 2679.7 _main in test-af06eb.o
#12 2679.7 "std::__1::ctype::id", referenced from:
#12 2679.7 _main in test-af06eb.o
#12 2679.7 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-af06eb.o
#12 2679.7 "std::__1::locale::~locale()", referenced from:
#12 2679.7 _main in test-af06eb.o
#12 2679.7 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-af06eb.o
#12 2679.7 "std::__1::ios_base::__set_badbit_and_consider_rethrow()", referenced from:
#12 2679.7 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-af06eb.o
#12 2679.7 "std::__1::ios_base::clear(unsigned int)", referenced from:
#12 2679.7 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-af06eb.o
#12 2679.7 "std::terminate()", referenced from:
#12 2679.7 ___clang_call_terminate in test-af06eb.o
#12 2679.7 "operator delete(void*)", referenced from:
#12 2679.7 std::__1::ostreambuf_iterator<char, std::__1::char_traits > std::__1::__pad_and_output<char, std::__1::char_traits >(std::__1::ostreambuf_iterator<char, std::__1::char_traits >, char const*, char const*, char const*, std::__1::ios_base&, char) in test-af06eb.o
#12 2679.7 "operator new(unsigned long)", referenced from:
#12 2679.7 std::__1::ostreambuf_iterator<char, std::__1::char_traits > std::__1::__pad_and_output<char, std::__1::char_traits >(std::__1::ostreambuf_iterator<char, std::__1::char_traits >, char const*, char const*, char const*, std::__1::ios_base&, char) in test-af06eb.o
#12 2679.7 "___cxa_begin_catch", referenced from:
#12 2679.7 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-af06eb.o
#12 2679.7 ___clang_call_terminate in test-af06eb.o
#12 2679.7 "___cxa_end_catch", referenced from:
#12 2679.7 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-af06eb.o
#12 2679.7 "___gxx_personality_v0", referenced from:
#12 2679.7 _main in test-af06eb.o
#12 2679.7 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-af06eb.o
#12 2679.7 std::__1::ostreambuf_iterator<char, std::__1::char_traits > std::__1::__pad_and_output<char, std::__1::char_traits >(std::__1::ostreambuf_iterator<char, std::__1::char_traits >, char const*, char const*, char const*, std::__1::ios_base&, char) in test-af06eb.o
#12 2679.7 ld: symbol(s) not found for architecture arm64e
#12 2679.7 clang: error: linker command failed with exit code 1 (use -v to see invocation)
#12 2679.7 failed (ignored)
#12 2679.7
#12 2679.7 testing x86_64-apple-darwin20.4-clang ... works
#12 2680.5 testing x86_64-apple-darwin20.4-clang++ ... Undefined symbols for architecture x86_64:
#12 2684.3 "std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from:
#12 2684.3 _main in test-9eee1a.o
#12 2684.3 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-9eee1a.o
#12 2684.3 "std::__1::ios_base::getloc() const", referenced from:
#12 2684.3 _main in test-9eee1a.o
#12 2684.3 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-9eee1a.o
#12 2684.3 "std::__1::basic_ostream<char, std::__1::char_traits >::put(char)", referenced from:
#12 2684.3 _main in test-9eee1a.o
#12 2684.3 "std::__1::basic_ostream<char, std::__1::char_traits >::flush()", referenced from:
#12 2684.3 _main in test-9eee1a.o
#12 2684.3 "std::__1::basic_ostream<char, std::__1::char_traits >::sentry::sentry(std::__1::basic_ostream<char, std::__1::char_traits >&)", referenced from:
#12 2684.3 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-9eee1a.o
#12 2684.3 "std::__1::basic_ostream<char, std::__1::char_traits >::sentry::~sentry()", referenced from:
#12 2684.3 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-9eee1a.o
#12 2684.3 "std::__1::cout", referenced from:
#12 2684.3 _main in test-9eee1a.o
#12 2684.3 "std::__1::ctype::id", referenced from:
#12 2684.3 _main in test-9eee1a.o
#12 2684.3 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-9eee1a.o
#12 2684.3 "std::__1::locale::~locale()", referenced from:
#12 2684.3 _main in test-9eee1a.o
#12 2684.3 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-9eee1a.o
#12 2684.3 "std::__1::ios_base::__set_badbit_and_consider_rethrow()", referenced from:
#12 2684.3 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-9eee1a.o
#12 2684.3 "std::__1::ios_base::clear(unsigned int)", referenced from:
#12 2684.3 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-9eee1a.o
#12 2684.3 "std::terminate()", referenced from:
#12 2684.3 ___clang_call_terminate in test-9eee1a.o
#12 2684.3 "operator delete(void*)", referenced from:
#12 2684.3 std::__1::ostreambuf_iterator<char, std::__1::char_traits > std::__1::__pad_and_output<char, std::__1::char_traits >(std::__1::ostreambuf_iterator<char, std::__1::char_traits >, char const*, char const*, char const*, std::__1::ios_base&, char) in test-9eee1a.o
#12 2684.3 "operator new(unsigned long)", referenced from:
#12 2684.3 std::__1::ostreambuf_iterator<char, std::__1::char_traits > std::__1::__pad_and_output<char, std::__1::char_traits >(std::__1::ostreambuf_iterator<char, std::__1::char_traits >, char const*, char const*, char const*, std::__1::ios_base&, char) in test-9eee1a.o
#12 2684.3 "___cxa_begin_catch", referenced from:
#12 2684.3 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-9eee1a.o
#12 2684.3 ___clang_call_terminate in test-9eee1a.o
#12 2684.3 "___cxa_end_catch", referenced from:
#12 2684.3 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-9eee1a.o
#12 2684.3 "___gxx_personality_v0", referenced from:
#12 2684.3 _main in test-9eee1a.o
#12 2684.3 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::__put_character_sequence<char, std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*, unsigned long) in test-9eee1a.o
#12 2684.3 std::__1::ostreambuf_iterator<char, std::__1::char_traits > std::__1::__pad_and_output<char, std::__1::char_traits >(std::__1::ostreambuf_iterator<char, std::__1::char_traits >, char const*, char const*, char const*, std::__1::ios_base&, char) in test-9eee1a.o
#12 2684.3 Dwarf Exception Unwind Info (__eh_frame) in test-9eee1a.o
#12 2684.3 ld: symbol(s) not found for architecture x86_64
#12 2684.3 clang: error: linker command failed with exit code 1 (use -v to see invocation)
#12 2684.3
#12 2684.3 exiting with abnormal exit code (1)
#12 2684.3 run 'OCDEBUG=1 ./build.sh' to enable debug messages
#12 2684.3

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

Add support for "fyne release"

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.

Failing to cross-compile from linux to windows

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

the option --env prevent the environment GOPROXY from being set to more than one proxy

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.

Can't build for Windows from Darwin with Go 1.16

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?

Compile to andriod error

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

Reference to local file, compilation error

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

Error cross-compiling to windows 386

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

error building darwin-image

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

Docker Network Bridge Binding Error using systemd-networkd

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

Installing compilation dependency / custom docker image

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?


Update

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.

Windows builds no longer pass "-H windowsgui"

Describe the bug:

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.

To Reproduce:

Steps to reproduce the behaviour:

  1. Build a binary for windows without the -console flag.
  2. Run the binary on Windows and notice that console is shown.

Example code:

Any code will do.

Device and debug info (please complete the following information):

Device info
  • OS: Fedora Workstation
  • Version: 35 with kernel 5.16.17
  • Go version: 1.16.15
  • fyne-cross version: 1.2.0
  • Fyne version: 2.1.3 (not relevant)
Debug info
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
```

Problems building for linux arm on debian (music, alsa, touch)

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.

Problem 1: Cross-compiling when using alsa

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?

Describe the bug:

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

Example code: (just using the faiface/beep library)

   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)

  }

Device and debug info

Device info
  • OS: Linux
  • Version: Debian GNU/Linux 11 (bullseye)
  • Go version: 1.18
  • fyne-cross version: 1.2.0
  • Fyne version: 2.1.3
Debug info
[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

Problem 2: Touch on touch-panel is not working within the application

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?

Describe the bug:

I get the following error output, when running the program on my target device:

image

Problem 3: Little bug in -tags usage

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?

Docker image for running fyne-cross

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:

  1. Use docker image as base, add golang, OR
  2. Use golang image as base, add docker

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.

Failing to build cross platform app in the CI/CD Pipeline

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

Failing to build for android

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

MAC compile to andriod err

My Mac Info
image

func main() { a := app.New() w := a.NewWindow("Hello") hello := widget.NewLabel("Hello Fyne!") w.SetContent(container.NewVBox( hello, widget.NewButton("Hi!", func() { hello.SetText("Welcome :)") }), )) w.ShowAndRun() }

fyne-cross android -app-id=a.b.c

image

Unable to pull darwin image

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?

Build Darwin ARM64 release

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.