Search Unity

Unable to Build for MacOS Big Sur from Windows

Discussion in 'macOS' started by etchthaboss, Jan 5, 2021.

  1. etchthaboss

    etchthaboss

    Joined:
    Jun 13, 2016
    Posts:
    12
    I'm currently trying to build for MacOS Big Sur, and having lots of difficulties. Target Macs are Intel, not m1.

    Here's what we've tried so far.
    Our primary dev machines are windows and primary engine version is 2019.4.14 LTS
    Built for MacOS, runs fine on Catalina. When running on BigSur, we see a "unable to open application" error.


    Copied over project and built it on Unity 2020.2.1f1 on the Intel + Apple silicon, as well as intel only option option and saw the same error.

    Perusing some forums, I ran across this:

    First command says no such app found.

    I tried an Unity Cloud Build for MacOSX Universal, and that actually worked! However, the build was buggy. Lightbakes were all screwed, seeing errors that we didn't have before, so I don't want to use this option.

    So.... is there any way I can make Mono builds work for macos Big Sur or solve that app can't be found issue.
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Your images are broken. Looks like they link to your internal slack?
     
  3. etchthaboss

    etchthaboss

    Joined:
    Jun 13, 2016
    Posts:
    12
    That's odd. They showed up when I was editing the message...
    Well here they are:

    Image 1
    screenshot_2020-12-30_at_06.29.35.png
    and image 2

    image (2).png
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    "First command says no such app found."

    Can you show the terminal erroring out like that? Is the specified path correct?
     
  5. etchthaboss

    etchthaboss

    Joined:
    Jun 13, 2016
    Posts:
    12
    That's correct. This command was run from the right folder: Screenshot 2020-12-30 at 06.28.03.png
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Perhaps the file name is different? Did you try doing "ls -la intelOnly2020Build.app/Contents/MacOS"?
     
  7. spajus

    spajus

    Joined:
    Jun 10, 2015
    Posts:
    47
    I am getting similar reports about big sur owners not being able to run the build after I upgraded from 2020.1 to 2020.2
     
  8. spajus

    spajus

    Joined:
    Jun 10, 2015
    Posts:
    47
  9. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Which version of 2020.2 are you on? Any chance "steam_api.bundle" doesn't support Apple silicon natively and only has an x64 slice? That would cause it to not load when the application is running on Apple silicon hardware natively.
     
  10. spajus

    spajus

    Joined:
    Jun 10, 2015
    Posts:
    47
    2020.2.0f1. Judging from the log in the steam community thread, it definitely does not support Apple silicon natively. Question is why Steam didn't automatically detect this.
     
  11. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    My guess is that you exported the game as "Intel 64-bit + Apple silicon", so it tried running it natively because the executable was universal and it probably doesn't look at the plugins.
     
  12. spajus

    spajus

    Joined:
    Jun 10, 2015
    Posts:
    47
    It seems to be the case! Maybe because "Intel 64-bit + Apple silicon" seems to be set as default architecture since 2020.2? I build from editor script, so never really check the build settings window.

    Also if it helps anyone, after the upgrade there was a Steamworks.NET issue where steam_api.bundle was not copied over the the build (I am building OSX app from Windows, in case it matters). A partial workaround is described here: https://github.com/rlabrecque/Steamworks.NET/issues/393
    Still haven't figured out the exact cause why running a build creates an override with steam_api.bundle set to Intel-64bit, but now I think these could be related.
     
  13. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    If a plugin is configured as "Intel 64-bit only" and you're building for "Intel 64-bit + Apple silicon", it will not get copied over. And yeah, "Intel 64-bit + Apple silicon" is the default now so that games work on the new hardware natively.
     
  14. spajus

    spajus

    Joined:
    Jun 10, 2015
    Posts:
    47
  15. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Yup, if a plugin is configured as AnyCPU, it will get copied to all builds no matter what architecture you target with your build.