Lazarus

Installation => macOS / Mac OS X => Topic started by: JLucB on October 09, 2019, 11:29:43 am

Title: Freepascal install on macOS 10.15 Catalina
Post by: JLucB on October 09, 2019, 11:29:43 am
Freepascal installer is not working on macOS 10.15 Catalina.

macOS is now installed on a read-only partition and won't allow Freepascal installer to proceed. Is there an update scheduled soon ?
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: Valderrama on October 09, 2019, 04:40:07 pm
Same here. After installing Catalina, my existing install of Lazarus for Mac (2.0.2) was moved to a relocated items folder under shared, from where it no longer works. I look forward to an updated version of Lazarus that will work under Catalina. Thanks for all the hard work :)
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: willbprog9933 on October 09, 2019, 07:15:21 pm
I'm also waiting with bated breath for the 64-bit release of Free Pascal and Lazarus.  :D  Catalina has messed up a lot of things for me, including MacPorts (no Catalina version available as of this writing).
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: mischi on October 09, 2019, 10:56:28 pm
I'm also waiting with bated breath for the 64-bit release of Free Pascal and Lazarus.  :D  Catalina has messed up a lot of things for me, including MacPorts (no Catalina version available as of this writing).
As much as I know, MacPorts is already partly on Catalina and should be completely soon. I haven't updated so far, but fpc 64bit should be fine. If not, report to me and I will try to take care of it. I am testing lazarus from the fixes branch of 2.0. The cocoa 64bit based lazarus can be compiled. The MacPorts port is submitted, but under review, which may take some time.
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: JLucB on October 14, 2019, 10:23:34 am
Any update on this issue ?
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: marcov on October 14, 2019, 12:49:09 pm
Isn't it a matter of simply turning off gatekeeper?
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: JLucB on October 14, 2019, 02:40:32 pm
Isn't it a matter of simply turning off gatekeeper?

Unfortunately no... The issue is that FreePascal installer tries to install FreePascal components in the OS partition that is a read-only one with macOS Catalina...
FreePascal installer must be modified accordingly.
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: Dan3468298 on October 14, 2019, 09:59:19 pm
Isn't it a matter of simply turning off gatekeeper?

Unfortunately no... The issue is that FreePascal installer tries to install FreePascal components in the OS partition that is a read-only one with macOS Catalina...
FreePascal installer must be modified accordingly.

Well, I am on Catalina now.  When will the FP Installer work on Catalina?
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: MISV on October 19, 2019, 02:17:12 am
I recall https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases (https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases) installs everything into subfolders to the installation (and configures project file accordingly) ... Maybe a solution?

Albeit in Lazarus I have needed to add this in "project options" - "custom options" ... (I do not know if it is still necessary when using FPCUpDeluxe)

Code: Pascal  [Select][+][-]
  1. -WM10.8
  2. -FD/Library/Developer/CommandLineTools/usr/bin

Note: I am not on Catalina yet, so not 100% sure if the above still works
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: JLucB on October 22, 2019, 12:31:00 am
I recall https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases (https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases) installs everything into subfolders to the installation (and configures project file accordingly) ... Maybe a solution?

Albeit in Lazarus I have needed to add this in "project options" - "custom options" ... (I do not know if it is still necessary when using FPCUpDeluxe)

Code: Pascal  [Select][+][-]
  1. -WM10.8
  2. -FD/Library/Developer/CommandLineTools/usr/bin

Note: I am not on Catalina yet, so not 100% sure if the above still works

Seems like someone already tried and reported an issue "Cannot install on Mac Os Catalina" : https://github.com/LongDirtyAnimAlf/fpcupdeluxe/issues/147 (https://github.com/LongDirtyAnimAlf/fpcupdeluxe/issues/147)
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: drc007 on November 12, 2019, 03:23:54 pm
Isn't it a matter of simply turning off gatekeeper?

Unfortunately no... The issue is that FreePascal installer tries to install FreePascal components in the OS partition that is a read-only one with macOS Catalina...
FreePascal installer must be modified accordingly.

Well, I am on Catalina now.  When will the FP Installer work on Catalina?



I'd also be interested in an update?
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: AnthonyTekatch on November 12, 2019, 03:45:02 pm
I'd also be interested in an update?

