Recent

Author Topic: fpc cannot installed on MacOS Catalina  (Read 6424 times)

Igor Kokarev

  • Full Member
  • ***
  • Posts: 229
Re: fpc cannot installed on MacOS Catalina
« Reply #15 on: March 28, 2020, 05:37:11 pm »
Thanks for your replies!

Should we install official FPC on Catalina or "a" version?

fpc-3.0.4-macos-x86_64-laz.pkg
or
fpc-3.0.4a.intel-macosx.dmg

We tried both versions.

Now we had to reinstall Mojave to install fpc + Lazarus and then upgrade to Catalina.

mischi

  • Full Member
  • ***
  • Posts: 138
Re: fpc cannot installed on MacOS Catalina
« Reply #16 on: March 28, 2020, 09:47:17 pm »
Did you try an installation through MacPorts? That is supposed to work.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1014
  • Former Delphi 1-7, 10.2 User
Re: fpc cannot installed on MacOS Catalina
« Reply #17 on: March 28, 2020, 11:44:34 pm »
Thanks for your replies!

Should we install official FPC on Catalina or "a" version?

fpc-3.0.4-macos-x86_64-laz.pkg
or
fpc-3.0.4a.intel-macosx.dmg

We tried both versions.

If you download the three .pkg files for the macOS Installer from the Lazarus macOS 64 bit directory on SourceForge as I advised, "it just works" on Catalina.

I have done it. There were no issues. The instructions on the Wiki that I pointed you to (and that I updated) were the exact steps I followed. The installation was successful.

Bear in mind, you have to follow the instructions exactly. The order of the steps is critical as mentioned in the instructions.
o Lazarus v2.1.0 r63871, FPC v3.3.1 r47164, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware Fusion VM)
o FPC 3.0.4, FreeBSD 12.2-STABLE r365646 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 20.04 (Parallels VM)

Rainbow6

  • New Member
  • *
  • Posts: 18
Re: fpc cannot installed on MacOS Catalina
« Reply #18 on: March 29, 2020, 09:40:06 pm »
Hi,

I never use the official packages for macOS - I always install FPC and Lazarus using FpcUpDeluxe.

I also made some instructions - but sadly only in German - but maybe Google Translate will help you, and screenshots and commands are universal anyway.

-> https://qpgmr.de/freepascal-lazarus-catalina

HTH
Daniel

Igor Kokarev

  • Full Member
  • ***
  • Posts: 229
Re: fpc cannot installed on MacOS Catalina
« Reply #19 on: March 30, 2020, 10:56:07 am »
Can you help me. I decided to upgrade my iMac with Mojave to Catalina 10.15.4 and now I see the following error:

Code: Pascal  [Select][+][-]
  1. ld: file not found: /usr/lib/crt1.10.5.o
  2. An error occurred while linking

xcode 11.0. I tried to delete xcode and install 11.4 with the same result.

Installing command line tools:

Code: Pascal  [Select][+][-]
  1. iMac-mac:~ mac$ sudo xcode-select --install
  2. xcode-select: error: command line tools are already installed, use "Software Update" to install updates
  3.  
  4. iMac-mac:~ mac$ sudo xcodebuild -license accept
  5. xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
« Last Edit: March 30, 2020, 10:57:51 am by Igor Kokarev »

Igor Kokarev

  • Full Member
  • ***
  • Posts: 229
Re: fpc cannot installed on MacOS Catalina
« Reply #20 on: March 30, 2020, 12:35:20 pm »
I found a solution for the error:
Code: Pascal  [Select][+][-]
  1. ld: file not found: /usr/lib/crt1.10.5.o

in /etc/fpc.cfg add a new line:

-XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk

Now it works fine on Catalina.

jovalca

  • Newbie
  • Posts: 4
Re: fpc cannot installed on MacOS Catalina
« Reply #21 on: April 17, 2020, 09:09:41 pm »
Hi All.

Voy a responder en Español, pero seguro que lo podeis entender. He tenido el mismo problema cuando he querido desinstalar lazarus 2.0.6 e instalar lazarus 2.0.8. No he podido volver a instalar FPC 3.0.4 pero si que he conseguido instalar Lazarus IDE y FPC-SRC.

