Recent

Author Topic: Cannot install Lazarus 4.0 RC1 on macOS 14.6.1  (Read 1060 times)

carl_caulkett

  • Hero Member
  • *****
  • Posts: 649
Cannot install Lazarus 4.0 RC1 on macOS 14.6.1
« on: October 27, 2024, 11:40:32 pm »
* Mac Mini M1
* macOS 14.6.1
* Lazarus 3.99
* FPC 3.3.1

Reposted from https://forum.lazarus.freepascal.org/index.php/topic,69059.0.html due to lack of response :o

I first tried downloading from https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20aarch64/Lazarus%204.0RC1/lazarus-darwin-aarch64-4.0RC1.zip/download but running that from both the startlazarus loader and the lazarus.app bundle gave me the error “lazarus.app” is damaged and can’t be opened. You should move it to the Bin."

I then downloaded the source to Lazarus 4.0RC1 and placed the files in /Applications/Lazarus_4.0. I then used FcpUpDeluxe to install a separate copy of fcp 3.3.1 in /Applications/fcp, added it  to the system path, and restarted my terminal session. Finally, I CDed into /Applications/Lazarus_4.0 and ran make clean bigide. It came up with this...
Code: Bash  [Select][+][-]
  1. Hint: (11030) Start of reading config file /Users/carlcaulkett/.fpc.cfg
  2. Hint: (11030) Start of reading config file /etc/fpc.cfg
  3. Hint: (11031) End of reading config file /etc/fpc.cfg
  4. Hint: (11031) End of reading config file /Users/carlcaulkett/.fpc.cfg
  5. Free Pascal Compiler version 3.3.1-16756-gb74411cf03-dirty [2024/10/27] for aarch64
  6. Copyright (c) 1993-2024 by Florian Klaempfl and others
  7. (1002) Target OS: Darwin for AArch64
  8. (3104) Compiling fcllaz.pas
  9. Fatal: (10022) Can't find unit system used by fcllaz
  10. Fatal: (1018) Compilation aborted
  11. make[1]: *** [fcllaz.ppu] Error 1
  12. make: *** [registration] Error 2
  13.  

Following the README.md, I followed the instructions on what to do if that gave me any error, and ran make clean all. That gave me exactly the same error.

Has anyone actually managed to install Lazarus 4.0 CR1 on macOS aarch64?
"It builds... ship it!"

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10668
  • Debugger - SynEdit - and more
    • wiki
Re: Cannot install Lazarus 4.0 RC1 on macOS 14.6.1
« Reply #1 on: October 27, 2024, 11:46:52 pm »
Ok, I don't know Mac. But there are some generic issues.

And it looks like the fpc install is not correct. Or not entirely.


You are reading two fpc.cfg files.  That isn't wrong, but unusual. You said you used fpcupdeluxe => afaik that creates a local fpc.cfg file. I am not even sure if that should be in your user dir, or in the folder that you used with fpcupdeluxe.

So at least one of the 2 fpc.cfg files are likely from another installed fpc. And that means the paths to the ppu containing folders in that/those fpc.cfg don't work with 3.3.1.

You can simply try be removing them (after backup).
You can also check where they point and if that makes any sense to you.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10668
  • Debugger - SynEdit - and more
    • wiki
Re: Cannot install Lazarus 4.0 RC1 on macOS 14.6.1
« Reply #2 on: October 27, 2024, 11:56:59 pm »
Actually, IIRC fpcupdeluxe writes some script that wraps fpc but adds params to the conf.   Not sure though...

carl_caulkett

  • Hero Member
  • *****
  • Posts: 649
Re: Cannot install Lazarus 4.0 RC1 on macOS 14.6.1
« Reply #3 on: October 28, 2024, 12:42:05 am »
Ok, I don't know Mac. But there are some generic issues.

And it looks like the fpc install is not correct. Or not entirely.


You are reading two fpc.cfg files.  That isn't wrong, but unusual. You said you used fpcupdeluxe => afaik that creates a local fpc.cfg file. I am not even sure if that should be in your user dir, or in the folder that you used with fpcupdeluxe.

So at least one of the 2 fpc.cfg files are likely from another installed fpc. And that means the paths to the ppu containing folders in that/those fpc.cfg don't work with 3.3.1.

You can simply try be removing them (after backup).
You can also check where they point and if that makes any sense to you.

