Forum > macOS / Mac OS X

Problem building runtime package on Lazarus 4.0 RC1 on macOS [SOLVED]

(1/2) > >>

carl_caulkett:
* Mac Mini M1
* macOS 14.6.1
* Lazarus 3.99
* Lazarus 4.0 RC1
* FPC 3.3.1

I have a small runtime package which builds quite happily on Lazarus 3.99, but fails to build on Lazarus 4.0 RC1.
This is the offending line of code...

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---unit caEdit; {$mode objfpc}{$H+} interface uses  Classes, SysUtils, Forms, Controls, Graphics, StdCtrls, ExtCtrls; 
and this is the error message given...

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---caedit.pas(8,22) Error: Cannot find Forms used by caEdit, incompatible ppu=/Applications/Lazarus_4.0/lcl/units/aarch64-darwin/forms.ppu, package LCLBase 
Needless to say, this is a complete showstopper! Any ideas, anyone?

Martin_fr:
Incompatible ppu means that there somewhere is a ppu that was build by another fpc version (could even be an older 3.3.1).

That can happen if the path settings are wrong, and a unit is seen twice => generating 2 ppu for it in 2 different places. And then later only one gets replaced.

It could also be, that the package for some reason was not rebuild....

1) Try opening the package and click "Compile clean" (drop down at the end of the toolbar)

2) If that does not help:
Find all ppu for this file (or the entire package). Including any that may have gotten in the project folder (in this case IDE folder) or any other place. Or in different sub-folders of that package.
Delete all those ppu, and all there .o files.

If you found any ppu were they don't belong => then there is an issue with your path settings.

If you upgraded from an older 3.3.1 to a newer 3.3.1 => then it is probable that you need to clean build by yourself. For the IDE it probably (not sure) still is the same compiler. And the sources haven't changed, so the IDE wouldn't see a need to recompile.

carl_caulkett:

--- Quote from: Martin_fr on October 28, 2024, 12:31:01 pm ---1) Try opening the package and click "Compile clean" (drop down at the end of the toolbar)

--- End quote ---

That didn't seem to help!


--- Quote from: Martin_fr on October 28, 2024, 12:31:01 pm ---2) If that does not help:
Find all ppu for this file (or the entire package). Including any that may have gotten in the project folder (in this case IDE folder) or any other place. Or in different sub-folders of that package.
Delete all those ppu, and all there .o files.

--- End quote ---

I manually deleted (renamed) forms.ppu and forms.o. Now when I build the package I get...

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---caedit.pas(8,22) Error: Cannot find Forms used by caEdit. Check if package LCLBase creates Forms.ppu, check nothing deletes this file and check that no two packages have access to the unit source.. 

carl_caulkett:

--- Quote from: Martin_fr on October 28, 2024, 12:31:01 pm ---If you upgraded from an older 3.3.1 to a newer 3.3.1 => then it is probable that you need to clean build by yourself. For the IDE it probably (not sure) still is the same compiler. And the sources haven't changed, so the IDE wouldn't see a need to recompile.

--- End quote ---

Do you mean do a clean build of the package? Isn't that what you suggested before? "Try opening the package and click "Compile clean" (drop down at the end of the toolbar)"

Martin_fr:

--- Quote from: carl_caulkett on October 28, 2024, 01:06:10 pm ---
--- Quote from: Martin_fr on October 28, 2024, 12:31:01 pm ---If you upgraded from an older 3.3.1 to a newer 3.3.1 => then it is probable that you need to clean build by yourself. For the IDE it probably (not sure) still is the same compiler. And the sources haven't changed, so the IDE wouldn't see a need to recompile.

--- End quote ---

Do you mean do a clean build of the package? Isn't that what you suggested before? "Try opening the package and click "Compile clean" (drop down at the end of the toolbar)"

--- End quote ---

Yes, but what I meant here was more: In general, whenever you upgrade fpc from git (keeping its version number) then you should do that for all of your code. Not just this package.

And I would even do that always when switching fpc in any way at all, even if the IDE normally detects that at least if the version of fpc changed.

Navigation

[0] Message Index

[#] Next page

Go to full version