Thanks to Mattias Gaertner, this works now for me:
  https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/


Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: madref on November 20, 2019, 10:17:03 am
Have you tried to install the fpc-3.0.4a.intel-macosx.dmg ?That's what helped me on MacOS Majave
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: AnthonyTekatch on November 20, 2019, 11:51:27 am
Have you tried to install the fpc-3.0.4a.intel-macosx.dmg ?That's what helped me on MacOS Majave
The title of this subject should be changed to [SOLVED].

The link I provided above (https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/) has everything fixed for Catalina (including the FPC files).
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: maxnd on November 25, 2019, 05:42:34 pm
Hi, I tried to install on Catalina the packages from the link you provided, https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/ (https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/). The installation of fpc-src-3.0.4-laz.pkg in /usr/local/share/fpcsrc/3.0.4. was fine, but that of fpc-3.0.4-macos-x86_64-laz.pkg in /usr/local/lib/fpc/3.0.4 raised an error at the end, even if all seemed to be installed properly. Anyway, when I try to compile something, this error is raised (translated by Italian):
Code: Pascal  [Select][+][-]
  1. Fatal: Impossible to find FPimage used by InterfaceBase of package LCLBase.
If I try to open and compile LCL Base this error is raised:
Code: Pascal  [Select][+][-]
  1. lclproc.pas(28,18) Fatal: Impossible to find MacOSAll used by LCLProc from the package LCLBase.
So what's wrong? Does this mean that the fpc are not really installed properly?

Thanks for help!
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: AnthonyTekatch on November 25, 2019, 06:12:34 pm
Code: Pascal  [Select][+][-]
  1. Fatal: Impossible to find FPimage used by InterfaceBase of package LCLBase.
Code: Pascal  [Select][+][-]
  1. lclproc.pas(28,18) Fatal: Impossible to find MacOSAll used by LCLProc from the package LCLBase.