Thanks for the reply @Martin_fr!

I discovered what was wrong with my initial install. The Lazarus.app bundle was there but the lazarus executable that the lazarus.app links to was missing. I guess I was careless in the copying of the downloaded folder to its destination.

I've now got Lazarus 4.0RC1 running. The next question is what is the easiest way of copying my color configs, key mappings and code templates from 3.99?
"It builds... ship it!"

dbannon

  • Hero Member
  • *****
  • Posts: 3188
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Cannot install Lazarus 4.0 RC1 on macOS 14.6.1
« Reply #4 on: October 28, 2024, 12:50:24 am »

I've now got Lazarus 4.0RC1 running. The next question is what is the easiest way of copying my color configs, key mappings and code templates from 3.99?

Copy the config dir from your existing Lazarus to a new dir, point your new Lazarus to it (using lazarus.cfg, --pcp=xxx) and then, in the new lazarus directory, run "make useride", that will build a newer still lazarus, one with all your settings if possible. Then, start Lazarus, it will prompt you to update that config, say "yes" (after checking i really is the new config).

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

PierceNg

  • Sr. Member
  • ****
  • Posts: 398
    • SamadhiWeb
Re: Cannot install Lazarus 4.0 RC1 on macOS 14.6.1
« Reply #5 on: October 28, 2024, 02:27:59 am »
I've now got Lazarus 4.0RC1 running. The next question is what is the easiest way of copying my color configs, key mappings and code templates from 3.99?

I use scripts like these to handle different versions on Linux and macOS.

Code: Text  [Select][+][-]
  1. % cat ~/bin/laz36
  2. #!/bin/sh
  3. (cd /home/pierce/pkg/lazarus36; exec ./startlazarus --pcp=$HOME/.lazarus36 --lazarusdir=$HOME/pkg/lazarus36 &)

