thunderbird-patches
thunderbird-patches copied to clipboard
Homebrew and Apple Silicone (M1)
Nice Project!
I finished a Homebrew Cask for Betterbird but didn't push it to the Homebrew repo since there is no Apple Silicone version of BB. Are there any plans or options for a M1 build?
Not really, unless someone funds it. We're doing the Intel build on a loaned Mac book which can disappear any minute. That was initially termed "experimental", and it's not notarised either. Apparently you can get Mac M1 in the cloud. https://aws.amazon.com/ec2/instance-types/mac/.
Thanx for the quick reply. It would be a shame if this project for the Apple and Homebrew community failed because of this. Maybe I could help or compile it myself?
What help did you have in mind? At a guess, we should compile the binaries we distribute yourselves. You have an M1/2 machine? Did you compile there successfully?
I could compile it myself on a M1, but didn't try it right now. I skimmed through your build.sh and https://firefox-source-docs.mozilla.org/setup/macos_build.html, and it didn't seem too complicated, but maybe that's just naïve.
With no updates for 7+ months - just wondering if anyone has been able to successfully build a version with native Apple Silicon support? (if so, could you post a link? 😅)
We don't have the hardware, and BTW, the Intel Mac we use to compile is only on loan and can be withdrawn any day. Other than that, compiling shouldn't be a problem. It could even be done in the cloud via AWS: https://aws.amazon.com/ec2/instance-types/mac/ If we read the linked pricing page https://aws.amazon.com/ec2/dedicated-hosts/pricing/ correctly, a Mac2 service is necessary (Mac1 being Intel based). As a dedicated host that costs $0.716 per hour with a 24 hour minimum, so $17 per build. Getting a beefy Linux machine in the cloud for an hour is around 50 Eurocent in comparison.
Last we checked, only 2% of users were on Mac, unclear how many of those were on M1/M2.
Last we checked, only 2% of users were on Mac, unclear how many of those were on M1/M2.
This is sometimes a chicken-and-egg problem. 🐔 But I understand your point of view.
We will use GitHub actions soon (https://github.com/Betterbird/thunderbird-patches/pull/173). According to https://github.com/Betterbird/thunderbird-patches/pull/173#issuecomment-1634845016 this will be supported from Q3 2023.
Seems like Github Actions can be used with m1 runners now
https://github.blog/2023-10-02-introducing-the-new-apple-silicon-powered-m1-macos-larger-runner-for-github-actions/
Thanks for letting us know. Sadly, building on Mac only works for the "full build from repo", not the "reduced build from source tarball" which we prefer, see Issue #175.
Upstream report here: https://bugzilla.mozilla.org/show_bug.cgi?id=1847288#c1
They did answer here: https://bugzilla.mozilla.org/show_bug.cgi?id=1847288#c2 Thanks for the info. Maby you can try disabling sccache on mac?
@sagudev could you look into it again?
Just here to throw my hat in, would love to see apple silicon builds
Sure, see the comment before yours.
So I tried compiling on an M2 mac. In mozconfig-Mac I changed/added: ac_add_options --target=aarch64-apple-darwin #changed ac_add_options --host=aarch64-apple-darwin #added, not sure this is needed
Building fails with:
0:06.81 DEBUG: Executing: /Users/<>/.mozbuild/sccache/sccache /usr/bin/clang -isysroot /Users/<>/.mozbuild/MacOSX13.3.sdk -mmacosx-version-min=11.0 -std=gnu99 --target=arm64-apple-darwin -Wl,--version
0:06.81 ERROR: Failed to find an adequate linker
Any idea what can be done? ld does not support --version on mac
We got same thing in mozjs, one solution is to set default linker to lld-classic or to clang's lld or apply this patch: https://github.com/servo/mozjs/blob/main/mozjs-sys/etc/patches/0029-fix-ld64-detection.patch
changed to clangd's lld. works. Thanks @sagudev
We got same thing in mozjs, one solution is to set default linker to lld-classic or to clang's lld or apply this patch:
Has that been reported upstream at Mozilla. They build FF/TB for M1/M2, so why don't they have the issue? Or are they doing only cross-compiles for Mac on Linux?
Mozilla is using their own toolchains (clang) using mach
. I planned to upstream https://github.com/servo/mozjs/blob/main/mozjs-sys/etc/patches/0029-fix-ld64-detection.patch but I forgot. I will open bug and fix later today.
Found relevant bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1871153
Thanks. Maybe we should just add the patch to the project, I guess it won't break the other builds :wink:
We did a cross-compile enabling the respective lines after this commit: https://github.com/Betterbird/thunderbird-patches/commit/be2ea886eeb8c982c59db1f271141eef5968535a
One user on Reddit claims that it works, two other users report a broken app:
Working:
Not working:
It can be made to work:
To "fix" the gatekeeper: spctl --add /Applications/Betterbird.app
. Source: https://osxdaily.com/2015/07/15/add-remove-gatekeeper-app-command-line-mac-os-x/
To fix the "Betterbird is damaged": xattr -cr /Applications/Betterbird.app
. Source: https://www.youtube.com/watch?app=desktop&v=6fqzb4qpgcs