Code signature (codesign) fail on arm compiled PyInstaller Mach-O

I've used PyInstaller to create an arm mach-o of a "hello world" python file. I then tried to sign the file using codesign and got the following error:
Code Block language
main executable failed strict validation

When I create an x86_64 mach-o using the same method the codesign works without any issues.

I'm using an arm64 only python 3.9 and PyInstaller version 4.3

I've tried codesigning on both M1 and intel, and codesigning a "hello world" compiled from C file with gcc works.
Also, I've tried looking at the file compiled with PyInstaller using otool and haven't seen any issues.
This is something you should escalate via the support channel for the third-party tool you’re using. If the tool’s author needs help getting this to work, they can open a thread here on DevForums or, better yet, open a DTS tech support incident, where I’ll be able to dedicate more time to help them [1].

Share and Enjoy

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

[1] If they don’t have any TSIs to spare, you should sponsor them one. There’s no formal mechanism to do that, but you can just open a TSI and then loop in the tool vendor.
Code signature (codesign) fail on arm compiled PyInstaller Mach-O
 
 
Q