lazarus-darwin-aarch64-3.8 on Mac mini M4 Pro lazarus / 13-General ---------------------------------------------------------------------- Jon Trepte · 2025-03-07 05:46 I have installed lazarus-darwin-aarch64-3.8 on my Mac mini M4 Pro and while the IDE runs correctly and I can compile and run projects. However if I try to rebuild the IDE I get the following right at the end (see attachment). I have tried lazarus-darwin-aarch64-4.0RC2 but that crashes as soon as I press Start IDE button on the welcome page (all options are OK). The only version I have working is a copy from my old Mac mini x86 (V3.7) however this only runs without the debugger. I would like to run a native version of Lazarus. Any Ideas. ---------------------------------------------------------------------- dbannon · 2025-03-07 06:20 Two seperate but well know problems here I am afraid Jon. Firstly, using any tool that makes software on a Mac, Apple very kindly render that application unusable and hide what they did. Easy fixed, not a FPC/Lazarus issue https://wiki.freepascal.org/Installing_Lazarus_on_macOS#Building_sourc e Secondly, its been discovered that there is a Mac specific problem in Lazarus 4RC2, its fixed in trunk and will almost certainly be fixed in 4.0 when its released. https://forum.lazarus.freepascal.org/index.php/topic,70164.msg549151/t opicseen.html For now, use 4.0RC1 and remember, when making a new app file (ie the directory apple wraps everything up in, you must remove the hidden "do not run" attribute. Hope this helps. (I'll see if I can add something to the installing from source wiki about that RC2 bug) Davo ---------------------------------------------------------------------- Jon Trepte · 2025-03-07 06:25 Thanks Davo, I'll try you suggestion and revert. Jon ---------------------------------------------------------------------- dbannon · 2025-03-07 06:28 For the record, I quoted the wrong forum like to the 4RC2 problem, its should be - https://forum.lazarus.freepascal.org/index.php/topic,70214.msg548936.h tml#msg548936 Davo ---------------------------------------------------------------------- Jon Trepte · 2025-03-12 08:08 Ok Davo, I installed RC1 into the applications folder. I then ran xattr -rc lazarus. lazarus started the IDE and I then chose tools/Build Lazarus with profile : Normal IDE Everything seems to compile but I still get the error dialog right at the end as if it was trying to restart the IDE (see previous attachment) file not found Can't find the lazarus executable /Applications/lazarus/lazarus.app/Co ntents/Resources/startlazarus.app/Contents/MacOS/lazarus. Looking into that folder I find the only file called startlazarus Is there something amiss here? should it be running startlazarus instead? Happy to wait for V4 release candidate. Just hope it doesn't have the same problem. Any Ideas? Jon ---------------------------------------------------------------------- dbannon · 2025-03-12 09:56 Jon, you should, I think, have both lazarus.app and startlazarus.app in that directory. As such, they should both need the xattr treatment. Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i $> attr -rc lazarus.app startlazarus.app (don't know if the shell allows that, maybe run them separate commands) But I am not quite sure whats happening there to be honest. I always put my lazarus installs down in my home directory, Linux, Unix or MacOS.  Thats because, as you note, Lazarus needs to be able to rebuild itself from time to time. But to cater for situations where pre-packaged Lazarus is installed in read only root space, the designers gave us startlazarus. It, quietly, in the background makes out its rebuilding the original Lazarus but actually builds a new copy hidden down in the config dir, in the user home space. By building my Lazarus (and not 'installing' it) in my home direction, I avoid that extra complexity and doubling up of disk usage. But, honestly, I don't know if that system cuts in if you build in [MacOS]Applications. Please check that xattr business first.... Davo ---------------------------------------------------------------------- TRon · 2025-03-12 16:34 You nailed it dbannon  Quote from: dbannon on March 12, 2025, 10:56:17 amBut to cater for situations where pre-packaged Lazarus is installed in read only root space, the designers gave us startlazarus. It, quietly, in the background makes out its rebuilding the original Lazarus but actually builds a new copy hidden down in the config dir, in the user home space. With the additional note that afaik this process does not always end up successful and which seem to cause issues on certain setups. Also afaik reason (still) unknown. Therefore installing in user-space is by far the easiest solution atm. ---------------------------------------------------------------------- Jon Trepte · 2025-03-13 13:48 Hi Davo, You suggested: both files are in the main lazarus folder and have the xattr -rc lazarus.app startlazarus.app applied. I've copied the files to my root folder with no difference. What I don't understand is it seems to be looking for the lazarus.app inside the lazarus.app itself !! This is the message I get. file not found Can't find the lazarus executable /Applications/lazarus/lazarus.app/Co ntents/Resources/startlazarus.app/Contents/MacOS/lazarus. can you not check your path and see what files you have in that location. See attachment for my contents. Kind regards Jon ---------------------------------------------------------------------- dbannon · 2025-03-14 23:50 Quote from: Jon Trepte on March 13, 2025, 02:48:49 pmI've copied the files to my root folder with no difference. I really would not suggest that I am afraid. Just adds further confusion, how do you know which one is being used ? QuoteWhat I don't understand is it seems to be looking for the lazarus.app inside the lazarus.app itself !! Interesting. The lazarus.app is actually a directory. Inside that directory, there are some config files AND the actual binary, 'lazarus'.  So, when you ask the OS to "run" lazarus.app it looks inside the directory and looks for the binary of the same name but without the ".app" (note, its possible for that binary to be a symlink to a binary elsewhere, thats how lazarus makes (eg) project1.app, maybe lazarus.app ??). QuoteCan't find the lazarus executable /Applications/lazarus/lazarus.a pp/Contents/Resources/startlazarus.app/Contents/MacOS/lazarus. But that is definitely wrong.  From memory, it should be something like    Applications/lazarus/lazarus.app/Contents/MacOS/lazarus But what I don't know is who actually goes looking for that, I think its the OS rather than Lazarus. Lazarus just says "run Applications/lazarus/lazarus.app" and then the OS looks for Applications/lazarus/lazarus.app/Contents/MacOS/lazarus Why the OS has the wrong term ?  Pretty unlikely its an OS problem. Some options I think - The file Applications/lazarus/lazarus.app/Contents/MacOS/lazarus is a symlink pointing to an invalid binary, maybe pointing to a *.app dir ?  Please have a look at the contents of your lazarus.app dir, it 'might' have Contents/MacOS/lazarus as a symlink, if so, does it point to  real binary ?  Or, is it, itself, a binary ? Again, guessing, also in that dir are various config files, perhaps Apple has some way of redefining the location of the binary ? And, somehow, thats wrong. I am sorry, this is bordering on the line between where my knowledge is sketchy and where its non-existent ! Another, really remote possibility, Apple has changed its rules about running a symlink-ed binary in a .app dir ?  They do things like that from time to time but I think we'd hear other people complaining. Jon, I am leaving on an overseas trip latter today, I might have time to fire my MacMini up but we know it does not replicate your problem, its Intel running Monteray. Further, I build my Lazarus down in user space, never in /Applications (ie, Lazarus does not have to do that shuffling of files to user space). So, of limited help I suspect. If I can, I will find time to boot it and clarify exactly how my lazarus.app is constructed. Davo ---------------------------------------------------------------------- dbannon · 2025-03-15 08:37 OK Jon, I have had a quick play and really cannot put more time in right now. More info here than you requested and more than is even vaguely helpful but I am pressed for time. And its not good news. Downloaded ,  unzipped  and  built  Lazarus-fixes_4.  Created  a  config  dir.  Start  it  up,  get  carefully  discuised  error  message Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i $>  cd  bin/Lazarus$>  unzip /Users/dbannon/Downloads/lazarus-lazarus- fixes_4.zip$>  cd lazarus-fixes_4$>  make clean bigide....$>   ls -la lazarus.app/Contents/MacOS/total 0drwxr-xr-x@ 3 dbannon  staff   96  4 Jan 20:03 .drwxr-xr-x@ 6 dbannon  staff  192  4 Jan 20:03 ..lrwxrwxrwx  1 dbannon  staff   16 15 Mar 17:25 lazarus -> ../../../lazarus So,  in  this  case,  the  lazarus.app  points  to  a  binary,  "lazarus"  that  is  in the  same  directory  as  the  lazarus.app  dir.  And  that is because  thats  where  Lazarus  wants  to  make  its  binary. Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i $>  mkdir  ../LazConfigs$>  cat > lazarus.cfg-- pcp=/Users/dbannon/bin/Lazarus/LazConfigs/lazarus-fixes_4    {  Ctrl-D  } $>  run ./lazarus.app$>  open ./lazarus.appThe application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10827 "kLSNoExecutableErr: The executable is missing" UserInfo={_LSLine=3863, _LSFunction=_LSOpenStuffCallLocal We  all  know  Apple  lies  here,  the  OS  knows  very  well  whats  wrong  with  the  app,  it  set  a  quarantine  flag  on  the  app  dir. Remove  quarantine  attribute.  Start  again. Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i $>  xattr -drv com.apple.quarantine *$>  open ./lazarus.app lazarus.app Open  up  lazarus,  necessary  to  set  the  debugger.  Must  select  just  lldb  rather  than  /usr/bin/lldb  but  otherwise  OK.  So  I  add  a  package,  in  my  case,  KControls,  it  builds  and  attempts  to  restart,  nothing  happens. So,  as  an  experiment,  I  rebuilt  Lazarus  telling  it  to  use  its  existing  config  (wondering  if  all  that  config  for  KControls  was  correctly  written). Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i $>  make  clean  useride$>  open ./lazarus.app lazarus.app And  it  all  opened  up  nicely  with  KControls  installed. That definitely proves its not a package issue, its something to do with the way that Lazarus is rebuilding itself. So, the relevant files and directories do not seem to have any unexpected attributes. I have to conclude that Lazarus, new in -fixes_4, does something funny with the open command, as you error message suggests. I have no idea what and honestly, don't have time to expirment any more. I note someone else has posted a message about what might be the same issue (with Lazarus 3. but I suspect its just the quarantine issue. Pity he did not look around first. I thought this problem was isolated to your M* and newest OS, seems I was wrong seeing on my older system. I have, recently, been using 4.0rc1 for my apps release. Its been working OK.  Are you using fixes_4 or 4.0rc1  ?  If what was working OK is now no longer working, are we looking at an Apple Update ? Sorry Jon, I must stop here. Will be away from home with only my Linux Laptop. Away for nearly a month with quite patchy net access if any I am afraid. Davo ---------------------------------------------------------------------- Jon Trepte · 2025-03-24 14:27 HI Davo, Many many thanks for trying. The only version I got to work was 3.7 copied from my x86 based Mac. However the debugger won't work with this version. Enjoy your trip. Jon ---------------------------------------------------------------------- sbulazel · 2025-04-11 21:25 Has someone had any luck with that problem? Meanwhile i tried *everything* i could think of, but no way to get it working. I don't even have a clue what that problem is about ...