I did not get that error, but I found that starting with clean Lazarus settings might help:
  Try renaming the ~/.lazarus folder then restart Lazarus.
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: maxnd on November 25, 2019, 06:44:12 pm
Quote
Try renaming the ~/.lazarus folder then restart Lazarus.
I tried, I even reinstalled Lazarus, but the compiler raises the same error.  :(
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: AnthonyTekatch on November 25, 2019, 06:52:23 pm
... The installation of fpc-src-3.0.4-laz.pkg in /usr/local/share/fpcsrc/3.0.4. was fine, but that of fpc-3.0.4-macos-x86_64-laz.pkg in /usr/local/lib/fpc/3.0.4 raised an error at the end, ...

Can you provide that error from the installation?
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: maxnd on November 25, 2019, 08:03:57 pm
No, because the installer gives no hint, and if I install the package with
Code: Pascal  [Select][+][-]
  1. sudo installer -pkg fpc-3.0.4-macos-x86_64-laz.pkg -target /
it doesn't work, and it gives just a generic message of error.
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: AnthonyTekatch on November 25, 2019, 08:22:00 pm
No, because the installer gives no hint, and if I install the package with
Code: Pascal  [Select][+][-]
  1. sudo installer -pkg fpc-3.0.4-macos-x86_64-laz.pkg -target /
it doesn't work, and it gives just a generic message of error.

The following file should provide some more details, please check:
  /var/log/install.log

Paste the associated section back here, maybe someone will recognize the problem.
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: maxnd on November 25, 2019, 08:36:17 pm
Ops, that's the log of the failed installation. The error it raises should be Failed to execute "ppcx64".

Code: [Select]
2019-11-25 20:26:28+01 Mac-mini installd[572]: PackageKit: ----- Begin install -----
2019-11-25 20:26:28+01 Mac-mini installd[572]: PackageKit: request=PKInstallRequest <1 packages, destination=/>
2019-11-25 20:26:28+01 Mac-mini installd[572]: PackageKit: packages=(
    "<null>"
)
2019-11-25 20:26:28+01 Mac-mini installd[572]: PackageKit: Set reponsibility for install to 80755
2019-11-25 20:26:28+01 Mac-mini installd[572]: PackageKit: Extracting file:///Users/massimo/Downloads/fpc-3.0.4-macos-x86_64-laz.pkg#fpc-macos-x86-64-laz.pkg (destination=/Library/InstallerSandboxes/.PKInstallSandboxManager/8AC044D8-FC79-4AA0-98F7-47BA3A88D138.activeSandbox/Root, uid=0)
2019-11-25 20:26:29+01 Mac-mini installd[572]: PackageKit: prevent user idle system sleep
2019-11-25 20:26:29+01 Mac-mini installd[572]: PackageKit: suspending backupd
2019-11-25 20:26:29+01 Mac-mini installd[572]: PackageKit: Executing script "./preinstall" in /private/tmp/PKInstallSandbox.XMKLhI/Scripts/org.freepascal.pkg.fpc-macos-x86-64-laz.7VXwMg
2019-11-25 20:26:29+01 Mac-mini install_monitor[80759]: Temporarily excluding: /Applications, /Library, /System, /bin, /private, /sbin, /usr
2019-11-25 20:26:30+01 Mac-mini installd[572]: PackageKit: Using trashcan path /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/PKInstallSandboxTrash/8AC044D8-FC79-4AA0-98F7-47BA3A88D138.sandboxTrash for sandbox /Library/InstallerSandboxes/.PKInstallSandboxManager/8AC044D8-FC79-4AA0-98F7-47BA3A88D138.activeSandbox
2019-11-25 20:26:30+01 Mac-mini installd[572]: PackageKit: Shoving /Library/InstallerSandboxes/.PKInstallSandboxManager/8AC044D8-FC79-4AA0-98F7-47BA3A88D138.activeSandbox/Root (1 items) to /
2019-11-25 20:26:31+01 Mac-mini installd[572]: PackageKit: Executing script "./postinstall" in /private/tmp/PKInstallSandbox.XMKLhI/Scripts/org.freepascal.pkg.fpc-macos-x86-64-laz.7VXwMg
2019-11-25 20:26:31+01 Mac-mini installd[572]: ./postinstall: /tmp/PKInstallSandbox.XMKLhI/Scripts/org.freepascal.pkg.fpc-macos-x86-64-laz.7VXwMg/postinstall: line 8: /usr/local/lib/fpc/Error: ppcx64 can't be executed, error message: Failed to execute "ppcx64", error code: 127/samplecfg: No such file or directory
2019-11-25 20:26:31+01 Mac-mini installd[572]: ./postinstall: /tmp/PKInstallSandbox.XMKLhI/Scripts/org.freepascal.pkg.fpc-macos-x86-64-laz.7VXwMg/postinstall: line 13: ///usr/local/lib/fpc/Error: ppcx64 can't be executed, error message: Failed to execute "ppcx64", error code: 127/ide/text/fp.cfg.tmp: No such file or directory
2019-11-25 20:26:31+01 Mac-mini installd[572]: ./postinstall: cat: ///usr/local/lib/fpc/Error: ppcx64 can't be executed, error message: Failed to execute "ppcx64", error code: 127/ide/text/fp.cfg: No such file or directory
2019-11-25 20:26:31+01 Mac-mini installd[572]: ./postinstall: /tmp/PKInstallSandbox.XMKLhI/Scripts/org.freepascal.pkg.fpc-macos-x86-64-laz.7VXwMg/postinstall: line 14: ///usr/local/lib/fpc/Error: ppcx64 can't be executed, error message: Failed to execute "ppcx64", error code: 127/ide/text/fp.cfg: No such file or directory
2019-11-25 20:26:31+01 Mac-mini installd[572]: ./postinstall: rm: ///usr/local/lib/fpc/Error: ppcx64 can't be executed, error message: Failed to execute "ppcx64", error code: 127/ide/text/fp.cfg.tmp: No such file or directory
2019-11-25 20:26:31+01 Mac-mini install_monitor[80759]: Re-included: /Applications, /Library, /System, /bin, /private, /sbin, /usr
2019-11-25 20:26:31+01 Mac-mini installd[572]: PackageKit: releasing backupd
2019-11-25 20:26:31+01 Mac-mini installd[572]: PackageKit: allow user idle system sleep
2019-11-25 20:26:31+01 Mac-mini installd[572]: PackageKit: Cleared responsibility for install from 80755.
2019-11-25 20:26:31+01 Mac-mini installd[572]: PackageKit: Cleared permissions on Installer.app
2019-11-25 20:26:31+01 Mac-mini installd[572]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "Si è verificato un errore durante l'esecuzione degli script dal pacchetto “fpc-3.0.4-macos-x86_64-laz.pkg.”" UserInfo={NSFilePath=./postinstall, NSURL=file:///Users/massimo/Downloads/fpc-3.0.4-macos-x86_64-laz.pkg#fpc-macos-x86-64-laz.pkg, PKInstallPackageIdentifier=org.freepascal.pkg.fpc-macos-x86-64-laz, NSLocalizedDescription=Si è verificato un errore durante l'esecuzione degli script dal pacchetto “fpc-3.0.4-macos-x86_64-laz.pkg.”} {
    NSFilePath = "./postinstall";
    NSLocalizedDescription = "Si \U00e8 verificato un errore durante l'esecuzione degli script dal pacchetto \U201cfpc-3.0.4-macos-x86_64-laz.pkg.\U201d";
    NSURL = "file:///Users/massimo/Downloads/fpc-3.0.4-macos-x86_64-laz.pkg#fpc-macos-x86-64-laz.pkg";
    PKInstallPackageIdentifier = "org.freepascal.pkg.fpc-macos-x86-64-laz";
}
2019-11-25 20:26:31+01 Mac-mini installd[572]: PackageKit: Running idle tasks
2019-11-25 20:26:31+01 Mac-mini Installer[80755]: install:didFailWithError:Error Domain=PKInstallErrorDomain Code=112 "Si è verificato un errore durante l'esecuzione degli script dal pacchetto “fpc-3.0.4-macos-x86_64-laz.pkg.”" UserInfo={NSFilePath=./postinstall, NSURL=file:///Users/massimo/Downloads/fpc-3.0.4-macos-x86_64-laz.pkg#fpc-macos-x86-64-laz.pkg, PKInstallPackageIdentifier=org.freepascal.pkg.fpc-macos-x86-64-laz, NSLocalizedDescription=Si è verificato un errore durante l'esecuzione degli script dal pacchetto “fpc-3.0.4-macos-x86_64-laz.pkg.”}
2019-11-25 20:26:31+01 Mac-mini installd[572]: PackageKit: Removing client PKInstallDaemonClient pid=80755, uid=501 (/System/Library/CoreServices/Installer.app/Contents/MacOS/Installer)
2019-11-25 20:26:31+01 Mac-mini installd[572]: PackageKit: Done with sandbox removals
2019-11-25 20:26:32+01 Mac-mini Installer[80755]: Install failed: Installer ha incontrato un errore che ha impedito l'installazione. Contatta il produttore del software per ottenere assistenza.

Thanks!
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: AnthonyTekatch on November 25, 2019, 10:28:31 pm
... The error it raises should be Failed to execute "ppcx64".

Do you have ppcx64 anywhere on your system. Mine is a symlink:

/usr/local/bin/ppcx64 -> ../lib/fpc/3.0.4/ppcx64

Maybe this will help.
https://forum.lazarus.freepascal.org/index.php?topic=21533.0
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: maxnd on November 25, 2019, 10:47:39 pm
I've ppcx64 in /lib/fpc/3.0.4/ppcx64 and I've added the link in /usr/local/bin/ppcx64, but this doesn't fix the problem.
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: AnthonyTekatch on November 25, 2019, 11:48:44 pm
I've ppcx64 in /lib/fpc/3.0.4/ppcx64 and I've added the link in /usr/local/bin/ppcx64, but this doesn't fix the problem.

What happens when you type ppcx64 in a terminal window?

Mine executes the program and shows a bunch of help pages.
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: maxnd on November 26, 2019, 06:58:58 am
The same happens to me:
Code: [Select]
massimo@Mac-mini 3.0.4 % ./ppcx64
Free Pascal Compiler version 3.0.4 [2019/11/01] for x86_64
./ppcx64 [options] <inputfile> [options]
[etc]

Anyway, if I try to compile Lazarus, this error is raised:
Code: [Select]
massimo@Mac-mini Lazarus % make LCL_PLATFORM=cocoa CPU_TARGET=x86_64 bigide
Makefile:214: *** The Makefile doesn't support target x86_64-executed,, please run fpcmake first.  Stop.

If I run fpcmake, this other error is raised:
Code: [Select]
massimo@Mac-mini Lazarus % fpcmake
Processing Makefile.fpc
Error: Target "darwin", package "rtl" not found

If I set the directory of fpc in this way
Code: [Select]
export FPCDIR=/usr/local/lib/fpc/3.0.4then the error comes to be
Code: [Select]
massimo@Mac-mini 3.0.4 % fpcmake                               
Processing Makefile.fpc
 x86_64-darwin requires:
 Writing Makefile
Error: Unable to create file "Makefile"
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: AnthonyTekatch on November 26, 2019, 12:58:37 pm
The same happens to me:
Code: [Select]
massimo@Mac-mini 3.0.4 % ./ppcx64
Free Pascal Compiler version 3.0.4 [2019/11/01] for x86_64
./ppcx64 [options] <inputfile> [options]
[etc]

Why did you have to go to that directory to execute ppcx64?

Can't you just execute it from any directory? which is what the installation routine is probably trying to do.
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: maxnd on November 26, 2019, 01:01:47 pm
Good point.  :) No, I cannot execute ppcx64 from any directory. How can I insert its path in macOS default directories so that I can run it from everywhere?
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: AnthonyTekatch on November 26, 2019, 01:41:24 pm
Good point.  :) No, I cannot execute ppcx64 from any directory. How can I insert its path in macOS default directories so that I can run it from everywhere?

