Lazarus

Installation => macOS / Mac OS X => Topic started by: Grahame Grieve on October 15, 2020, 01:02:11 pm

Title: Mac install
Post by: Grahame Grieve on October 15, 2020, 01:02:11 pm
Installing Lazarus on MacOS remains in the too hard realm for me. I don't know why it's so hard, but I don't know OSX well.

I tried 2 different ways to install.

Downloading the binaries from sourceforge
------------------------------------------------

This worked well, per the instructions on the wiki, and then lazarus runs fine (used the FPC binaries from 2.0.11 release, and 2.0.10 lazarus, since 2.0.11 doesn't seem to exist). The first thing I do is install the anchorDocking and AnchorDockingDsgn packages. The IDE dutifully goes off and rebuilds, and then restarts, with docking (though only once I click on it somewhere). but when it restarts, it's in this funny mode where it doesn't get it's menu - it's running, but I get the finder menu instead. So when i close that and reopen lazarus, then I get the original lazarus, without docking.

Tried that cycle several times, and got the iDE to rebuild itself. no change.... beats me.

FPCUPdeluxe
--------------
ok. try with FPCUpdeluxe, using stable.git for both versions. Builds no problems. sweet.

Lazarus won't run, using the icon it put in the applications folder:

"You can't open the applciation "lazarus" because it is not supported on this type of Mac."

And yes, it is the 64bit version. It does run, actually, if I run the "lazarus" file in the directory I installed it in, next to the lazarus app. but... that runs in the terminal, and I don't get any menus (just get the terminal menu). I can't figure out how to tell MacOS to run the executable properly.

At this point, I'm stuck. I don't think I did anything stupid...

Title: Re: Mac install
Post by: Grahame Grieve on October 15, 2020, 01:03:01 pm
oh: brand new Caralina 10.15.7 on a mac mini
Title: Re: Mac install
Post by: DonAlfredo on October 15, 2020, 01:21:32 pm
Never seen this error message with FPC and Lazarus trunk.
I will try stable in my Mac VM 10.15.7.
Title: Re: Mac install
Post by: trev on October 15, 2020, 01:23:00 pm
The first thing I do is install the anchorDocking and AnchorDockingDsgn packages. The IDE dutifully goes off and rebuilds, and then restarts, with docking (though only once I click on it somewhere). but when it restarts, it's in this funny mode where it doesn't get it's menu - it's running, but I get the finder menu instead. So when i close that and reopen lazarus, then I get the original lazarus, without docking.

Lazarus is installed in a read-only directory for a user/admin. When you rebuild Lazarus, it notices it cannot write to its directory and so it instead writes the new version to ~/.lazarus. You need to start that new version and not the one in the Applications folder.

Yes, it's annoying and I logged it in the BugTracker here (https://bugs.freepascal.org/view.php?id=37753).

One solution is to download the Lazarus source with svn or git into your home directory and compile it yourself which is what I do and why I never noticed the issue for more than a year.

Quote
"You can't open the applciation "lazarus" because it is not supported on this type of Mac."

I have never used FPCUPDeluxe, but I suspect that it might be because the application is not signed or notarized, you need to right-click on it and choose Open.

Quote
And yes, it is the 64bit version. It does run, actually, if I run the "lazarus" file in the directory I installed it in, next to the lazarus app. but... that runs in the terminal, and I don't get any menus (just get the terminal menu). I can't figure out how to tell MacOS to run the executable properly.

In macOS you need to open the app bundle to run an application - so in a terminal you would type something like "open /Applications/lazarus.app"
Title: Re: Mac install
Post by: Grahame Grieve on October 15, 2020, 01:28:33 pm
I did right click and choose 'open' - didn't make any difference. And running from the terminal ran it fine, but it doesn't get a menu..

I'll reinstall from the web site again and try
Title: Re: Mac install
Post by: trev on October 15, 2020, 01:31:15 pm
And running from the terminal ran it fine, but it doesn't get a menu..

I just tried "open /Applications/lazarus.app" from a terminal on Catalina 10.15.7 on a 2018 Mac mini and it opened Lazarus complete with menus.
Title: Re: Mac install
Post by: Grahame Grieve on October 15, 2020, 01:32:32 pm
trunk.git fails for me:

Found valid git application.
fpcupdeluxe: Executing: /usr/bin/git status --porcelain (working dir: /Users/grahamegrieve/lazarus/fpcsrc)
fpcupdeluxe: Executing: /usr/bin/git config remote.origin.url (working dir: /Users/grahamegrieve/lazarus/fpcsrc)
fpcupdeluxe: ERROR: FPCNativeInstaller (CheckModule: FPC): sources error (URL mismatch).
fpcupdeluxe: ERROR: FPCNativeInstaller (CheckModule: FPC): desired URL=https://github.com/graemeg/freepascal.git/
fpcupdeluxe: ERROR: FPCNativeInstaller (CheckModule: FPC): source URL=https://github.com/graemeg/freepascal.git/
Title: Re: Mac install
Post by: DonAlfredo on October 15, 2020, 01:38:59 pm
For sure !
Quote
sources error (URL mismatch).
You have to install in another directory.
I have an install of fixes in a directory named fixes.
I have an install of trunk in a directory named trunk.
I am making an install of stable in a directory named stable.
Those three directories all have a directory named up, if which fpcupdeluxe is placed. So, every install has its own fpcupdeluxe. Not chances of messing around with settings.

Edit:
The screenshot from Windows shows my setup with 7 different combo's.
Title: Re: Mac install
Post by: Grahame Grieve on October 15, 2020, 01:50:56 pm
open lazarus.app for the App that fpcupdeluxe installs:

The application cannot be opened because it has an incorrect executable format

Title: Re: Mac install
Post by: Grahame Grieve on October 15, 2020, 02:33:09 pm
So I don't know if this is an install issue or not but if I give my program a working directory in run..parameters, shouldn't that value turn up in getCurrentDir at run time?
Title: Re: Mac install
Post by: DonAlfredo on October 15, 2020, 03:39:14 pm
Quote
The application cannot be opened because it has an incorrect executable format
Confirmed. Looking into this.
Title: Re: Mac install
Post by: DonAlfredo on October 15, 2020, 04:28:13 pm
Stable up and running on 10.15, installed with fpcupdeluxe. See screenshot.
The problem seems to be the Info.plist inside the lazarus.app and startlazarus.app files/directories. Looking into it.
Title: Re: Mac install
Post by: DonAlfredo on October 15, 2020, 09:21:17 pm
Update.
It seems that latest Mac OSX versions do not like the textual links that are included inside lazarus.app and startlazarus.app.
I have uploaded a new version of fpcupdeluxe : 1.8.2c . Download link included.
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/1.8.2c/fpcupdeluxe-x86_64-darwin-cocoa.zip
This version will replace the textual links with real symlinks. That should work better !
Title: Re: Mac install
Post by: Grahame Grieve on October 15, 2020, 09:59:12 pm
Awesome. What was the exact change you made in the plist?
Title: Re: Mac install
Post by: lproven on October 16, 2020, 01:31:42 pm
Installing Lazarus on MacOS remains in the too hard realm for me. I don't know why it's so hard, but I don't know OSX well.

I too had _significant_ problems getting it installed and working as an upgrade from a 2017 version on macOS 10.4 "Mojave".

I am not sure if the information is relevant to Catalina though -- I refuse to allow Catalina near any of my Macs (yet).

In the end, I got some help from the mac-pascal mailing list, and some guidance from the FreePascal Reddit.

I have some suggestions for the Mac section of the installation instructions. Who should I talk to about that?
Title: Re: Mac install
Post by: trev on October 17, 2020, 01:38:30 am
I have some suggestions for the Mac section of the installation instructions. Who should I talk to about that?

I'm the last to update the Wiki macOS installation instructions for the official downloads, the svn/git source downloads and Lazarus Compatibility Matrix, but not the FPCUPdeluxe/Fink/MacPorts installation options.

It seems from the mailing list that your problem was that you failed to download the FPC source package. I modified the instructions to say (additions in bold):

Quote
Download the Free Pascal Compiler (FPC) binaries and FPC source packages from the Lazarus IDE file area (https://sourceforge.net/projects/lazarus/files/). When you arrive at that file area, choose the correct version of your operating system. The vast majority of Mac users should now choose the 64 bit packages in the Lazarus macOS x86-64 directory.  [...]

Perhaps that will help to ensure that both the binaries package AND the source package are downloaded.
TinyPortal © 2005-2018