Recent

Author Topic: [SOLVED] Lazarus 2.0.8 cannot install on Mountain Lion  (Read 2076 times)

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2023
  • Former Delphi 1-7, 10.2 user
[SOLVED] Lazarus 2.0.8 cannot install on Mountain Lion
« on: June 21, 2020, 10:34:58 am »
See attached pic.

Also tried "sudo open" which opens the pkg file, but still the same result.

Any ideas?

[Edit] Xcode, command line tools and FPC 3.02 are all installed. [/Edit]
« Last Edit: June 28, 2020, 03:59:42 am by trev »

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2023
  • Former Delphi 1-7, 10.2 user
Re: Lazarus 2.0.8 cannot install on Mountain Lion
« Reply #1 on: June 22, 2020, 03:26:48 am »
So I used svn to download the source for Lazarus 2.0.8 and tried to compile it myself...

Code: [Select]
<stdin>:7493:2: error: invalid instruction mnemonic 'cvtsi2ssl'
        cvtsi2ssl       %eax,%xmm0
        ^~~~~~~~~
<stdin>:7518:2: error: invalid instruction mnemonic 'cvtsi2ssl'
        cvtsi2ssl       %eax,%xmm0
        ^~~~~~~~~
<stdin>:8188:2: error: invalid instruction mnemonic 'cvtsi2ssl'
        cvtsi2ssl       %eax,%xmm0
        ^~~~~~~~~
easylazfreetype.pas(2243) Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
make[1]: *** [lazutils.ppu] Error 1
make: *** [lazutils] Error 2

Ok, so the Xcode command line tools were too old. I installed clang7 for macOS from the clang website. I could smell success until...

Code: [Select]
(9001) Assembling (pipe) ../units/x86_64-darwin/nogui/lazbuild.s
(9022) Compiling resource ../units/x86_64-darwin/nogui/lazbuild.or
(9015) Linking ../lazbuild
ld: framework not found CoreImage
An error occurred while linking
Error: (9013) Error while linking
Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
make[2]: *** [lazbuild] Error 1
make[1]: *** [lazbuilder] Error 2
make: *** [lazbuild] Error 2

Hmm. The CoreImage framework is only available in macOS 10.11+ (El Capitan).

The Lazarus website claims compatibility for Lazarus 2.0.8 with "10.5 to 10.15; Carbon (32bit), Cocoa (64bit), qt and qt5 (32 or 64bit)".

Don't get me wrong; if it is not compatible I won't lose any sleep, but the claims for macOS should be updated.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Lazarus 2.0.8 cannot install on Mountain Lion
« Reply #2 on: June 22, 2020, 03:51:03 am »
sounds like you're using fpc3.2.0

you might want to try fpc3.0.4 instead


« Last Edit: June 22, 2020, 04:15:11 am by skalogryz »

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2023
  • Former Delphi 1-7, 10.2 user
Re: Lazarus 2.0.8 cannot install on Mountain Lion
« Reply #3 on: June 22, 2020, 04:27:39 am »
Yes indeed, I should have specified FPC 3.0.2.

I did manage to install the April snapshot Lazarus 2.0.8 pkg and... Lazarus starts up. However, trying to compile a blank form, using the Carbon widgetset and i386 CPU family, ends with:

Code: [Select]
ld: framework not found CoreImage
...
Error: Error while linking

I'll retry with FPC 3.0.4.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Lazarus 2.0.8 cannot install on Mountain Lion
« Reply #4 on: June 22, 2020, 04:35:08 am »
on the wiki article I did put a remedy for the problem with CoreImage linking.
It pretty much requires you to recompile CocoaAll header.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2023
  • Former Delphi 1-7, 10.2 user
Re: Lazarus 2.0.8 cannot install on Mountain Lion
« Reply #5 on: June 22, 2020, 05:03:35 am »
I thought your fix didn't apply to Carbon, only Cocoa?

Anyway, I installed FPC 3.0.4 and all works, both Carbon and Cocoa (on a blank form at least).

