Comments (10)
Oh! It seems to work for Linux too if I run it with this instead
fyne-cross linux -arch=* --app-id com.chrisg.serpcount
from fyne-cross.
The error on Linux seems to be related to your fyne.toml or maybe a left over Metadata file infected by fyne. You might have the same error if you just use fyne directly.
from fyne-cross.
Can you test the Fyne-cross compiled from the master
branch as there have been a few M1/2 fixes since last release.
from fyne-cross.
This is an issue with ssh-agent and some magic done by docker on Mac. You might want to try the develop branch actually.
from fyne-cross.
Doesn't seem to have helped but I learned that go get can't grab a specific branch so not a waste ;)
I git cloned the branch then did go install, hope that was correct:
chrisg@macmini serpcount-go % fyne-cross version
fyne-cross version (devel)
Fyne Cross output
chrisg@macmini serpcount-go % sudo fyne-cross linux --no-cache --debug
[i] Target: linux/arm64
&command.localContainerImage{baseContainerImage:command.baseContainerImage{arch:"arm64", os:"linux", id:"linux-arm64", env:map[string]string{"CC":"zig cc -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu", "CXX":"zig c++ -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu", "GOARCH":"arm64", "GOOS":"linux"}, tags:[]string(nil), mount:[]command.containerMountPoint{command.containerMountPoint{name:"project", localHost:"/Users/chrisg/serpcount-go", inContainer:"/app"}}, DockerImage:"docker.io/fyneio/fyne-cross-images:linux"}, runner:(*command.localContainerEngine)(0x140000d6090)}
[i] Cleaning target directories...
/usr/local/bin/docker run --rm -t -w /app -v /Users/chrisg/serpcount-go:/app --platform linux/arm64 --user 0 -e HOME=/tmp -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e GOARCH=arm64 -e CC=zig cc -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu -e CXX=zig c++ -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu -e GOOS=linux docker.io/fyneio/fyne-cross-images:linux rm -rf /app/fyne-cross/bin/linux-arm64
/usr/local/bin/docker run --rm -t -w /app -v /Users/chrisg/serpcount-go:/app --platform linux/arm64 --user 0 -e HOME=/tmp -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e CXX=zig c++ -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu -e GOOS=linux -e GOARCH=arm64 -e CC=zig cc -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu docker.io/fyneio/fyne-cross-images:linux mkdir -p /app/fyne-cross/bin/linux-arm64
mkdir: cannot create directory '/app/fyne-cross/bin/linux-arm64': Permission denied
[✗] could not create the "bin" dir /app/fyne-cross/bin/linux-arm64: exit status 1
from fyne-cross.
The path actually changed. Now the problem is I think you are running the command with sudo. Not sure we support that. Would you mind making sure that everything on your subdirectory is owned by your user, give permission to your user to use docker and finally run it without sudo.
from fyne-cross.
Now the problem is I think you are running the command with sudo
Oh yes, I was doing that because of when it said it can't create directories :)
That did the trick for Darwin and Windows, thank you!
For Linux it throws this error but seems to still produce a file?
[i] Packaging app...
2023/12/07 19:29:03 Fyne error: Failed to inject metadata init file, omitting metadata
2023/12/07 19:29:03 Cause: invalid character 'g' looking for beginning of value
2023/12/07 19:29:03 At: /go/pkg/mod/fyne.io/fyne/[email protected]/cmd/fyne/internal/commands/build.go:215
[✓] Package: "/Users/chrisg/serpcount-go/fyne-cross/dist/linux-arm64/serpcount-go.tar.xz"
In full
chrisg@macmini serpcount-go % fyne-cross linux --no-cache --debug
[i] Target: linux/arm64
&command.localContainerImage{baseContainerImage:command.baseContainerImage{arch:"arm64", os:"linux", id:"linux-arm64", env:map[string]string{"CC":"zig cc -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu", "CXX":"zig c++ -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu", "GOARCH":"arm64", "GOOS":"linux"}, tags:[]string(nil), mount:[]command.containerMountPoint{command.containerMountPoint{name:"project", localHost:"/Users/chrisg/serpcount-go", inContainer:"/app"}}, DockerImage:"docker.io/fyneio/fyne-cross-images:linux"}, runner:(*command.localContainerEngine)(0x14000076000)}
[i] Cleaning target directories...
/usr/local/bin/docker run --rm -t -w /app -v /Users/chrisg/serpcount-go:/app --platform linux/arm64 --user 501 -e HOME=/tmp -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e GOARCH=arm64 -e CC=zig cc -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu -e CXX=zig c++ -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu -e GOOS=linux docker.io/fyneio/fyne-cross-images:linux rm -rf /app/fyne-cross/tmp/linux-arm64
/usr/local/bin/docker run --rm -t -w /app -v /Users/chrisg/serpcount-go:/app --platform linux/arm64 --user 501 -e HOME=/tmp -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e CC=zig cc -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu -e CXX=zig c++ -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu -e GOOS=linux -e GOARCH=arm64 docker.io/fyneio/fyne-cross-images:linux mkdir -p /app/fyne-cross/tmp/linux-arm64
[✓] "temp" dir cleaned: /app/fyne-cross/tmp/linux-arm64
/usr/local/bin/docker run --rm -t -w /app -v /Users/chrisg/serpcount-go:/app --platform linux/arm64 --user 501 -e HOME=/tmp -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e GOARCH=arm64 -e CC=zig cc -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu -e CXX=zig c++ -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu -e GOOS=linux docker.io/fyneio/fyne-cross-images:linux rm -rf /app/fyne-cross/bin/linux-arm64
/usr/local/bin/docker run --rm -t -w /app -v /Users/chrisg/serpcount-go:/app --platform linux/arm64 --user 501 -e HOME=/tmp -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e CXX=zig c++ -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu -e GOOS=linux -e GOARCH=arm64 -e CC=zig cc -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu docker.io/fyneio/fyne-cross-images:linux mkdir -p /app/fyne-cross/bin/linux-arm64
[✓] "bin" dir cleaned: /app/fyne-cross/bin/linux-arm64
/usr/local/bin/docker run --rm -t -w /app -v /Users/chrisg/serpcount-go:/app --platform linux/arm64 --user 501 -e HOME=/tmp -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e CXX=zig c++ -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu -e GOOS=linux -e GOARCH=arm64 -e CC=zig cc -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu docker.io/fyneio/fyne-cross-images:linux rm -rf /app/fyne-cross/dist/linux-arm64
/usr/local/bin/docker run --rm -t -w /app -v /Users/chrisg/serpcount-go:/app --platform linux/arm64 --user 501 -e HOME=/tmp -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e GOARCH=arm64 -e CC=zig cc -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu -e CXX=zig c++ -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu -e GOOS=linux docker.io/fyneio/fyne-cross-images:linux mkdir -p /app/fyne-cross/dist/linux-arm64
[✓] "dist" dir cleaned: /app/fyne-cross/dist/linux-arm64
[i] Checking for go.mod: /Users/chrisg/serpcount-go/go.mod
[✓] go.mod found
/usr/local/bin/docker run --rm -t -w /app -v /Users/chrisg/serpcount-go:/app --platform linux/arm64 --user 501 -e HOME=/tmp -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e GOARCH=arm64 -e CC=zig cc -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu -e CXX=zig c++ -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu -e GOOS=linux docker.io/fyneio/fyne-cross-images:linux cp /app/Icon.png /app/fyne-cross/tmp/linux-arm64/Icon.png
[i] Packaging app...
/usr/local/bin/docker run --rm -t -w /app -v /Users/chrisg/serpcount-go:/app --platform linux/arm64 --user 501 -e HOME=/tmp -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e GOARCH=arm64 -e CC=zig cc -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu -e CXX=zig c++ -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu -e GOOS=linux docker.io/fyneio/fyne-cross-images:linux /usr/local/bin/fyne version
fyne cli version: v2.3.5
/usr/local/bin/docker run --rm -t -w /app -v /Users/chrisg/serpcount-go:/app --platform linux/arm64 --user 501 -e HOME=/tmp -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e CXX=zig c++ -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu -e GOOS=linux -e GOARCH=arm64 -e CC=zig cc -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu docker.io/fyneio/fyne-cross-images:linux /usr/local/bin/fyne package -os linux -name serpcount-go -icon /app/fyne-cross/tmp/linux-arm64/Icon.png -appBuild 1 -appVersion 1.0.0 -release
2023/12/07 19:31:50 Fyne error: Failed to inject metadata init file, omitting metadata
2023/12/07 19:31:50 Cause: invalid character 'g' looking for beginning of value
2023/12/07 19:31:50 At: /go/pkg/mod/fyne.io/fyne/[email protected]/cmd/fyne/internal/commands/build.go:215
/usr/local/bin/docker run --rm -t -w /app -v /Users/chrisg/serpcount-go:/app --platform linux/arm64 --user 501 -e HOME=/tmp -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e CXX=zig c++ -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu -e GOOS=linux -e GOARCH=arm64 -e CC=zig cc -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu docker.io/fyneio/fyne-cross-images:linux mv /app/serpcount-go.tar.xz /app/fyne-cross/tmp/linux-arm64/serpcount-go.tar.xz
/usr/local/bin/docker run --rm -t -w /app/fyne-cross/bin/linux-arm64 -v /Users/chrisg/serpcount-go:/app --platform linux/arm64 --user 501 -e HOME=/tmp -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e GOARCH=arm64 -e CC=zig cc -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu -e CXX=zig c++ -target aarch64-linux-gnu -isystem /usr/include -L/usr/lib/aarch64-linux-gnu -e GOOS=linux docker.io/fyneio/fyne-cross-images:linux tar -xf /app/fyne-cross/tmp/linux-arm64/serpcount-go.tar.xz --strip-components=3 usr/local/bin
[✓] Package: "/Users/chrisg/serpcount-go/fyne-cross/dist/linux-arm64/serpcount-go.tar.xz"
from fyne-cross.
Using the develop branch got me past the issue 👍
from fyne-cross.
Doesn't seem to have helped but I learned that go get can't grab a specific branch so not a waste ;)
You can get a branch using go get url-to-dep@branchname
from fyne-cross.
Same, rm -rf /tmp/com.apple.launchd.l1jeoQwEBB/Listeners
solved.
from fyne-cross.
Related Issues (20)
- cannot load embed: malformed module path "embed": missing dot in first path element HOT 2
- fyne-cross-1.3-linux-arm64 and fyne-cross-1.3-linux-arm images HOT 2
- Support full semver versions with -app-version flag HOT 2
- Compilation problems may be related to the warehouse address and permissions. HOT 2
- darwin-amd64 Command Line Tools for Xcode 15 fails to compile on linux-amd64 HOT 5
- permission denied when setting Icon compiling from Linux to Windows HOT 11
- could not clean the "bin" dir HOT 2
- Cross compile tests
- Can't build Android app on ARM macOS: image platform (linux/amd64) does not match the expected platform (linux/arm64) HOT 4
- Compile fyne application for Windows operating system, gcc_linux-amd64. c: 63:2: error: unknown type name 'sigset_t' HOT 1
- Can not build on mac (arm) using vanilla docker desktop HOT 10
- "flag provided but not defined: -profile" when trying to build a MacOS release application HOT 8
- linux cross-compile problem HOT 4
- Use goreleaser to build fyne-cross
- Build for MacOS (arm64,amd64) not working HOT 4
- Linux Building Darwin Error HOT 5
- Customize `-ldflags` HOT 2
- Add necessary secret to GitHub Actions to run iOS build HOT 5
- Add a secret password to enable testing for darwin on windows and linux HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fyne-cross.