getlantern/systray

Can we get MacOS M1 support?

davidnewhall opened this issue · 4 comments

I'd like to create binaries for M1 users, but this library does not seem to compile against darwin+arm64 (MacOS M1). I'll be forever grateful if this feature can be added.

Thank you!


Reproduction steps:

$ git clone git@github.com:getlantern/systray.git
$ cd systray
$ GOOS=darwin GOARCH=arm64 go build .

Output:

# github.com/getlantern/systray
./systray.go:78:2: undefined: nativeLoop
./systray.go:106:2: undefined: registerSystray
./systray.go:111:14: undefined: quit
./systray.go:136:2: undefined: addSeparator
./systray.go:190:2: undefined: hideMenuItem
./systray.go:195:2: undefined: showMenuItem
./systray.go:220:2: undefined: addOrUpdateMenuItem

Come to think of it (looking at the code), this is a cross compile issue.... I'll try this on a real M1 and report back.
I'm also testing on some old 10.14.6. Upgrading to Monterey now (to get latest Xcode). This may solve my problem... 🤞

This works fine on M1. I'll report back if I can get cross-compiling to work.....

I was able to cross compile just fine from an amd64 mac to arm64 with xcode 13.2.
https://app.travis-ci.com/github/Notifiarr/notifiarr/jobs/563321323#L549

Sorry about the delay, I went on paternity leave last week! Glad that you got this working, though!