Recent

Author Topic: Free Pascal unable to install in Mac OS X Mojave 10.14.5  (Read 2189 times)

amtenorio

  • Newbie
  • Posts: 3
Free Pascal unable to install in Mac OS X Mojave 10.14.5
« on: June 26, 2019, 05:14:12 pm »
When installing Lazarus last version (2.0.2) in a new Mac-Mini computer with Mojave OS X 10.14.5 and XCode 10.2.1 with the command line tools installed (The Xcode-select -v command shows version 2354)  I am getting the next message when installing fpc-3.0.4.intel-macosx.dmg: "Free Pascal Compiler Intel 3.0.4 can not be installed in this disk. You have to install Xcode and its command line tools before installing this package"
But as I previously mentioned, Xcode and the the command line tools were already installed. In fact if I run the command: xcode-select --install, from the terminal, the next message is displayed: "xcode-select: error: command line tools are already installed, use "Software Update" to install updates".
The computer has been restarted, but I am not able to install fpc. The Lazarus package and fpc-src are able to install without problems.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 659
Re: Free Pascal unable to install in Mac OS X Mojave 10.14.5
« Reply #1 on: June 26, 2019, 08:15:30 pm »
You have to use the FPC 3.0.4a installer to be able to install on macOS 10.14. It is the current version available on the FPC download page: https://www.freepascal.org/down/i386/macosx.var

Where did you download your installer from?

trev

  • Full Member
  • ***
  • Posts: 214
  • Former Delphi 7 and Delphi 10.2 User
Re: Free Pascal unable to install in Mac OS X Mojave 10.14.5
« Reply #2 on: June 27, 2019, 01:24:42 am »
I installed Lazarus 2.02 and FPC 3.04 on macOS 10.14.5 with no issues. I have Xcode 9.41 and 10.2.1 installed (Xcode-941.app - renamed - needed for Delphi Tokyo).

xcode-select -p shows I'm using 10.2.1 (/Applications/Xcode.app/Contents/Developer).

I've had no Xcode-related issues.

I followed the installation instruction on the Wiki at https://wiki.lazarus.freepascal.org/Installing_Lazarus_on_MacOS_X
« Last Edit: June 27, 2019, 01:56:30 am by trev »
o Lazarus v2.1.0 r61775, FPC v3.3.1 r42640, macOS 10.14.6 (with sup update), Xcode 10.3
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.0 (Parallels VM)
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

amtenorio

  • Newbie
  • Posts: 3
Re: Free Pascal unable to install in Mac OS X Mojave 10.14.5
« Reply #3 on: June 27, 2019, 04:42:11 pm »
Thank you for all your comments. Checking your answers and doing some work I’ve been able to install Lazarus in my new computer.

This is no the first time I've install Lazarus in Mac OS X. I always used the installation programs available in the Lazarus main page (https://www.lazarus-ide.org),  which sent me to the sourceforge project https://sourceforge.net/projects/lazarus/files/. What I can said is that in my system: A new mac-mini with Mojave up to date (10.14.5) and Xcode (10.2.1) the installation of the fpc available in Sourceforge for Lazarus does not work, because it does not detect Xcode.   

Also, In general I followed the suggested order: first fpc, then fpc-source and Lazarus finally.
Until now I didn’t  have problems in Mac OS X.

Anyway, I found different alternatives. One was with Homebrew. I tested the installation of fpc with this tool, as the fpc available in homebrew is exactly the same that is in the main page of Lazarus, and it worked. The fpc-src and Lazarus were installed the normal way, (not using brew)  and Lazarus recognized the correct paths of the compiler and debbuger.

Also I visited the Freepascal homepage  (https://www.freepascal.org) and I went to the sourceforge mirror for Intel/i386 (https://sourceforge.net/projects/freepascal/files/Mac%20OS%20X/3.0.4/) and I downloaded the fpc-3.04a.intel-macosx.dmg package which also I was able to install without problems.

So for my new Mac OS X system, the installer available in sourceforge from Lazarus does not recognize that xcode is already installed, but that from Freepascal works well.

Another anecdote was that once Lazarus and fpc were installed, I was not able to compile the most simple application (an empty GUI Form) as I got an error message from CarbonBars about only cpu i386 is supported, but this time I knew how to fix this problem,  in the menu Project > Project Options I selected Config and Target, to select Darwin as the Target OS and x86_64 for the Target CPU family and also I changed the LCL widgetset, which is carbon by default,  to cocoa.

I think these instructions may be important for a beginner trying to install Lazarus in one of these new Mac computers with Mojave.

Thank you :)
« Last Edit: June 27, 2019, 04:48:13 pm by amtenorio »

