Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error "Listeners: operation not supported" on MacOS M1 #214

Closed
omiq opened this issue Dec 7, 2023 · 10 comments
Closed

Error "Listeners: operation not supported" on MacOS M1 #214

omiq opened this issue Dec 7, 2023 · 10 comments

Comments

@omiq
Copy link

omiq commented Dec 7, 2023

Describe the bug:

[i] Target: linux/arm64
[i] Cleaning target directories...
docker: Error response from daemon: error while creating mount source path '/host_mnt/private/tmp/com.apple.launchd.l1jeoQwEBB/Listeners': mkdir /host_mnt/private/tmp/com.apple.launchd.l1jeoQwEBB/Listeners: operation not supported.
[✗] could not clean the "dist" dir /app/fyne-cross/dist/linux-arm64: exit status 125```


### To Reproduce:
Steps to reproduce the behaviour:
1. run ```sudo fyne-cross linux ```


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

<summary>Device info</summary>

 - **OS:** MacOS M1 
 - **Version:** 14.1.2 (23B92)
 - **Go version:** <!-- [e.g. 1.12.3] -->
 - **fyne-cross version:** v1.4.0
 - **Fyne version:** v2.4.2

<details><summary>Debug info</summary><br><pre>
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)(0x14000180000)}
[i] Cleaning target directories...
/usr/local/bin/docker run --rm -t -w /app -v /Users/chrisg/serpcount-go:/app --platform linux/arm64 -u 0:0 --entrypoint fixuid -v /private/tmp/com.apple.launchd.l1jeoQwEBB/Listeners:/tmp/ssh-agent -e SSH_AUTH_SOCK=/tmp/ssh-agent -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
docker: Error response from daemon: error while creating mount source path '/host_mnt/private/tmp/com.apple.launchd.l1jeoQwEBB/Listeners': mkdir /host_mnt/private/tmp/com.apple.launchd.l1jeoQwEBB/Listeners: operation not supported.
[✗] could not clean the "bin" dir /app/fyne-cross/bin/linux-arm64: exit status 125
</pre></details>
@andydotxyz
Copy link
Member

Can you test the Fyne-cross compiled from the master branch as there have been a few M1/2 fixes since last release.

@Bluebugs
Copy link
Contributor

Bluebugs commented Dec 7, 2023

This is an issue with ssh-agent and some magic done by docker on Mac. You might want to try the develop branch actually.

@omiq
Copy link
Author

omiq commented Dec 7, 2023

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

@Bluebugs
Copy link
Contributor

Bluebugs commented Dec 7, 2023

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.

@omiq
Copy link
Author

omiq commented Dec 7, 2023

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/v2@v2.3.5/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/v2@v2.3.5/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"

@omiq
Copy link
Author

omiq commented Dec 7, 2023

Oh! It seems to work for Linux too if I run it with this instead

fyne-cross linux -arch=* --app-id com.chrisg.serpcount

@Bluebugs
Copy link
Contributor

Bluebugs commented Dec 7, 2023

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.

@omiq omiq closed this as completed Dec 8, 2023
@omiq
Copy link
Author

omiq commented Dec 8, 2023

Using the develop branch got me past the issue 👍

@andydotxyz
Copy link
Member

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

@zyfdegh
Copy link

zyfdegh commented Mar 20, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants