Installer reopens after allowing to determine if the software can be installed on BigSur ARM64

Hello,
We have plugin for installer and we use InstallerJS for additional checks before installation. Because of that when I run installer I see that message:

This package will run a program to determine if the software can be installed.
[Cancel] [Allow]

And when I allow it my installer re-opens. It reproduces only on AppleSilicon (ARM64) version of BigSur (11.0.1 as well).

Here is part of install.log:

2020-10-30 09:34:17+01 BigSurARM-MAC Installer[93715]: @(#)PROGRAM:Install PROJECT:Install-1000
2020-10-30 09:34:17+01 BigSurARM-MAC Installer[93715]: @(#)PROGRAM:Installer PROJECT:Installer-1018
2020-10-30 09:34:17+01 BigSurARM-MAC Installer[93715]: Hardware: ADP3,2 @ 0 MHz (x 8), 16384 MB RAM
2020-10-30 09:34:17+01 BigSurARM-MAC Installer[93715]: Running OS Build: macOS 11.0.1 (20B5012d)
2020-10-30 09:34:17+01 BigSurARM-MAC Installer[93715]: Env: USER=user
2020-10-30 09:34:17+01 BigSurARM-MAC Installer[93715]: Env: _CFBundleIdentifier=com.apple.installer
2020-10-30 09:34:17+01 BigSurARM-MAC Installer[93715]: Env: COMMAND
MODE=unix2003
2020-10-30 09:34:17+01 BigSurARM-MAC Installer[93715]: Env: LOGNAME=user
2020-10-30 09:34:17+01 BigSurARM-MAC Installer[93715]: Env: PATH=/usr/bin:/bin:/usr/sbin:/sbin
2020-10-30 09:34:17+01 BigSurARM-MAC Installer[93715]: Env: SSHAUTHSOCK=/private/tmp/com.apple.launchd.PQMDXH1vBR/Listeners
2020-10-30 09:34:17+01 BigSurARM-MAC Installer[93715]: Env: SHELL=/bin/zsh
2020-10-30 09:34:17+01 BigSurARM-MAC Installer[93715]: Env: HOME=/Users/user
2020-10-30 09:34:17+01 BigSurARM-MAC Installer[93715]: Env: _CFUSERTEXTENCODING=0x1F6:0x0:0x0
2020-10-30 09:34:17+01 BigSurARM-MAC Installer[93715]: Env: TMPDIR=/var/folders/ks/n9ygc5yn61bdh1py1pnk7ylh0000gp/T/
2020-10-30 09:34:17+01 BigSurARM-MAC Installer[93715]: Env: XPCSERVICENAME=application.com.apple.installer.1152921500312163792.1152921500312163797
2020-10-30 09:34:17+01 BigSurARM-MAC Installer[93715]: Env: XPCFLAGS=0x0
2020-10-30 09:34:17+01 BigSurARM-MAC Installer[93715]: MyPkg 1.0.0.605 1.0.0.605 Installation Log
2020-10-30 09:34:17+01 BigSurARM-MAC Installer[93715]: Opened from: /Users/user/MyPkg -1.0.0.605-Universal.pkg
2020-10-30 09:34:17+01 BigSurARM-MAC Installer[93715]: Package Authoring Error: <background
scaling> has an unsupported MIME type: X-NSObject/NSNumber
2020-10-30 09:34:17+01 BigSurARM-MAC Installer[93715]: Package Authoring Error: <background_alignment> has an unsupported MIME type: X-NSObject/NSNumber
2020-10-30 09:34:17+01 BigSurARM-MAC Installer[93715]: Package Authoring Error: <layout-direction> has an unsupported MIME type: X-NSObject/NSNumber
2020-10-30 09:34:17+01 BigSurARM-MAC Installer[93715]: Failed to load specified background image
2020-10-30 09:34:17+01 BigSurARM-MAC Installer[93715]: Product archive /Users/user/MyPkg -1.0.0.605-Universal.pkg trustLevel=350
2020-10-30 09:34:17+01 BigSurARM-MAC Installer[93715]: External component packages (1) trustLevel=350
2020-10-30 09:34:19+01 BigSurARM-MAC Installer[93715]: Could not load resource readme: (null)
2020-10-30 09:34:19+01 BigSurARM-MAC Installer[93715]: Architecture Translation: Distribution failed architecture check and is about to be re-executed as Intel.
2020-10-30 09:34:19+01 BigSurARM-MAC Installer[93715]: Architecture Translation: Process is about to get executed as Intel.

2020-10-30 09:34:19+01 BigSurARM-MAC Installer[93715]: @(#)PROGRAM:Install PROJECT:Install-1000
2020-10-30 09:34:19+01 BigSurARM-MAC Installer[93715]: @(#)PROGRAM:Installer PROJECT:Installer-1018


So, I have "Architecture Translation: Process is about to get executed as Intel." error, but one thing - it is Universal package (built on Intel based Mac using cross-compilation). It means that plugin for installer was built for both architectures and then Universal binary was made from them, which is actually stored in the package.

Then I built just ARM package:

lipo -archs /tmp/pkgbuild/darwin/flat/Plugins/LicenseAgeementsPlugin.bundle/Contents/MacOS/LicenseAgeementsPlugin
arm64

, but I got the same error:

2020-10-30 09:48:34+01 BigSurARM-MAC Installer[93836]: Could not load resource readme: (null)
2020-10-30 09:48:34+01 BigSurARM-MAC Installer[93836]: Architecture Translation: Distribution failed architecture check and is about to be re-executed as Intel.
2020-10-30 09:48:34+01 BigSurARM-MAC Installer[93836]: Architecture Translation: Process is about to get executed as Intel.

2020-10-30 09:48:35+01 BigSurARM-MAC Installer[93836]: @(#)PROGRAM:Install PROJECT:Install-1000
2020-10-30 09:48:35+01 BigSurARM-MAC Installer[93836]: @(#)PROGRAM:Installer PROJECT:Installer-1018
2020-10-30 09:48:35+01 BigSurARM-MAC Installer[93836]: Hardware: ADP3,2 @ 2.40 GHz (x 4), 16384 MB RAM


But I didn't have x86_64 binaries in my package. How is it possible? What I do wrong?
Thanks.



Answered by Systems Engineer in 645517022
I am a software engineer on the installer team and am happy to give an explanation here.

In order to support the plethora of installer packages that have been created over the years, we run all existing packages under Rosetta translation.

This includes:
  • InstallerJS Distribution evaluation

  • preinstall/postinstall scripts

  • Installer Plugins

In order for the package to run as arm64, the Distribution file has to specify in its hostArchitectures section that it supports arm64 in addition to x86_64.

man productbuild explain this information in more detail.

By default any package that is created in Big Sur with productbuild automatically has arm64 marked as a supported architecture for the package, in addition to x86_64.


Well, that’s weird. Regardless of what else you do here, you should file a bug about this. Make sure to attach your universal and (especially) your Arm-only package. Please post your bug number, just for the record.

Beyond that, I have a quick test you can run: If you build your installer plug-in for arm64e (as opposed to arm64), how does it behave?

IMPORTANT I’m not recommending that you ship this way; this is just a test to see if you’re hitting a problem that has cropped up in similar contexts.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"

Beyond that, I have a quick test you can run: If you build your installer plug-in for arm64e (as opposed to arm64), how does it behave?


Unfortunately issue still reproduces :(


Regardless of what else you do here, you should file a bug about this.


Bug number is FB8859425


Hi,

I'm hitting the same issue. I started out with an installer package with two plugins, built for x86_64, arm64 and arm64e (to cover all bases) and ended up stripping it down to only arm64 binaries in package and arm64e in plugins. In the end I removed the plugins but Installer still reexecutes in Rosetta with the "Architecture Translation: Distribution failed architecture check and is about to be re-executed as Intel." which makes no sense when there's on Intel code in there!

I filed an issue, FB8883336, before finding this thread. (I assume it will be closed as a duplicate.) It includes an example distribution package. Hopefully this can be resolved... I'm quite certain that this worked until Beta 8 or 9-ish and stopped working around Beta 9-10.

I filed an issue, FB8883336, before finding this thread. (I assume it
will be closed as a duplicate.)

Probably. But thanks for filing anyway. Your other tidbit, about this being introduced during the beta cycle, may turn out to be salient.

Unfortunately I don’t have any other info to share at this point. Once DTS starts formal support… oh wait… this is Apple silicon and we accept support incidents for that. I think it’d be worthwhile opening a DTS tech support incident about this to see if DTS’s installer specialist can uncover anything else.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Accepted Answer
I am a software engineer on the installer team and am happy to give an explanation here.

In order to support the plethora of installer packages that have been created over the years, we run all existing packages under Rosetta translation.

This includes:
  • InstallerJS Distribution evaluation

  • preinstall/postinstall scripts

  • Installer Plugins

In order for the package to run as arm64, the Distribution file has to specify in its hostArchitectures section that it supports arm64 in addition to x86_64.

man productbuild explain this information in more detail.

By default any package that is created in Big Sur with productbuild automatically has arm64 marked as a supported architecture for the package, in addition to x86_64.


Installer reopens after allowing to determine if the software can be installed on BigSur ARM64
 
 
Q