Forum > General
Recompile FPC Package
TRon:
--- Quote from: TRon on August 07, 2024, 04:45:18 pm ---I am not behind a development machine so can't check for you right now (but can do so later today).
--- End quote ---
Unfortunately updating the fcl-pdf package sources of FPC 3.2.2 with trunk, then re-compiling (cross for me) all the packages failed for me with
--- Code: ---Free Pascal Compiler version 3.2.2 [2021/05/16] for x86_64
Copyright (c) 1993-2021 by Florian Klaempfl and others
Target OS: Win64 for x64
Compiling fcl-pdf/src/fppdf.pp
fppdf.pp(1250,85) Error: Incompatible types: got "Empty Set" expected "TDashArray"
fppdf.pp(1341,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
--- End code ---
which seem to indicate that something else has also changed (in trunk) that the fcl-pdf package depends on...
Is there any reason @Weitentaaal for not installing trunk compiler alongside your existing installation ?
Weitentaaal:
--- Quote ---Is there any reason @Weitentaaal for not installing trunk compiler alongside your existing installation ?
--- End quote ---
yes i work with other people on this Project and they do not want to update Lazarus/FPC yet. So i cant work with them when they have an older version of Lazarus, because they can't open/compile my work.
i guess the best way for me now is to leave it for now since i can't just recompile the single package due to dependencies. I will mark this section in the project as unfinished and come back later when all of my coworkers agree to update Lazarus.
i do not have any knowledge about fpc so thats one more reason to stop here and come back later when i have a clean and safe Updated version. Maybe this thread could help someone else in a similar situation.
Thank all of u guys for stopping by and helping me.
Khrys:
If all you need are some bugfixes, then maybe it's possible to write a non-invasive "patch" using Pascal's identifier scoping rules and type helpers. Here's an example of what I mean by that:
In the LCL version I'm using, TFont.Assign doesn't copy the PixelsPerInch property - which is a problem for me. So I wrote the following type helper:
--- 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";}};} ---{$modeswitch typehelpers} implementation type TFontHelper = class helper for TFont public procedure Assign(Source: TFont); // reintroduce; (if it were a subclass) end; interface procedure TFontHelper.Assign(Source: TFont);begin PixelsPerInch := Source.PixelsPerInch; inherited Assign(Source);end;
Now whenever this type helper is in scope, any call to Assign resolves to the patched version - without having to change each occurrence manually.
A limitation of this approach however is that type helpers can't introduce new data fields, so depending on the complexity of the required fixes it may not be applicable.
paweld:
@Weitentaaal: You can do as @wp wrote - put the modified version "fppdf.pp" in the project source directory (or a subdirectory and specify this path in the "Other unit files" parameter in the project properties)
TRon:
--- Quote from: paweld on August 08, 2024, 09:45:03 am ---@Weitentaaal: You can do as @wp wrote - put the modified version "fppdf.pp" in the project source directory (or a subdirectory and specify this path in the "Other unit files" parameter in the project properties)
--- End quote ---
No because the sources from trunk for package fcl-pdf rely on new functionality provided by the trunk compiler. FPC 3.2.2 is not able to compile the trunk package.
Navigation
[0] Message Index
[#] Next page
[*] Previous page