Found an unexpected Mach-O header code: 0x752f2123

So, the application builds fine, but on run (cmd-R) I get this error. Some googling indicates that this precise header code has no hits and that solutions seem to vary from one code to the next.


Any help appreciated.

Accepted Reply

It looks like someone is treating a shell script as a Mach-O executable. 0x752f2123 is ASCII for “u/!#" or, byte reversed, “#!/u”, that is, the sort of thing you’d expect to find at the start of a shell script.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Replies

It looks like someone is treating a shell script as a Mach-O executable. 0x752f2123 is ASCII for “u/!#" or, byte reversed, “#!/u”, that is, the sort of thing you’d expect to find at the start of a shell script.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Thanks, for the lead, will check it out.

Ah, ha! Great tip, Eskimo.


As of this build, we introuced a python wrapper that launches our executable. It is no doubt that this script is what Xcode is complaining about with the shebang starting line.


Given this, I will need to find a way to tell Xcode how to launch the real executable.