Recent

Author Topic: Lazarus Release 2.2.0  (Read 22881 times)

mattias

  • Administrator
  • Full Member
  • *
  • Posts: 177
    • http://www.lazarus.freepascal.org
Lazarus Release 2.2.0
« on: January 05, 2022, 11:57:19 pm »
The Lazarus team is glad to announce the release of Lazarus 2.2.

This release was built with FPC 3.2.2.

Here is the list of changes for Lazarus and Free Pascal:
http://wiki.lazarus.freepascal.org/Lazarus_2.2.0_release_notes
http://wiki.lazarus.freepascal.org/User_Changes_3.2.2

Here is the list of fixes for Lazarus 2.2.x:
https://gitlab.com/freepascal.org/lazarus/lazarus/-/commits/fixes_2_2

The release is available for download on SourceForge:
http://sourceforge.net/projects/lazarus/files/

Choose your CPU, OS, distro and then the "Lazarus 2.2.0" directory.

Checksums for the SourceForge files:
https://www.lazarus-ide.org/index.php?page=checksums#2_2_0

Minimum requirements:

Windows:
   2k, XP, Vista, 7, 8, 8.1 and 10, 32 or 64bit.

FreeBSD/Linux:
   gtk 2.8 for gtk2, qt4.5 for qt, qt5.6 for qt5, 32 or 64bit.

Mac OS X:
   Cocoa (64bit) 10.12 to 11.4, Carbon (32bit) 10.5 to 10.14, qt and
   qt5 (32 or 64bit).

The gitlab page:
https://gitlab.com/freepascal.org/lazarus/lazarus/-/tree/lazarus_2_2_0

For people who are blocked by SF, the Lazarus releases from SourceForge are mirrored at:ftp://ftp.freepascal.org/pub/lazarus/releases/

dbannon

  • Hero Member
  • *****
  • Posts: 1815
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus Release 2.2.0
« Reply #1 on: January 06, 2022, 12:04:05 am »
Wow, can I be the first to thank and congratulate the team for this great work ?

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

piola

  • Jr. Member
  • **
  • Posts: 87
  • Lazarus 2.2, 64bit on Windows 8.1 x64
Re: Lazarus Release 2.2.0
« Reply #2 on: January 06, 2022, 12:18:50 am »
Long awaited, thank you very much! Will try immediately.

Please keep up the great work.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7696
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus Release 2.2.0
« Reply #3 on: January 06, 2022, 12:19:51 am »
As a side note:

For x86_64,both FPC 3.2.0 and FPC 3.2.2 have a bug in the optimizer.

From current observation this issue is extremely rarely triggered. However, if the IDE for x86_64 is compiled with O2 or higher, then at least FpDebug will be broken (The affected code is a generic in LazUtils: TLazThreadedQueue or TLazFifoQueue).
Other parts of the IDE have not yet been observed, however even if the bug is in effect, the broken code needs to be executed with very specific arguments. Therefore, actual faulty behaviour could occur rather seldom. Yet, as any bug, it can strike at any time.

Compiling with -O1 is save
Compiling with -O2 -OoNoPeepHole  should also be save..

It is recommended for x86_64 users, to build your IDE with -O1 only.

This issue also affects 2.0.x (or potentially other code) if build with 3.2.0 or 3.2.2.
Since the triggers for this issue (complier going wrong, and resulting broken code actually failing) are extremely complex, not every IDE build (with 3.2.0/2 and -O2 up) will immediately show symptoms. It is possible that an affected build runs without issues, or fails once every few month only.

As for your own projects, you need to come to your own decision.  I have not seen any reports of this issue (other for the IDE), and 3.2.0 has been out for a good time.
Yet, no guarantees.

The issue is fixed in 3.2.3, so with the upcoming 3.2.4 this problem will be gone.
https://gitlab.com/freepascal.org/fpc/source/-/commit/e9d318e7e2f772bf455a92461cd5c229e69858d8

32 bit users should not be affected by this.
Non intel platforms should also not be affected.
« Last Edit: January 06, 2022, 12:31:39 am by Martin_fr »

dseligo

  • Sr. Member
  • ****
  • Posts: 452
Re: Lazarus Release 2.2.0
« Reply #4 on: January 06, 2022, 02:39:06 am »
Nice, thanks  :)

VTwin

  • Hero Member
  • *****
  • Posts: 1089
  • Former Turbo Pascal 3 user
