Lazarus

Programming => Operating Systems => macOS / Mac OS X => Topic started by: jkj on August 05, 2020, 07:21:14 pm

Title: Cannot find LCLType used by CocoaGDIObjects, incompatible ppu
Post by: jkj on August 05, 2020, 07:21:14 pm
I tried to compile a program  on macOS Catalina but I get the following error message:

cocoagdiobjects.pas(12,3) Fatal: Cannot find LCLType used by CocoaGDIObjects, incompatible ppu=/Library/Lazarus/lcl/units/x86_64-darwin/lcltype.ppu, package LCLBase

Title: Re: Cannot find LCLType used by CocoaGDIObjects, incompatible ppu
Post by: trev on August 06, 2020, 08:36:08 am
* FPC version?
* Lazarus version?

When the compiler gives "Cannot find A used by B", Lazarus checks what pas/pp/ppu files are in the search path, and if there is a ppu file it inserts "incompatible ppu=filename, package".

FPC cannot use this ppu for one of these reasons:
 
* it was compiled with another FPC version;
* it was compiled with (depends on) some other ppu files that are not in the search path;
* you misconfigured some search path(s).

Without knowing how you installed FPC + Lazarus, I'd be tempted to delete both and start again. See the Wiki macOS: Uninstalling Lazarus and Free Pascal (https://wiki.freepascal.org/Installing_Lazarus_on_macOS#Uninstalling_Lazarus_and_Free_Pascal).
Title: Re: Cannot find LCLType used by CocoaGDIObjects, incompatible ppu
Post by: jkj on August 06, 2020, 10:12:29 am
Lazarus 2.0.10
FPC Version 3.2.0
Title: Re: Cannot find LCLType used by CocoaGDIObjects, incompatible ppu
Post by: jkj on August 06, 2020, 10:27:20 am
I did a reinstall of Lazarus and it now works.
Title: Re: Cannot find LCLType used by CocoaGDIObjects, incompatible ppu
Post by: trev on August 06, 2020, 11:30:39 am
Excellent! Thanks for letting us know it was resolved.
Title: Re: Cannot find LCLType used by CocoaGDIObjects, incompatible ppu
Post by: Tarupt on August 10, 2020, 07:29:34 am
I'm seeing the same issue with the same versions of Lazarus and FPC. I installed using Homebrew. (This formula: https://github.com/Homebrew/homebrew-cask/blob/aac9f1d80c5c58840804ff64624b436e589a8253/Casks/lazarus.rb )

I tried removing and reinstalling but I'm still getting the same error. I'm a complete newbie to Lazarus, so anything to suggest?

Thank you!
Title: Re: Cannot find LCLType used by CocoaGDIObjects, incompatible ppu
Post by: trev on August 10, 2020, 08:26:51 am
Operating system?
Title: Re: Cannot find LCLType used by CocoaGDIObjects, incompatible ppu
Post by: avra on August 10, 2020, 09:53:31 am
anything to suggest?
Try clean rebuild of the IDE (Tools / Configure Build Lazarus / Clean all + check "Switch after building to automatically". Then press "Build".

If that does not help and you use any sparta package or embedded form designer on FPC 3.2+, then try this fix:
https://forum.lazarus.freepascal.org/index.php/topic,50528.msg368954.html#msg368954
Title: Re: Cannot find LCLType used by CocoaGDIObjects, incompatible ppu
Post by: Tarupt on August 11, 2020, 06:28:26 am
Operating system?

Ah, operating system is Mac OS Catalina, 10.15.5.

anything to suggest?
Try clean rebuild of the IDE (Tools / Configure Build Lazarus / Clean all + check "Switch after building to automatically". Then press "Build".

If that does not help and you use any sparta package or embedded form designer on FPC 3.2+, then try this fix:
https://forum.lazarus.freepascal.org/index.php/topic,50528.msg368954.html#msg368954

Thanks for the suggestion. I tried that but actually ended up with a different error:

Code: [Select]
Compile package LCL 2.0.10: Exit code 1, Errors: 1, Warnings: 1
Warning: Recompiling LCLType, checksum changed for /usr/local/Cellar/fpc/3.2.0/lib/fpc/3.2.0/units/x86_64-darwin/rtl/sysutils.ppu
lcltype.pp(11,38) Fatal: Can't find unit LCLType used by CocoaGDIObjects

As far as I know, I'm not using Sparta, just trying to compile the default "Form1" that appears when running Lazarus.
Title: Re: Cannot find LCLType used by CocoaGDIObjects, incompatible ppu
Post by: trev on August 11, 2020, 08:00:46 am
I would uninstall everything you installed with Homebrew, and then install the official Lazarus + Free Pascal installation packages using these tried and true macOS installation (https://wiki.freepascal.org/Installing_Lazarus_on_macOS) instructions on the Wiki.

Once you have a working installation, you might like to check out the Wiki's macOS Portal (https://wiki.freepascal.org/Portal:Mac).
Title: Re: Cannot find LCLType used by CocoaGDIObjects, incompatible ppu
Post by: avra on August 11, 2020, 10:13:40 am
As far as I know, I'm not using Sparta, just trying to compile the default "Form1" that appears when running Lazarus.
If you use embedded form designer then you use one of the sparta packages. Some other packages might use old sparta generics package. Having any sparta package installed in IDE after some time leads to package compilation problem which needs a fix described here: https://forum.lazarus.freepascal.org/index.php/topic,46755.msg373317.html#msg373317
Title: Re: Cannot find LCLType used by CocoaGDIObjects, incompatible ppu
Post by: Tarupt on August 13, 2020, 05:48:54 am
Thanks for all the suggestions. Homebrew has usually worked for me, but in this case it seems to break things. Downloading the files from https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/Lazarus%202.0.10/ and installing manually has let everything work.

Thanks!
Title: Re: Cannot find LCLType used by CocoaGDIObjects, incompatible ppu
Post by: trev on August 13, 2020, 07:09:26 am
Thanks for letting us know the issue. This is the second homebrew failure I've seen reported. It might help to let whoever packages the homebrew version know of the issue.
TinyPortal © 2005-2018