Recent

Author Topic: FPCupDeluxe unable to build fully working Lazarus on macOS Tahoe for M2  (Read 385 times)

BradleySlavik

  • New Member
  • *
  • Posts: 10
I have followed the instructions completely on this page:

https://wiki.freepascal.org/Installing_Lazarus_on_macOS#Install_Xcode_15

Yet when I try to run a tiny program like the written('hi!');readln; from this page:

https://wiki.freepascal.org/Console_Mode_Pascal

It never works. Perhaps for more complicated graphics programs the system works, but I usually debug my algorithms with short command line programs before I incorporate them into a larger program where more things can go wrong.

Runing the program that has a body of
begin
  writln('hi');
  readln;
end.

with the other options for "Program" under New Project,
always ends up with the same result, a window that pops up saying "Execution stopped"
and the console window never appears.

Something is very broken in the Lazarus built by FPCupDeluxe. I would like to help fix it, but I don't want to read all the code in the Lazarus project. Does anyone want to give a pointer where to start?
I would very much appreciate it if someone would drop a hint on which file(s) I should start looking in to understand why Lazarus fails to be able to run these most basic programs.

Thanks!

wp

  • Hero Member
  • *****
  • Posts: 13350
Re: FPCupDeluxe unable to build fully working Lazarus on macOS Tahoe for M2
« Reply #1 on: January 22, 2026, 12:02:57 pm »
Your installation of Lazarus was successful (i.e., did not end with an error)? Run Lazarus, and compile and run the default project consisting of an empty form. Does this work? If yes, Lazarus and XCode basically are installed correctly.

Nimbus

  • Jr. Member
  • **
  • Posts: 84
Re: FPCupDeluxe unable to build fully working Lazarus on macOS Tahoe for M2
« Reply #2 on: January 22, 2026, 01:45:30 pm »
As I remember, to be able to run console programs from Lazarus on a Mac, one needs to configure the debugger
« Last Edit: January 22, 2026, 01:50:10 pm by Nimbus »

Thaddy

  • Hero Member
  • *****
  • Posts: 18729
  • To Europe: simply sell USA bonds: dollar collapses
Re: FPCupDeluxe unable to build fully working Lazarus on macOS Tahoe for M2
« Reply #3 on: January 22, 2026, 01:53:37 pm »
It builds on M2, but did you actually UPDATE your system...
This is not a matter for freepascal. Update your system, That is free.
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...

BradleySlavik

  • New Member
  • *
  • Posts: 10
Re: FPCupDeluxe unable to build fully working Lazarus on macOS Tahoe for M2
« Reply #4 on: January 22, 2026, 02:01:45 pm »
As I remember, to be able to run console programs from Lazarus on a Mac, one needs to configure the debugger

Heck! That could definitely be better documented. It seems very odd that one should need to configure debugger when not running a program in debug mode, but I cannot dispute that your suggestion did allow program to run. It appears to work now, albeit, with extra baggage that is NOT present on the Windows version. It seems wrong that the default build for an IDE is to NOT support interactive console programs.

Many thanks. I still think that this should work out of the box, but I am able to run it now.

Here is what I see:

Launching: '/Users/bradleyslavik/tmp/project1'
Working directory: '/Users/bradleyslavik'
1 arguments:
argv[0] = '/Users/bradleyslavik/tmp/project1'
Enter your name: dog
hi dog

Process exited with status 0

What happens on Windows:
Enter your name: dog
hi dog

I can work with this, but I would like to help fix the MacOS version to run the same as the Windows version.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12092
  • Debugger - SynEdit - and more
    • wiki
Re: FPCupDeluxe unable to build fully working Lazarus on macOS Tahoe for M2
« Reply #5 on: January 22, 2026, 02:57:15 pm »
As I remember, to be able to run console programs from Lazarus on a Mac, one needs to configure the debugger

Heck! That could definitely be better documented. It seems very odd that one should need to configure debugger when not running a program in debug mode, but I cannot dispute that your suggestion did allow program to run.

The LLDB + FpDebug should be pre-set. If using the installer, the installer has (should have?) a default config file, that contains this. But I think even without is should happen.

Though I don't have a Mac myself, and can't test...


The "launch console" is a bit more problematic.
Because
- it is only needed for console apps
- it is a global setting for all apps

So users creating GUI apps may not like it. But users creating console apps do need it.

Currently the best that can be done, is to configure 2 setups, and chose a debugger backend (from the 2) in the Project options (there is a page debugger backend).

Ideally this flag (in the debugger config) should have a setting "automatic", and follow the project type => but that hasn't been implemented. (And there are currently no plans on my site, or that I know off / so it will be contribution depending)


Quote
when not running a program in debug mode

Did you either
- Run without debugger
- disable in project options "Run use debugger" (not sure if that is in 4.n or only 4.99)
?

Otherwise you always run in the debugger when running from the IDE.

"Create build modes for release/debug" should set/disable the "run uses debugger". So release builds should not use the debugger (but again not sure 4.n or 4.99)

 

TinyPortal © 2005-2018