Re: Lazarus Release 2.2.0
« Reply #5 on: January 06, 2022, 03:04:40 am »
Excellent! Many thanks to the devs. I am excited to install it.
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 10.13.6: Lazarus 2.2.0 (64 bit Cocoa)
macOS 12.0.1: Lazarus 2.2.0 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 2.2.0 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.2.0 (64 bit on VBox)

loaded

  • Sr. Member
  • ****
  • Posts: 441
Re: Lazarus Release 2.2.0
« Reply #6 on: January 06, 2022, 06:04:14 am »
Respect for the effort, thank you very much .
If Ide=Lazarus 2.0.10 32 Bit and Os=Win 10 Home 64 Bit then Get up and do something useful! Because God is the helper of those who start again;

12398890

  • Newbie
  • Posts: 2
Re: Lazarus Release 2.2.0
« Reply #7 on: January 06, 2022, 06:57:54 am »
Thank you very much! Please keep up the great work!

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1817
  • Former Delphi 1-7, 10.2 user
Re: Lazarus Release 2.2.0 and macOS aarch64
« Reply #8 on: January 06, 2022, 08:01:04 am »
macOS 12.1 - aarch64 - attempt to rebuild the IDE from within itself fails with:

Quote
Build IDE: Exit code 2, Errors: 2
Error: mkdir: ../units/aarch64-darwin/cocoa: Permission denied
make[1]: *** [../units/aarch64-darwin/cocoa] Error 1
Error: make: *** [idepkg] Error 2

Directory permissions as installed:

Quote
drwxr-xr-x  3     503  admin  96       2 Jan 21:20 units
drwxr-xr-x  4     503  admin  128     2 Jan 21:22 x86_64-darwin
drwxr-xr-x  896 503  admin  28672  2 Jan 21:24 cocoa

I checked my stable of Mac minis and my user always has an id of 501.

In comparison, my Firefox installation is owned by trev:admin

The workaround:

Quote
cd /Applications
sudo chown -R your_username Lazarus

Then I was met with:

Quote
make[2]: *** [lazarus] Error 1
make[1]: *** [idepkg] Error 2
Error: make: *** [idepkg] Error 2
Error: resource compiler "fpcres" not found, switching to external mode

The fix for this is to create a .fpc.cfg (note the initial dot) file in your home directory and add these lines to it:

Quote
#include /etc/fpc.cfg
-FD/usr/local/bin

so that fpcres can be found where it was installed.

The next hurdle:

Quote
make[2]: *** [lazarus] Error 1
make[1]: *** [idepkg] Error 2
Error: make: *** [idepkg] Error 2
Error: Unsupported target architecture -Paarch64, invoke the "fpc" compiler driver instead.

which is a little weird because it was happy earlier and the Preferences > Compiler executable is set to /usr/local/bin/fpc. The solution is to change that to /usr/local/lib/fpc/3.2.2/ppca64 instead.

The IDE is successfully rebuilt but does not restart automatically:

Quote
Build IDE: Success, Warnings: 25, Hints 792
Warning: svn not in path.

possibly due to the warning about svn? Quit the IDE.

Unfortunately trying to then start Lazarus from either the startlazarus.app icon or lazarus.app icon in /Applications/Lazarus still results in the original Intel lazarus binary being launched.

The correct aarch64 binary can be found in ~/.lazarus/bin/aarch64-darwin/lazarus. So the final solution is to:

Quote
mv /Applications/Lazarus/lazarus /Applications/Lazarus/lazarus.old
mv  ~/.lazarus/bin/aarch64-darwin/lazarus /Applications/Lazarus/

You can then start the IDE with either the StartLazarus or Lazarus icons.

I came across this while trying to re-compile the IDE from within itself to produce a native aarch64 version of the IDE as the delivered release IDE is an X86_64 binary.

If anyone does try this, then be aware you need to go to Tools > Configure "Build Lazarus" and change the Target CPU to aarch64, check the Clean common files option and then Build.
Lazarus 2.3, FPC 3.3.1 macOS 12.1 x86_64 Xcode 13.2
Lazarus 2.3, FPC 3.3.1 macOS 12.1 aarch64 Xcode 13.2
Lazarus 2.3, FPC 3.2.2 FreeBSD 13.0 amd64 VM
Lazarus 2.3, FPC 3.2.2 FreeBSD 12.2 amd64 VM
Lazarus 2.1 r61574 FPC 3.0.4 Ubuntu 20.04 VM
Lazarus 2.0.10 FPC 3.2.0 Win10 amd64 VM

