Giter Site home page Giter Site logo

Comments (10)

omiq avatar omiq commented on June 9, 2024 1

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.

Bluebugs avatar Bluebugs commented on June 9, 2024 1

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.

andydotxyz avatar andydotxyz commented on June 9, 2024

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.

Bluebugs avatar Bluebugs commented on June 9, 2024

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.

omiq avatar omiq commented on June 9, 2024

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.

Bluebugs avatar Bluebugs commented on June 9, 2024

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.

omiq avatar omiq commented on June 9, 2024

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.

omiq avatar omiq commented on June 9, 2024

Using the develop branch got me past the issue 👍

from fyne-cross.

andydotxyz avatar andydotxyz commented on June 9, 2024

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.

zyfdegh avatar zyfdegh commented on June 9, 2024

Same, rm -rf /tmp/com.apple.launchd.l1jeoQwEBB/Listeners solved.

from fyne-cross.

Related Issues (20)

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.