Code: Text  [Select][+][-]
  1. % cat ~/bin/lazb36
  2. #!/bin/sh
  3. LAZB=$HOME/pkg/lazarus36/lazbuild
  4. if [ $# -eq 0 ]; then
  5.     $LAZB
  6.     exit 1
  7. fi
  8. exec $LAZB --pcp=$HOME/.lazarus36 --lazarusdir=$HOME/pkg/lazarus36 "$@"

PATH is manipulated by shell functions. I use zsh.

Code: Text  [Select][+][-]
  1. function fpc322path() {
  2.   export OLD_PS1=$PS1
  3.   export PS1="[fpc322 laz36] $OLD_PS1"
  4.   export FPCPATH=~/pkg/fpc322/bin:~/pkg/fpc322/lib/fpc/3.2.2:~/pkg/lazarus36
  5.   export PATH=$PATH0CAR:$FPCPATH:$PATH0CDR
  6.   hash -r
  7. }
  8.  
  9. function path0() {
  10.   export PS1="%n@%m:%~%# "
  11.   unset VIRTUAL_ENVIRONMENT
  12.   unset JAVA_HOME
  13.   unset FPCPATH
  14.   unset LLVMPATH
  15.   export PATH=$PATH0CAR:$PATH0CDR
  16.   hash -r
  17. }

carl_caulkett

  • Hero Member
  • *****
  • Posts: 649
Re: Cannot install Lazarus 4.0 RC1 on macOS 14.6.1
« Reply #6 on: October 28, 2024, 10:51:48 am »

I've now got Lazarus 4.0RC1 running. The next question is what is the easiest way of copying my color configs, key mappings and code templates from 3.99?

Copy the config dir from your existing Lazarus to a new dir, point your new Lazarus to it (using lazarus.cfg, --pcp=xxx) and then, in the new lazarus directory, run "make useride", that will build a newer still lazarus, one with all your settings if possible. Then, start Lazarus, it will prompt you to update that config, say "yes" (after checking i really is the new config).

Davo

I've just tried that. I got this error message...
Code: Bash  [Select][+][-]
  1. [Mon Oct 28 2024  9:48am (GMT+0000)]
  2. /Applications/Lazarus_4.0  make useride
  3. make: -iVSPTPSOTO: Command not found
  4. Makefile:251: *** The Makefile doesn't support target -, please run fpcmake first.  Stop.
  5.  
  6. [2 - USAGE][Mon Oct 28 2024  9:49am (GMT+0000)]
  7. /Applications/Lazarus_4.0
  8.  

UPDATE: Just needed to add the fpc/bin/aarch64 folder to my system path.
« Last Edit: October 28, 2024, 11:07:56 am by carl_caulkett »
"It builds... ship it!"

carl_caulkett

  • Hero Member
  • *****
  • Posts: 649
Re: Cannot install Lazarus 4.0 RC1 on macOS 14.6.1
« Reply #7 on: October 28, 2024, 11:12:07 am »

I've now got Lazarus 4.0RC1 running. The next question is what is the easiest way of copying my color configs, key mappings and code templates from 3.99?

Copy the config dir from your existing Lazarus to a new dir, point your new Lazarus to it (using lazarus.cfg, --pcp=xxx) and then, in the new lazarus directory, run "make useride", that will build a newer still lazarus, one with all your settings if possible. Then, start Lazarus, it will prompt you to update that config, say "yes" (after checking i really is the new config).

Davo

Okay, I've ran make useride but it falls over with this error message...
Code: Bash  [Select][+][-]
  1. /Applications/Lazarus_4.0  make useride
  2. ./lazbuild --lazarusdir=. --build-ide=
  3. SetPrimaryConfigPath NewValue="/Applications/Lazarus_4.0/config_lazarus"
  4. Hint: (lazbuild) Primary config path: "/Applications/Lazarus_4.0/config_lazarus"
  5. Hint: (lazarus) [TPackageLinks.UpdateUserLinks] using LastUsed date of old lcl 4.99 for lcl 4.0.0.1 in /Applications/Lazarus_4.0/lcl/interfaces/lcl.lpk
  6. Hint: (lazarus) [TPackageLinks.UpdateUserLinks] using LastUsed date of old lclbase 4.99 for lclbase 4.0.0.1 in /Applications/Lazarus_4.0/lcl/lclbase.lpk
  7. Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=aarch64-darwin--cocoa New=aarch64-darwin--cocoa Changed: OS/CPU=True LCL=False
  8. Hint: (lazbuild) Building Lazarus IDE with profile "macOS aarch64"
  9. Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=aarch64-darwin--cocoa New=aarch64-linux--cocoa Changed: OS/CPU=True LCL=False
  10.  
  11.   $00000001027D2058
  12.   $0000000102716804
  13.   $0000000102D5EF20
  14.   $00000001028DEC38
  15.   $00000001028E89BC
  16.   $00000001028E8E10
  17.   $0000000102717D84
  18.   $000000010271C9B4
  19.   $000000010271F5A8
  20. Error: (lazbuild) Error
  21. The project uses target OS=linux and CPU=aarch64.
  22. The system.ppu for this target was not found in the FPC binary directories.
  23. Make sure fpc is installed correctly for this target and the fpc.cfg contains the right directories.
  24. lazbuild is non interactive, aborting now.
  25. make: *** [useride] Error 2
  26.  

I've checked and double checked in my 3.99 Lazarus installation to make sure that no Linux options are selected for either the last project worked on or the build Lazarus settings, but still, I get this error!
"It builds... ship it!"

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10668
  • Debugger - SynEdit - and more
    • wiki
Re: Cannot install Lazarus 4.0 RC1 on macOS 14.6.1
« Reply #8 on: October 28, 2024, 11:21:10 am »
I don't know the build manager thing... Maybe some setting in some package?

If you have a working IDE of any kind, try rebuilding from inside the IDE. Normally in the "Tools" menu, but may be "preferences" on Mac. Not sure....




Copying colors.

Your primary config path is normally .lazarus in your home dir. But you can check in menu View > Ide Internals > About IDE

If you haven't specified anything then your new IDE should use the same, and should therefore have the colors (but would also modify your other IDEs config).

You can start the ide with the argument --pcp=....... to have separate config.
You can also put that into a file called lazarus.cfg  in the lazarus dir (but I am not sure on exact details for Mac).
You can check in "About IDE" if it worked.

Colors are in the file EditorOptions.xml
And that file can normally be copied between different Lazarus configs.
Other config files have paths in them, and if you copy then you may get weird results.

dbannon

  • Hero Member
  • *****
  • Posts: 3188
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Cannot install Lazarus 4.0 RC1 on macOS 14.6.1
« Reply #9 on: October 28, 2024, 11:23:30 am »
The project uses target OS=linux and CPU=aarch64.

I understand you are using MacOS, not Linux ?

That does not make a lot of sense.

Are we looking at an error in the makefile relating to target useride ?

Can you please confirm you are using MacOS and "make bigide" worked OK ?

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

DomingoGP

  • Jr. Member
  • **
  • Posts: 80
Re: Cannot install Lazarus 4.0 RC1 on macOS 14.6.1
« Reply #10 on: October 28, 2024, 11:28:16 am »
I've now got Lazarus 4.0RC1 running. The next question is what is the easiest way of copying my color configs, key mappings and code templates from 3.99?

At your own risk, (make copy configuration folder before), you can try  this applicacion to export/import settings (warning: not heavely tested)

https://github.com/DomingoGP/lazIdeExportSettings

carl_caulkett

  • Hero Member
  • *****
  • Posts: 649
Re: Cannot install Lazarus 4.0 RC1 on macOS 14.6.1
« Reply #11 on: October 28, 2024, 11:38:14 am »
Can you please confirm you are using MacOS and "make bigide" worked OK ?

I am using macOS, and no, in the end I didn't use "make bigide" at all, since I was able to unpack the https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20aarch64/Lazarus%204.0RC1/lazarus-darwin-aarch64-4.0RC1.zip/download file and run that. I have been doing some cross_compiling to Linux in the last few days, but I thought I hd reset all of my options in Project Options and Configure "Build Lazarus" so that everything was set to macOS aarch64 before copying the config folder over!
"It builds... ship it!"

carl_caulkett

  • Hero Member
  • *****
  • Posts: 649
Re: Cannot install Lazarus 4.0 RC1 on macOS 14.6.1
« Reply #12 on: October 28, 2024, 11:43:38 am »
I've now got Lazarus 4.0RC1 running. The next question is what is the easiest way of copying my color configs, key mappings and code templates from 3.99?

At your own risk, (make copy configuration folder before), you can try  this applicacion to export/import settings (warning: not heavely tested)

https://github.com/DomingoGP/lazIdeExportSettings

Ah, cool :)  As long as I backup first, what could possible go wrong?  ;)
"It builds... ship it!"

