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

Support apple silicon #1317

Open
PalmerAL opened this issue Nov 6, 2020 · 8 comments
Open

Support apple silicon #1317

PalmerAL opened this issue Nov 6, 2020 · 8 comments

Comments

@PalmerAL
Copy link
Collaborator

PalmerAL commented Nov 6, 2020

I think the only remaining thing is for keytar to add Electron 11 and arm64 support (atom/node-keytar#319).

@Milo123459
Copy link
Member

Milo123459 commented Dec 5, 2020

@PalmerAL That PR is merged - is there anything we need to change to allow it to support apple sillicon?

@PalmerAL
Copy link
Collaborator Author

PalmerAL commented Dec 5, 2020

There's a weird problem where running the buildMac script fails if you build both architectures simultaneously; if that can't be fixed we can workaround by running them one after another. Other than that, everything should be ready.

I don't have one of these devices to test on, but I know someone who's buying one soon, so hopefully I'll be able to confirm that the build works. If anyone here has one already, LMK.

@PalmerAL
Copy link
Collaborator Author

PalmerAL commented Dec 8, 2020

Actually we probably need this: atom/node-keytar#340

@Milo123459
Copy link
Member

I'll keep an eye on that

@Milo123459
Copy link
Member

@PalmerAL That one merged as well, anything else? 😂

@PalmerAL
Copy link
Collaborator Author

I tried this again, and now it won't build because it's using the wrong SDK:

Packaging app for platform darwin x64 using electron v11.0.4
Packaging app for platform darwin arm64 using electron v11.0.4
  CXX(target) Release/obj.target/keytar/src/async.o
  CXX(target) Release/obj.target/keytar/src/main.o
  CXX(target) Release/obj.target/keytar/src/async.o
In file included from ../src/async.cc:1:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:504:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string_view:175:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__string:57:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:641:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:60:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string.h:60:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/string.h:61:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:32:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/cdefs.h:807:2: error: 
      Unsupported architecture
#error Unsupported architecture
 ^

It needs to be using the 11.0 SDK to work, but I'm not sure how to change it. And this was working fine a week ago; I'm not sure what changed.

@PalmerAL
Copy link
Collaborator Author

I was able to fix that by running export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk based on this example: https://github.com/microsoft/vscode/blob/e2f6cc5a9658e651189bed2dfa1be81ce5f57d26/build/azure-pipelines/darwin/product-build-darwin.yml#L128

It compiles successfully now at least. @Milo123459 Do you happen to have one of these machines to test with?

@PalmerAL
Copy link
Collaborator Author

PR: #1383

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

No branches or pull requests

2 participants