Cross compiling for M1?


    Dec 02 2021 | 10:49 pm
    Hi external authors, has anyone here tried cross-compiling for M1 from an intel mac? And if so, how did it go? I realize I will need to test the binary on another machine, but right now that is somewhat doable for me while developing on M1 is not. thanks!

    • Dec 03 2021 | 2:31 pm
      you can cross compile for arm64, or make Fat binaries, from an Intel Mac with Xcode 12 and up (not sure what minor version needed, maybe .3 or .4).
      if you run into any issues give a shout. and make sure you check out the info presented here on generating project files with the Max 8.2 SDK - https://github.com/Cycling74/max-sdk/blob/main/README-8.2-update.md
    • Dec 03 2021 | 3:54 pm
      Thanks Rob, I shall try this after end of semester. Can I ask, while I have you in a thread, is the expectation that things in the package manager should now have M1 builds? I feel Scheme for Max is now ready for the package manager (as of 0.3), but haven't tackled M1 builds yet, so if that needs to come first, that's cool.
    • Dec 03 2021 | 11:40 pm
      Hi Iain,
      Yes, in general new package submissions should be Fat (Intel + M1) builds for Mac.
    • Dec 03 2021 | 11:47 pm
      Thanks Isabel, that makes sense. l'll hold off on submitting for a package until we've got M1 builds sorted.
    • Jan 15 2022 | 7:59 pm
      Hi, I have a strange problem with Xcode. Yesterday I succeded generating the project files with cmake. I opened one of the projects in Xcode and was happy that I saw "Any Mac (Intel, Arm64)" as a target in the sheme selection dropdown. Today I was about to actually start some work but after opening any of the projects I noticed that the Arm64 disappeared in the sheme selection.
      I haven't changed anything. Even repeating the whole process of cloning sdk and building the projects with cmake does not bring the Arm64 option back to the sheme menu. The build settings are correct
      but it's not reflected in the sheme selection. Any idea? It's Xcode 12.1 on OSX 10.15.7
    • Jan 15 2022 | 9:09 pm
      I think this is a problem with the macosx sdk. I'm going to download xcode 12.4 and see if that helps
    • Jan 15 2022 | 9:38 pm
      https://developer.apple.com/documentation/apple-silicon/building-a-universal-macos-binary Xcode 12.2 and later is a requirement for building universal binaries. Earlier versions of Xcode don’t contain the support needed to build and test universal versions of your macOS code.

      💡