Updating of macOS 11.5.x corrupts FPC on M1 Mac lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- Igor · 2021-08-12 12:28 Since macOS 11.5 every new update (11.5.1, 11.5.2) damages FPC 3.2.2 binaries or configuration on M1-powered Mac. Symptoms: FPC refuses to cross-compile for x86_64/darwin. Compilation for aarch64/darwin works fine. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Mac-mini- Igor:~ mac$ fpc -Px86_64Error: /usr/local/bin/ppcx64 can't be executed, error message: Failed to execute "/usr/local/bin/ppcx64", error code: 127 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i bash-3.2$ lazbuild --cpu=x86_64 --build-mode=Release --build-all --recursive MyApp.lpiHint: (lazarus) [RunTool] "/usr/local/bin/fpc" "-iWTOTP" "-Px86_64"Warning: [TPCTargetConfigCache.Update] cannot find real compiler for this platform: Compiler="/usr/local/bin/fpc" Options="-Px86_64" RealCompiler=""TProject.DoLoadStateFile Statefile not found: /Users/mac/Dev/MyApp/lib/x86_64-darwin/MyApp.compiledError: /usr/local/bin/ppcx64 can't be executed, error message: Failed to execute "/usr/local/bin/ppcx64", error code: 127Error: (lazarus) Compile Project, Mode: Release, CPU: x86_64, Target: MyApp: stopped with exit code 1Error: (lazbuild) failed compiling of project /Users/mac/Dev/MyApp/MyApp.lpi Native aarch64/darwin compiler works fine: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i bash-3.2$ fpc -Paarch64Free Pascal Compiler version 3.2.2 [2021/05/16] for aarch64<...> Solution: I found a simple workaround. Reinstallation of fpc-3.2.2.intelarm64-macosx.dmg cures FPC configuration and now FPC works correctly again. It seems that this problem doesn't appear on Intel Macs. Only on M1 Macs. ---------------------------------------------------------------------- marcov · 2021-08-12 12:44 Maybe OS X reapplies some security policy/permission every update? ---------------------------------------------------------------------- Igor · 2021-08-12 13:03 Yes, but native ARM compiler continue to work. Probably Jonas can check this issue on his M1 Mac? ---------------------------------------------------------------------- trev · 2021-08-12 23:27 I have not had this issue on my M1 Mac mini which I just this morning updated from 11.5.1 to 11.5.2. I have FPC 3.3.1, 3.2.0 and 3.2.2 all installed and the compiler binaries all still execute without any issues (both native aarch64 and x86_64). ---------------------------------------------------------------------- Igor · 2021-08-13 11:47 Interesting. I had this issue twice after updating to 11.5.1 and 11.5.2 My macOS installation is a clean (without Time Machine or import) when I purchased Mac Mini M1 in March. ---------------------------------------------------------------------- trev · 2021-08-13 23:09 Quote from: Igor Kokarev on August 13, 2021, 01:47:47 pmMy macOS installation is a clean (without Time Machine or import) when I purchased Mac Mini M1 in March. I did exactly the same as you, started completely clean with no TM backups or settings migration. Does the system log reveal more details about why the x86_64 binaries are no longer being executed? ---------------------------------------------------------------------- Igor · 2021-08-16 12:36 Sorry, I didn't explore system logs. If this issue will occur again with future update of macOS, I'll try to check logs.