I'm trying to execute a compiled Lazarus file which was working on macOS 10.14.x. After updating to 10.15, I started to get an error, "Bad CPU type in executable", which as far as I understand means that it is no longer compatible.

->>>>>>>>>>>>>>> bad CPU type in executable
file myScript
->>>>>>>>>>>>>>> Mach-O executable i386
uname -a
->>>>>>>>>>>>>>> Darwin-MacBook-Air.local 19.0.0 Darwin Kernel Version 19.0.0: Thu Oct 17 16:17:15 PDT 2019; root:xnu-6153.41.3~29/RELEASE_X86_64 x86_64
uname -p
->>>>>>>>>>>>>>> i386

I wonder why this executable causes this error while it is i386 which had to be compatible with this version?

Is there any way to run it on macOS 10.15.x? Or is the only way to build it again with different, compatible build settings? (This is not yet supported by Lazarus.)


macOS Catalina (10.15) dropped support for 32-bit executables, which is why your executable no longer works.

The ideal solution is to build a 64-bit binary. The Lazarus wiki describes how to do this: target x86_64, use Cocoa widgets, and build with fpc rather than ppc386.

| improve this answer | |
  • I would also very much appreciate if there was any other way to convert it to 64 bit executable. – Asqan Nov 6 '19 at 9:09
  • I don’t think there are any tools on macOS which could do that (and if there were, I imagine they’d have received a lot of publicity with the Catalina release). – Stephen Kitt Nov 6 '19 at 9:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.