He podido instalar la versión “a” del FPC 3.0.4, siguiendo los pasos de esta página, por si a alguien puede resultarle de ayuda. De momento estoy funcionando con Lazarus 2.0.8 en macOS Catalina.

Aqui el enlace: https://apple.stackexchange.com/questions/375603/catalina-not-allowing-to-change-read-write-permissions-despite-having-sip-disabl

Basicamente, para que deje instalar la version “a” del FPC 3.0.4, hay que deshabilitar el “SIP” de Catalina, siguiendo los pasos:

1.- Restart in Recovery mode (Command-R at startup), open Terminal (from the Utilities menu), and disable SIP filesystem protection with:
csrutil enable --without fs
2.- Restart normally, open Terminal, and remount the root volume for read access:
sudo mount -uw /
3.- Install fpc-3.0.4a.intel-macosx.pkg.
4.- Restart again in Recovery mode (Command-R at startup), open Terminal (from the Utilities menu), and run csrutil enable, then restart again normally.

Espero que pueda ayudar a quien tenga este problema.
Un Saludo.
« Last Edit: April 17, 2020, 09:20:41 pm by jovalca »

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1014
  • Former Delphi 1-7, 10.2 User
Re: fpc cannot installed on MacOS Catalina
« Reply #22 on: April 18, 2020, 03:33:40 am »
No, no, no, no. Please do NOT do that! The system volume is read-only for good reason and there is no valid reason to do this.
o Lazarus v2.1.0 r63871, FPC v3.3.1 r47164, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware Fusion VM)
o FPC 3.0.4, FreeBSD 12.2-STABLE r365646 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 20.04 (Parallels VM)

olly

  • New Member
  • *
  • Posts: 19
Re: fpc cannot installed on MacOS Catalina
« Reply #23 on: April 21, 2020, 02:57:36 am »
...

Ever since Lazarus 2.0.8 has been released installation fails, previously Lazarus 2.0.6 was working without issues on Github actions:
https://github.com/ollydev/SimbaDevelopment/runs/581365015#step:4:306

Both versions 2.0.6 and 2.0.8 now fail, I suspect the 2.0.6 binary was rebuilt and uploaded?

To confirm it wasn't just the Github actions enviorment I tested on a MacBook, where the same error occurs.

Code: [Select]
brandon@Brandons-MacBook-Pro Laz % sudo installer -pkg LazarusIDE-2.0.8-macos-x86_64.pkg -target /
installer: Package name is LazarusIDE
installer: Installing at base path /
installer: The install was successful.


brandon@Brandons-MacBook-Pro Laz % sudo installer -pkg fpc-3.0.4-macos-x86_64-laz.pkg -target /
installer: Package name is fpc-macos-x86-64-laz
installer: Installing at base path /
installer: The install failed. (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. An error occurred while running scripts from the package “fpc-3.0.4-macos-x86_64-laz.pkg”.)


brandon@Brandons-MacBook-Pro Laz % sudo installer -pkg fpc-3.0.4-macos-x86_64-laz.pkg -verbose -target /
installer: Package name is fpc-macos-x86-64-laz
installer: Installing at base path /
installer: Preparing for installation….....
installer: Preparing the disk….....
installer: Preparing fpc-macos-x86-64-laz….....
installer: Waiting for other installations to complete….....
installer: Configuring the installation….....
installer:     
#
installer: Validating packages….....
#
installer: Writing files….....
#
installer: Writing files….....
#
installer: Writing files….....
#
installer: Writing files….....
#
installer: Writing files….....
#
installer: Writing files….....
#
installer: Writing files….....
#
installer: Moving items into place….....
#
installer: Moving items into place….....
#
installer: Moving items into place….....
#
installer: Moving items into place….....
#
installer: Moving items into place….....
#
installer: Moving items into place….....
#
installer: Moving items into place….....
#
installer: Moving items into place….....
installer: Validating packages….....
#
installer: The install failed. (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. An error occurred while running scripts from the package “fpc-3.0.4-macos-x86_64-laz.pkg”.)
brandon@Brandons-MacBook-Pro Laz % sudo installer -pkg fpc-3.0.4-macos-x86_64-laz.pkg -verbose -target /

Install.log:

Code: [Select]
./postinstall: /tmp/PKInstallSandbox.vFZ5uH/Scripts/org.freepascal.pkg.fpc-macos-x86-64-laz.QajxE2/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

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1014
  • Former Delphi 1-7, 10.2 User