dbannon

  • Hero Member
  • *****
  • Posts: 3188
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Cannot install Lazarus 4.0 RC1 on macOS 14.6.1
« Reply #13 on: October 28, 2024, 12:02:58 pm »

I suspect you are playing is some quite untested space right now.

As long as you still have a working compiler, I think I would go back to the model of building a new Lazarus, in a new directory with "make bigide". Only after you have established that works should you consider "make useride". Lazarus itself is cross compile agnostic, cross compiling is FPC's problem. The fpc command will choose which actual compiler to use at compile time.  If you have hard wired paths to specific cross compilers in Lazarus, you sure are making things harder for yourself, that information belongs in your application project.

Maybe DomingoGP's tool will help but you will, sooner of later have to build Lazarus with a config containing your special settings. Thats where useride comes in.  Your alternative is to manually re-install all the necessary Lazarus setting, by hand, would that be too big a job ?

Davo





 


Can you please confirm you are using MacOS and "make bigide" worked OK ?

I am using macOS, and no, in the end I didn't use "make bigide" at all, since I was able to unpack the https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20aarch64/Lazarus%204.0RC1/lazarus-darwin-aarch64-4.0RC1.zip/download file and run that. I have been doing some cross_compiling to Linux in the last few days, but I thought I hd reset all of my options in Project Options and Configure "Build Lazarus" so that everything was set to macOS aarch64 before copying the config folder over!
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

carl_caulkett

  • Hero Member
  • *****
  • Posts: 649
Re: Cannot install Lazarus 4.0 RC1 on macOS 14.6.1
« Reply #14 on: October 28, 2024, 12:06:05 pm »
I've now got Lazarus 4.0RC1 running. The next question is what is the easiest way of copying my color configs, key mappings and code templates from 3.99?

At your own risk, (make copy configuration folder before), you can try  this applicacion to export/import settings (warning: not heavely tested)

https://github.com/DomingoGP/lazIdeExportSettings

Actually @Martin_fr's suggestion of copying editoroptions.xml from my old installation, has, I think covered all of the things I needed to update.
Ah, cool :)  As long as I backup first, what could possible go wrong?  ;)
"It builds... ship it!"

 

TinyPortal © 2005-2018