Type env in the command line and one of the lines should look like this:

Code: Pascal  [Select][+][-]
  1. PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

I'm not sure why your PATH is not set like mine, but maybe this link will help:
  https://www.architectryan.com/2012/10/02/add-to-the-path-on-mac-os-x-mountain-lion/
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: maxnd on November 26, 2019, 01:52:05 pm
OK, I added the path with nano /etc/paths, and even env shows it. Now I can run ppcx64 from anywhere The error on fpcmake is the same, while trying to recompile Lazarus, with or wihthout sudo, using
Code: [Select]
massimo@Mac-mini Lazarus % make LCL_PLATFORM=cocoa CPU_TARGET=x86_64 bigideraises the error
Code: [Select]
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C packager/registration
/bin/rm -f ../units/x86_64-darwin/fcllaz.ppu
/usr/local/lib/fpc/3.0.4/ppcx64 -MObjFPC -Scghi -O1 -g -gl -l -vewnhibq -gw -Fu. -Fu/usr/local/lib/fpc/3.0.4/units/x86_64-darwin/rtl -FE. -FU../units/x86_64-darwin -dx86_64 fcllaz.pas
Hint: (11030) Start of reading config file /etc/fpc.cfg
Note: (11005) No option inside /etc/fpc.cfg config file
Free Pascal Compiler version 3.0.4 [2019/11/01] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
(1002) Target OS: Darwin for x86_64
(3104) Compiling fcllaz.pas
/Library/Lazarus/packager/registration/fcllaz.pas(11,3) Fatal: (10022) Can't find unit db used by fcllaz
Fatal: (1018) Compilation aborted
make[1]: *** [fcllaz.ppu] Error 1
make: *** [registration] Error 2
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: AnthonyTekatch on November 26, 2019, 02:43:56 pm
OK, I added the path with nano /etc/paths, and even env shows it. Now I can run ppcx64 from anywhere The error on fpcmake is the same, while trying to recompile Lazarus, with or wihthout sudo, using
Code: [Select]
massimo@Mac-mini Lazarus % make LCL_PLATFORM=cocoa CPU_TARGET=x86_64 bigide