To make Lazarus happy, I needed to soft-link the /usr/bin/clang and /usr/bin/as files to
their replacements - putting their replacements first in the path didn't work.

None of the Lazarus download file area pkg files work under Mountain Lion - always the message that X cannot be installed on this disk. The Lazarus April snapshot pkg did install, as do all the FPC pkgs.


skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Lazarus 2.0.8 cannot install on Mountain Lion
« Reply #6 on: June 22, 2020, 05:56:09 am »
I thought your fix didn't apply to Carbon, only Cocoa?
The heartbreaking fact is Carbon using Cocoa (and specifically CocoaAll unit) for "icon tray" implementation :)
If you recompile Carbon with -dCarbonDontUseCocoa, then it should work with fpc 3.2.0 out of the box.

None of the Lazarus download file area pkg files work under Mountain Lion - always the message that X cannot be installed on this disk.
Yes, i do recall encountering something like that. Don't know why it doesn't like (the only) the harddrive, though.
Yet, I did exactly the same thing as you did - got Lazarus via svn.


trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2023
  • Former Delphi 1-7, 10.2 user
Re: Lazarus 2.0.8 cannot install on Mountain Lion
« Reply #7 on: June 25, 2020, 01:38:53 pm »
Instructions from FPC 3.2.0 for macOS 10.10 and earlier are fine until:

Quote
7. Compile the packages:
 make packages
This should compile A 64-bit version of the FPC packages.

Results in:

Code: [Select]
[/usr/local/share/src/fpc-3.2.0] $ make packages
make -C packages all
./fpmake compile --localunitdir=.. --os=darwin --cpu=x86_64 -o -Ur -o -Xs -o -O2 -o -n -o -dx86_64 -o -dRELEASE --compiler=/usr/local/bin/ppcx64 -bu
[  1%] Skipped package a52 which has been disabled for target x86_64-darwin
[  1%] Skipped package ami-extra which has been disabled for target x86_64-darwin
[  2%] Skipped package amunits which has been disabled for target x86_64-darwin
[  3%] Skipped package arosunits which has been disabled for target x86_64-darwin
Start compiling package rtl-objpas for target x86_64-darwin.
       Compiling rtl-objpas/BuildUnit_rtl_objpas.pp
       Compiling ./rtl-objpas/src/inc/rtti.pp
External command "/usr/local/bin/ppcx64 -Tdarwin -FUrtl-objpas/units/x86_64-darwin/ -Fu/usr/local/share/src/fpc-3.2.0/rtl/units/x86_64-darwin/ -Furtl-objpas/src/inc -Firtl-objpas/src/inc -Firtl-objpas/src/darwin -Firtl-objpas/src/x86_64 -Firtl-objpas/src/common -Ur -Xs -O2 -n -dx86_64 -dRELEASE -Sc -viq rtl-objpas/BuildUnit_rtl_objpas.pp" failed with exit code 256.
Console output:
Target OS: Darwin for x86_64
Compiling rtl-objpas/BuildUnit_rtl_objpas.pp
Compiling ./rtl-objpas/src/inc/rtti.pp
rtti.pp(119,5) Error: Fields cannot appear after a method or property definition, start a new visibility section first
rtti.pp(119,13) Fatal: Syntax error, ":" expected but "CLASS" found
Fatal: Compilation aborted

The installer encountered the following error:
Compilation of "BuildUnit_rtl_objpas.pp" failed
make[1]: *** [all] Error 1
make: *** [packages] Error 2

Compiler being used to compile FPC 3.2.0 is FPC 3.0.4

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2023
  • Former Delphi 1-7, 10.2 user
[SOLVED] Lazarus 2.0.8 cannot install on Mountain Lion
« Reply #8 on: June 28, 2020, 03:59:18 am »
The solution was to rebuild the whole of FPC 3.2.0 after commenting out the CoreImage line in CocoaAll.pas and patching NSScrollView.inc (https://bugs.freepascal.org/view.php?id=37181), and then rebuild Lazarus 2.0.8.

 

TinyPortal © 2005-2018