Recent

Author Topic: [SOLVED] Lazarus LCL FPC compatibility question  (Read 907 times)

lagprogramming

  • Sr. Member
  • ****
  • Posts: 405
[SOLVED] Lazarus LCL FPC compatibility question
« on: April 27, 2023, 11:31:02 am »
The latest stable release of Lazarus(including the lcl) should be compatible with FPC 3.2.2(because according to the release announcements it was built with FPC 3.2.2.), but also should be compatible with FPC 2.6.4(according to the docs/INSTALL.txt file). Is my understanding right?
What about the development(trunk) sources, do they have to be backwards compatible with FPC 2.6.4, too?
If the information in docs/INSTALL.txt has become obsolete, maybe it should be updated.
« Last Edit: May 21, 2023, 06:59:43 pm by lagprogramming »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus LCL FPC compatibility question
« Reply #1 on: April 27, 2023, 11:40:38 am »
It seems to me docs/install may not have been updated.

The general rule is:

A version of Lazarus should be compatible with the two most recent FPC releases, at the time of the release of that Lazarus version.

I.e. if  at the time Lazarus 2.2.0 was released, the current FPC was 3.2.2, then it should be compatible with 3.2.2 and 3.2.0.

I am not sure, if updates to fixes would break the 3.2.0 compatibility, if in the meantime FPC 3.2.4 was out (and therefore the 2 most recent FPC would be 3.2.4 and 3.2.2).



I don't know what the last Lazarus was that supported 2.6.4. That would have to be from the time that 3.0.0 was the current fpc.

lagprogramming

  • Sr. Member
  • ****
  • Posts: 405
Re: Lazarus LCL FPC compatibility question
« Reply #2 on: April 28, 2023, 10:51:32 am »
I've noticed that the docs/INSTALL.txt file has been updated.
In a clean linux environment, compiling Lazarus 2.2.6 using FPC 3.0.0 fails with:
Code: Pascal  [Select][+][-]
  1. /tmp/lazarus/components/freetype/ttraster.pas(163,57) Hint: (5024) Parameter "max" not used
  2. /tmp/lazarus/components/freetype/ttraster.pas(145,75) Hint: (5024) Parameter "Left" not used
  3. /tmp/lazarus/components/freetype/ttraster.pas(146,12) Hint: (5024) Parameter "Right" not used
  4. /tmp/lazarus/components/freetype/easylazfreetype.pas(55,23) Error: (5000) Identifier not found "TPointF"
  5. /tmp/lazarus/components/freetype/easylazfreetype.pas(55,30) Error: (5007) Error in type definition
  6. /tmp/lazarus/components/freetype/easylazfreetype.pas(245,5) Fatal: Internal error 2010021405
  7. Fatal: (1018) Compilation aborted
  8. Error: /tmp/fpc-3.0.0/bin/ppcx64 returned an error exitcode
  9. make[1]: *** [Makefile:3394: freetypelaz.ppu] Error 1
  10. make[1]: Leaving directory '/tmp/lazarus/components/freetype'
  11. make: *** [Makefile:3845: lazbuild] Error 2
  12. guest@localhost ~/lazarus $
This means that removing from the official development(trunk) files the code for obsolete FPC versions(at least those prior to 3.0.0), can be done without complaints regarding eventual regresions, right!?
The best answer would be to update lcl/lclversion.pas too, as it has the following lines:
Code: Pascal  [Select][+][-]
  1. { At least 2.4.2 is required, except for wince which supports fpc 2.2.0+ too }
  2. {$ifdef Wince}
  3.   {$if defined(ver1) or (FPC_FULLVERSION<20200)}
  4.     {$fatal Lazarus for WinCE requires at least FPC 2.2.0}
  5.   {$endif}
  6. {$else}
  7.   {$if defined(ver1) or (FPC_FULLVERSION<20402) }
  8.     {$fatal Lazarus requires at least FPC 2.4.2}
  9.   {$endif}
  10. {$endif}

lagprogramming

  • Sr. Member
  • ****
  • Posts: 405
Re: Lazarus LCL FPC compatibility question
« Reply #3 on: May 20, 2023, 01:34:22 pm »
Knowing that Lazarus needs a newer FPC version than 3.0.0 in order to be built, the following patch removes the obsolete lines from lcl/lclversion.pas
Code: Pascal  [Select][+][-]
  1. diff --git a/lcl/lclversion.pas b/lcl/lclversion.pas
  2. index 69c270c063..4d2eb43b77 100644
  3. --- a/lcl/lclversion.pas
  4. +++ b/lcl/lclversion.pas
  5. @@ -16,17 +16,6 @@
  6.  }
  7.  unit LCLVersion;
  8.  
  9. -{ At least 2.4.2 is required, except for wince which supports fpc 2.2.0+ too }
  10. -{$ifdef Wince}
  11. -  {$if defined(ver1) or (FPC_FULLVERSION<20200)}
  12. -    {$fatal Lazarus for WinCE requires at least FPC 2.2.0}
  13. -  {$endif}
  14. -{$else}
  15. -  {$if defined(ver1) or (FPC_FULLVERSION<20402) }
  16. -    {$fatal Lazarus requires at least FPC 2.4.2}
  17. -  {$endif}
  18. -{$endif}
  19. -
  20.  {$mode objfpc}{$H+}
  21.  
  22.  interface

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus LCL FPC compatibility question
« Reply #4 on: May 20, 2023, 01:56:49 pm »
Please report on the bug tracker. Thanks


 

TinyPortal © 2005-2018