Recent

Author Topic: M1 mac hell  (Read 3675 times)

vonskie

  • Full Member
  • ***
  • Posts: 186
M1 mac hell
« on: November 05, 2023, 02:15:18 am »
I have had absolute hell with my M1 mac using lazarus.

Tried the 2.2.6 version and the 3.0 rc2

Have ran into the following problems.

Create a new project and after a while the debugger gets an internal error. nothing fixes it. Except create another project and cut and paste my code from the old one.

Create a form can see it in the editor but when you run it the changes are not applied.

Edit a unit it shows it, but when you run it it runs it like it is still using the old code base.

The visual editor for forms starts messing up in 3.0 and doing wierd things

I used it on the mac before before the whole m1 thing and it worked fine.

Its almost like something is locking it down rights wise and the only work around is create a new project until it locks it down again.

I know that sounds crazy but what else could it be.

The m1 has been out for a year and it appears the support for it is in the alpha state.

If any one has found a way to make it reliable on the M1 please let me know what you did.


dbannon

  • Hero Member
  • *****
  • Posts: 3783
    • tomboy-ng, a rewrite of the classic Tomboy
Re: M1 mac hell
« Reply #1 on: November 05, 2023, 03:20:23 am »
Create a new project and after a while the debugger gets an internal error. nothing fixes it. Except create another project and cut and paste my code from the old one.
Did you try "clean up and build" from the "run" menu ?

Its almost like something is locking it down rights wise and the only work around is create a new project until it locks it down again.

Did you try looking at your project files from the command line to see if some permissions have changed ?  I know Apple slap a 'quarantine' attribute on an some parts of an App directory sometimes.

No, I have never used an M1.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

vonskie

  • Full Member
  • ***
  • Posts: 186
Re: M1 mac hell
« Reply #2 on: November 05, 2023, 04:22:49 am »
Cleaup and build fails can not delete different files from the application lazarus directory

For example /application/lazarus/componets/freetype/lib/x86/ etc /freetypelaz.o


Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12309
  • Debugger - SynEdit - and more
    • wiki
Re: M1 mac hell
« Reply #3 on: November 05, 2023, 09:23:06 am »
With Regards to the debugger, try "Reset debugger" from the run menu.

Also, what error does it give exactly?
Open menu: view > ide internals > debug output ===> then copy content when the error happens

What is your debug info settings in "project options"? Dwarf 3 or Dwarf with sets or ...?

dbannon

  • Hero Member
  • *****
  • Posts: 3783
    • tomboy-ng, a rewrite of the classic Tomboy
Re: M1 mac hell
« Reply #4 on: November 05, 2023, 10:58:14 am »

For example /application/lazarus/componets/freetype/lib/x86/ etc /freetypelaz.o

Er, in your line above, do you intentionally have <space>etc<space>  ? etc are important directories in a unix system. If that is a path to a file you are using and it has spaces like that, wow, that could well be your problem.

Anyway, it sounds to me like your Lazarus install is in a write protected location in some manner or another.  I believe the easiest solution is for you to build Lazarus from source in a directory of your choice. That will involve downloading the source (I suggest as a zip), unzipping it somewhere and then, from the command line, in that directory, typing the command, make bigide.

A lot more explicit info here - https://wiki.freepascal.org/Installing_Lazarus_on_macOS#Installing_non-release_versions_of_the_Lazarus_IDE

I had written up some much better discussion about installing from source on the Mac (after I just did so on Monteray) but an admin reverted my change because "that is not the way Mac users think". I strongly suggest it is the way you need to think vonskie, please give it a try and provide some feed back !

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

vonskie

  • Full Member
  • ***
  • Posts: 186
Re: M1 mac hell
« Reply #5 on: November 05, 2023, 06:52:16 pm »
I wanted to add I got it working under 2.2.6 just fine now.

It has been 10+ years since I developed anything in free pascal.

I had the declared variables, declared procedures and var etc under private and other wrong places.

I could create a new project and the debugger and form editor the run with and without debugging worked.

So I started asking chat gpt explain the structure of the pascal file and where it was best and how to put in the various things.

And everything started working. I guess garbage in garbage out.

Also the rights issue concerning clean up and build was resolved with

cd /applications
sudo chown -R username Lazarus


 

TinyPortal © 2005-2018