trev

  • Full Member
  • ***
  • Posts: 214
  • Former Delphi 7 and Delphi 10.2 User
Re: Free Pascal unable to install in Mac OS X Mojave 10.14.5
« Reply #4 on: June 28, 2019, 02:25:59 am »
Another anecdote was that once Lazarus and fpc were installed, I was not able to compile the most simple application (an empty GUI Form) as I got an error message from CarbonBars about only cpu i386 is supported, but this time I knew how to fix this problem,  in the menu Project > Project Options I selected Config and Target, to select Darwin as the Target OS and x86_64 for the Target CPU family and also I changed the LCL widgetset, which is carbon by default,  to cocoa.

This is covered in the installation instructions to which I referred you.
o Lazarus v2.1.0 r61775, FPC v3.3.1 r42640, macOS 10.14.6 (with sup update), Xcode 10.3
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.0 (Parallels VM)
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

edmund

  • Newbie
  • Posts: 1
Re: Free Pascal unable to install in Mac OS X Mojave 10.14.5
« Reply #5 on: July 02, 2019, 11:21:06 pm »
I am getting the next message when installing fpc-3.0.4.intel-macosx.dmg: "Free Pascal Compiler Intel 3.0.4 can not be installed in this disk. You have to install Xcode and its command line tools before installing this package"
I had a similar problem to that described using the downloads from https://www.lazarus-ide.org in OS X 10.14.5 and XCode 10.2.1 with command line tools installed.  It was fixed by the additional step of installing the Xcode SDK headers, as detailed on the page linked by trev at https://wiki.lazarus.freepascal.org/Installing_Lazarus_on_MacOS_X


Jonas Maebe

  • Hero Member
  • *****
  • Posts: 659
Re: Free Pascal unable to install in Mac OS X Mojave 10.14.5
« Reply #6 on: July 02, 2019, 11:26:26 pm »
I am getting the next message when installing fpc-3.0.4.intel-macosx.dmg: "Free Pascal Compiler Intel 3.0.4 can not be installed in this disk. You have to install Xcode and its command line tools before installing this package"
I had a similar problem to that described using the downloads from https://www.lazarus-ide.org in OS X 10.14.5 and XCode 10.2.1 with command line tools installed.  It was fixed by the additional step of installing the Xcode SDK headers, as detailed on the page linked by trev at https://wiki.lazarus.freepascal.org/Installing_Lazarus_on_MacOS_X
That is not required. The only thing that is required, is using the FPC 3.0.4a installer. Can any Lazarus developer please replace the installer available on SourceForge with the latest version? It doesn't make sense that everyone keeps having trouble and coming up with random workarounds, while there is a perfectly working installer already that does not require anything extra.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2269
    • havefunsoft.com
Re: Free Pascal unable to install in Mac OS X Mojave 10.14.5
« Reply #7 on: July 03, 2019, 12:57:15 am »
Can any Lazarus developer please replace the installer available on SourceForge with the latest version?
I've sent out a request for the update.
Patron Cocoa Widgetset development https://www.patreon.com/skalogryz

mattias

  • Administrator
  • Full Member
  • *
  • Posts: 139
    • http://www.lazarus.freepascal.org
Re: Free Pascal unable to install in Mac OS X Mojave 10.14.5
« Reply #8 on: July 03, 2019, 08:24:24 am »
Thanks for the hint.

I uploaded the "a" version. It may take up to 24h before it is spread to all mirrors.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 659
Re: Free Pascal unable to install in Mac OS X Mojave 10.14.5
« Reply #9 on: July 06, 2019, 11:51:14 am »
Thanks. Sorry for not properly announcing that new version on the mailing lists.