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

Fyne-cross fails on Mac to build web target due to os/user from dbus #274

Open
nikolayk812 opened this issue Dec 8, 2024 · 1 comment
Open

Comments

@nikolayk812
Copy link

nikolayk812 commented Dec 8, 2024

Describe the bug:

fyne-cross fails on Mac to build web

% fyne-cross web -output myapp
[i] Target: web/
[i] Cleaning target directories...
[✓] "bin" dir cleaned: /app/fyne-cross/bin/web
[✓] "dist" dir cleaned: /app/fyne-cross/dist/web
[✓] "temp" dir cleaned: /app/fyne-cross/tmp/web
[i] Checking for go.mod: /Users/GolandProjects/fyne-poc/go.mod
[✓] go.mod found
[i] Packaging app...
# os/user
/go/pkg/mod/golang.org/[email protected]/src/os/user/lookup.go:22:41: undefined: current
/go/pkg/mod/golang.org/[email protected]/src/os/user/lookup.go:43:9: undefined: lookupUser
/go/pkg/mod/golang.org/[email protected]/src/os/user/lookup.go:52:9: undefined: lookupUserId
/go/pkg/mod/golang.org/[email protected]/src/os/user/lookup.go:58:9: undefined: lookupGroup
/go/pkg/mod/golang.org/[email protected]/src/os/user/lookup.go:64:9: undefined: lookupGroupId
/go/pkg/mod/golang.org/[email protected]/src/os/user/lookup.go:69:9: undefined: listGroups

error building application: exit status 1
[✗] could not package the Fyne app: could not package the Fyne app: exit status 1

To Reproduce:

Steps to reproduce the behaviour:

  1. Go to '...'
  2. Run the command: fyne-cross web -output myapp
  3. See error
  4. command GOOS=js GOARCH=wasm fyne package -os web works

Example code:

Same code as here: https://github.com/fyne-io/fyne/blob/master/cmd/hello/main.go

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

Device info
  • OS: MacOs
  • Version: 15.1.1 (24B91)
  • Go version: 1.23.2
  • fyne-cross version: 1.5.0
  • Fyne version: 2.5.2 and v2.5.3-0.20241208134100-d1f7564b6632
Debug info

running with debug flag, last lines before failure

fyne cli version: v2.3.5
/opt/homebrew/bin/docker run --rm -t -w /app -v /Users/GolandProjects/fyne-poc:/app -v /Users/user/Library/Caches/fyne-cross:/go --platform linux/arm64 --user 502 -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 docker.io/fyneio/fyne-cross-images:web /usr/local/bin/fyne package -os web -name myapp -icon /app/fyne-cross/tmp/web/Icon.png -appBuild 1 -appVersion 1.0.0 -release
# os/user
/go/pkg/mod/golang.org/[email protected]/src/os/user/lookup.go:22:41: undefined: current

go mod why os/user
# os/user
fyne-poc
fyne.io/fyne/v2/app
github.com/godbus/dbus/v5
os/user
@andydotxyz
Copy link
Member

andydotxyz commented Dec 8, 2024

This looks like a bug in the Go compiler!?

I wonder if fyne-cross is turning on CGO and triggering a compiler path that is not expected as wasm is not actually a different platform in the same way that most of our cross compiling is?

GOOS=js GOARCH=wasm fyne package -os web

Just FYI you don't need GOOS and GOARCH, fyne package does it all for you.

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

2 participants