Do you have to execute Lazarus like that from the command line?

I just downloaded the files using the browser and click on them from the downloads folder in this sequence: fpcsrc, fpc, lazarus.

You will have to go to the systems preferences - security to allow each one to be installed since they are not sanctioned by Apple.

The result gives a Lazarus icon in the Applications folder that can just be clicked to start.
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: maxnd on November 26, 2019, 05:01:01 pm
Of course I installed the same packages, many times, but when I start Lazarus the compiler raises the error
Code: [Select]
Fatal: Impossible to find FPimage used by InterfaceBase of package LCLBase. A hint in the message windows says that the compiler cannot find the .ppu files of the unites, but those files are properly installed in
Code: [Select]
/usr/local/lib/fpc/3.0.4/units/x86_64-darwinand the path of the fpc source is correctely set as
Code: [Select]
/usr/local/lib/fpc/3.0.4
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: AnthonyTekatch on November 26, 2019, 05:54:29 pm
I'm stumped right now.

Maybe you could try asking on the mailing list, the package maintainer frequents that.
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: AnthonyTekatch on November 30, 2019, 11:51:46 am
Of course I installed the same packages, many times, but when I start Lazarus the compiler raises the error

This mailing list post may help you (fixed version of the macOS 64bit fpc installer):
https://lists.lazarus-ide.org/pipermail/lazarus/2019-November/237397.html

https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/
Title: Re: Freepascal install on macOS 10.15 Catalina
Post by: maxnd on November 30, 2019, 01:47:41 pm
Quote
This mailing list post may help you (fixed version of the macOS 64bit fpc installer):
Actually this version of fps works smoothly on my macOS Catalina, and Lazarus as well! Thanks to everybody for your great support!
TinyPortal © 2005-2018