bigfoot75

  • Newbie
  • Posts: 2
Re: Lazarus Release 2.2.0
« Reply #9 on: January 06, 2022, 08:16:17 am »
Does anyone use RichMemopack?
I got an error message

class function TRichEditManager.LoadRichText(RichEditWnd: Handle; ASrc: TStream): Boolean;
var
  cbs : TEditStream_;
begin
  cbs.dwCookie := PDWORD(ASrc);
  cbs.dwError := 0;
  cbs.pfnCallback := @RTFLoadCallback;
  SendMessage(RichEditWnd, EM_STREAMIN, SF_RTF, LPARAM(@cbs) );
  Result := cbs.dwError = 0;
end;   


win32richmemoproc.pas(730,22) Error: Incompatible types: got "<address of function(PDWord;PByte;LongInt;var LongInt):DWord;StdCall>" expected "<procedure variable type of function(LongWord;PByte;LongInt;var LongInt):DWord;StdCall>"

dsiders

  • Hero Member
  • *****
  • Posts: 563
Re: Lazarus Release 2.2.0
« Reply #10 on: January 06, 2022, 08:35:48 am »
Does anyone use RichMemopack?
I got an error message

class function TRichEditManager.LoadRichText(RichEditWnd: Handle; ASrc: TStream): Boolean;
var
  cbs : TEditStream_;
begin
  cbs.dwCookie := PDWORD(ASrc);
  cbs.dwError := 0;
  cbs.pfnCallback := @RTFLoadCallback;
  SendMessage(RichEditWnd, EM_STREAMIN, SF_RTF, LPARAM(@cbs) );
  Result := cbs.dwError = 0;
end;   


win32richmemoproc.pas(730,22) Error: Incompatible types: got "<address of function(PDWord;PByte;LongInt;var LongInt):DWord;StdCall>" expected "<procedure variable type of function(LongWord;PByte;LongInt;var LongInt):DWord;StdCall>"

RichMemo has a github repository with issue tracking: https://github.com/skalogryz/richmemo/.
Probably best to report the issue there. Or, start a separate thread.
Lazarus 2.0.12, 2.2.0, 2.3.0 (Git) / FPC 3.2.0, 3.2.2 / x86 64-bit / Windows 8.1

bigfoot75

  • Newbie
  • Posts: 2
Re: Lazarus Release 2.2.0
« Reply #11 on: January 06, 2022, 09:08:54 am »
Does anyone use RichMemopack?
I got an error message

class function TRichEditManager.LoadRichText(RichEditWnd: Handle; ASrc: TStream): Boolean;
var
  cbs : TEditStream_;
begin
  cbs.dwCookie := PDWORD(ASrc);
  cbs.dwError := 0;
  cbs.pfnCallback := @RTFLoadCallback;
  SendMessage(RichEditWnd, EM_STREAMIN, SF_RTF, LPARAM(@cbs) );
  Result := cbs.dwError = 0;
end;   


win32richmemoproc.pas(730,22) Error: Incompatible types: got "<address of function(PDWord;PByte;LongInt;var LongInt):DWord;StdCall>" expected "<procedure variable type of function(LongWord;PByte;LongInt;var LongInt):DWord;StdCall>"

RichMemo has a github repository with issue tracking: https://github.com/skalogryz/richmemo/.
Probably best to report the issue there. Or, start a separate thread.

I got the latest version from github,and complied it successful,thanks!

440bx

  • Hero Member
  • *****
  • Posts: 2626
Re: Lazarus Release 2.2.0
« Reply #12 on: January 06, 2022, 09:16:29 am »
Another thank you! to the developers for a great IDE :)
FPC v3.0.4 and Lazarus 1.8.2 on Windows 7 64bit.

Roelof

  • Newbie
  • Posts: 2
Re: Lazarus Release 2.2.0
« Reply #13 on: January 06, 2022, 10:58:03 am »
Wonderful! Thanks to all that put their effort in.

Al-Eid

  • New Member
  • *
  • Posts: 39
Re: Lazarus Release 2.2.0
« Reply #14 on: January 06, 2022, 11:45:51 am »
thank you all

 

TinyPortal © 2005-2018