Re: fpc cannot installed on MacOS Catalina
« Reply #24 on: April 21, 2020, 06:35:47 am »
Both versions 2.0.6 and 2.0.8 now fail, I suspect the 2.0.6 binary was rebuilt and uploaded?

I just tested on a clean Catalina installation and you are correct :(

However, after making the changes below, despite the failed installation, everything appeared to be working and I could compile programs with the Lazarus IDE:

Code: [Select]
rehash
sudo rm /etc/fpc.cfg
sudo fpcmkcfg -d basepath=/usr/local/lib/fpc/\$fpcversion -o /etc/fpc.cfg
cd /usr/local/bin
sudo ln -s /usr/local/lib/fpc/3.0.4/ppcx64 .
rehash

Note 1: I'm using the tcsh shell, so not bash nor zsh. The rehash may not be required for your shell to pickup new binaries in /usr/local/bin

Note 2: You are supposed to install fpc and fpc-src BEFORE the Lazarus IDE.
o Lazarus v2.1.0 r63871, FPC v3.3.1 r47164, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware Fusion VM)
o FPC 3.0.4, FreeBSD 12.2-STABLE r365646 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 20.04 (Parallels VM)

lelebass

  • New Member
  • *
  • Posts: 36
Re: fpc cannot installed on MacOS Catalina
« Reply #25 on: April 23, 2020, 07:15:15 pm »
I am trying to install Lazarus 2.0.8 x86_64 on macOS Mojave.
I set up a new OS installation from scratch, followed instructions found here:

https://wiki.freepascal.org/Installing_Lazarus_on_macOS

Correctly installed Xcode and tools.

I am stuck at the FPC installation, I downloaded the fpc-3.0.4-macos-x86_64-laz.pkg installer here:

https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/Lazarus%202.0.8/

but the installer fails with this log:

Apr 23 18:45:04 Steves-MacBook-Pro installd[668]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “fpc-3.0.4-macos-x86_64-laz.pkg”." UserInfo={NSFilePath=./postinstall, NSURL=file:///Users/steve/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=An error occurred while running scripts from the package “fpc-3.0.4-macos-x86_64-laz.pkg”.} {
       NSFilePath = "./postinstall";
       NSLocalizedDescription = "An error occurred while running scripts from the package \U201cfpc-3.0.4-macos-x86_64-laz.pkg\U201d.";
       NSURL = "file:///Users/steve/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";
   }

Daniele

woodle

  • Newbie
  • Posts: 1
Re: fpc cannot installed on MacOS Catalina
« Reply #26 on: April 23, 2020, 08:56:23 pm »
I have the same problem. Did you find a solution or can I help in any kind?

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1014
  • Former Delphi 1-7, 10.2 User
Re: fpc cannot installed on MacOS Catalina
« Reply #27 on: April 24, 2020, 04:04:12 am »
Does my workaround two posts above not work for you?
o Lazarus v2.1.0 r63871, FPC v3.3.1 r47164, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware Fusion VM)
o FPC 3.0.4, FreeBSD 12.2-STABLE r365646 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 20.04 (Parallels VM)

lelebass

  • New Member
  • *
  • Posts: 36
Re: fpc cannot installed on MacOS Catalina
« Reply #28 on: April 24, 2020, 08:11:48 am »
Thank you Trev,
when I tried your workaround yesterday I should have make a mistake, this morning I tried again and it works. If I try to call fpc from command line now it responds.

I try now to proceed with fpc-src and Lazarus installation.

Ciao,
Daniele


lelebass

  • New Member
  • *
  • Posts: 36
Re: fpc cannot installed on MacOS Catalina
« Reply #29 on: April 24, 2020, 08:27:38 am »
Thank you Trev,
when I tried your workaround yesterday I should have make a mistake, this morning I tried again and it works. If I try to call fpc from command line now it responds.

I try now to proceed with fpc-src and Lazarus installation.

Ciao,
Daniele

I was able to install fpc-src and Lazarus. Despite an error message when launching Lazarus (appearing only the first time Lazarus is opened) everything else looks fine and I was able to compile a simple Cocoa application.

Ciao,
Daniele

 

TinyPortal © 2005-2018