Recent

Author Topic: Freepascal install on macOS 10.15 Catalina  (Read 17428 times)

AnthonyTekatch

  • Jr. Member
  • **
  • Posts: 78
Re: Freepascal install on macOS 10.15 Catalina
« Reply #15 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.

maxnd

  • Jr. Member
  • **
  • Posts: 65
Re: Freepascal install on macOS 10.15 Catalina
« Reply #16 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.  :(

AnthonyTekatch

  • Jr. Member
  • **
  • Posts: 78
Re: Freepascal install on macOS 10.15 Catalina
« Reply #17 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?

maxnd

  • Jr. Member
  • **
  • Posts: 65
Re: Freepascal install on macOS 10.15 Catalina
« Reply #18 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.

AnthonyTekatch

  • Jr. Member
  • **
  • Posts: 78
Re: Freepascal install on macOS 10.15 Catalina
« Reply #19 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.

maxnd

  • Jr. Member
  • **
  • Posts: 65
Re: Freepascal install on macOS 10.15 Catalina
« Reply #20 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!

AnthonyTekatch

  • Jr. Member
  • **
  • Posts: 78
Re: Freepascal install on macOS 10.15 Catalina
« Reply #21 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

maxnd

  • Jr. Member
  • **
  • Posts: 65
Re: Freepascal install on macOS 10.15 Catalina
« Reply #22 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.

AnthonyTekatch

  • Jr. Member
  • **
  • Posts: 78
Re: Freepascal install on macOS 10.15 Catalina
« Reply #23 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.

maxnd

  • Jr. Member
  • **
  • Posts: 65
Re: Freepascal install on macOS 10.15 Catalina
« Reply #24 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"
« Last Edit: November 26, 2019, 09:02:46 am by maxnd »

AnthonyTekatch

  • Jr. Member
  • **
  • Posts: 78
Re: Freepascal install on macOS 10.15 Catalina
« Reply #25 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.

maxnd

  • Jr. Member
  • **
  • Posts: 65
Re: Freepascal install on macOS 10.15 Catalina
« Reply #26 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?

AnthonyTekatch

  • Jr. Member
  • **
  • Posts: 78
Re: Freepascal install on macOS 10.15 Catalina
« Reply #27 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/

maxnd

  • Jr. Member
  • **
  • Posts: 65
Re: Freepascal install on macOS 10.15 Catalina
« Reply #28 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

AnthonyTekatch

  • Jr. Member
  • **
  • Posts: 78
Re: Freepascal install on macOS 10.15 Catalina
« Reply #29 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.

 

TinyPortal © 2005-2018