#1 2020-03-30 15:57:03

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,571
Website

FPC 3.2 rc1

Great news - FPC 3.2 rc1 is released today

IMHO it's good to use fpc3.2 as primary FPC compiler for mORMot. This solve a problem with choosing correct FPC SVN revision, when FPC releases we can use package (apt / yum) to install compiler what is preferred way for CI.

Also some of my customers builds my projects from sources (they need security audit etc.) and I got a reclamation what we use "unstable" compilers. Official FPC3.2 solve this issue also.

On Linux current mORMot trunk pass all tests (except Client side * but I think this is because of some ports is used on my host) with FPC3.2 (installed from fixes3.2 fpcupdeluxe). All my products tests is also passed on Win/Lin

@ab - what do you think about switching to 3.2 ?

Offline

#2 2020-03-30 16:09:15

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,649
Website

Re: FPC 3.2 rc1

I guess it could be done.

But perhaps Alfred would need to validate if it works on all our targets, including ARM32 and AARCH64.

Offline

#3 2020-04-03 16:57:33

AOG
Member
Registered: 2014-02-24
Posts: 490

Re: FPC 3.2 rc1

Fixes builds the mORMot 100% perfect on my systems.
Regarding the client tests:
I always change the default http port from 8888 to 8848. Mainly due to 8888 often being used by other processes.

Offline

#4 2020-04-03 23:01:13

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,649
Website

Re: FPC 3.2 rc1

Great!

So what do we do?
Do we go with FPC 3.2 once released?
(and does anyone know if it would take weeks or months from the RC1?)

Offline

#5 2020-04-04 00:11:23

urhen
Member
Registered: 2020-02-13
Posts: 36

Re: FPC 3.2 rc1

ab wrote:

(and anyone know if it would take weeks or months from the RC1?)

Some forum posts sound more like months than weeks.

Offline

#6 2020-04-04 13:56:30

macfly
Member
From: Brasil
Registered: 2016-08-20
Posts: 374

Re: FPC 3.2 rc1

And which version of lazarus are you using together with 3.2?

I installed Fixes, which gave me Lazarus 2.0.7 and in the preliminary tests everything is OK.

Is anyone using another version? 2.1.0 maybe?

Offline

#7 2020-04-04 14:04:54

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,649
Website

Re: FPC 3.2 rc1

What if we could say, that we support two compiler sets:

1. FPC 3.2 (RC1 by now) + Lazarus 2.0.8 (latest stable release in one or two weeks).
In practice, should we use Lazarus 2.0.7 instead? As proposed in https://sourceforge.net/projects/lazaru … rc1-44237/
Or wait for https://www.lazarus-ide.org to support FPC 3.2 + Lazarus 2.0.8 - if they will?
An official pre-compiled binary is the easiest for single target work (e.g. on Windows), to be able to test mORMot on FPC/Lazarus, especially for Delphi users.

2. FpcUpDeluxe with ........ settings (to be defined).
FpcUpDeluxe is the way to go for cross-compiling.

What do you think?
Could we wait for the Lazarus team to release stable Lazarus 2.0.8 with FPC 3.2 RC1 ? Or would they only support 3.0.4?

Offline

#8 2020-04-04 16:33:51

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,571
Website

Re: FPC 3.2 rc1

I use Lazarus 2.0.7 but actually this does not metter to me since I don't use any visual component. So can't suggest about Lazarus. But  FPC 3.2 rc1 we can use right now

Offline

#9 2020-04-04 17:07:30

macfly
Member
From: Brasil
Registered: 2016-08-20
Posts: 374

Re: FPC 3.2 rc1

I don't use visual components either.

The reason for updating is to get improvements in the editor.

From what I saw in the announcement of version 2.0.8 it will be for FPC 3.0.4.

So at the moment it looks like version 2.0.7 + 3.2 rc1 is still the best choice.

Last edited by macfly (2020-04-04 17:08:23)

Offline

#10 2020-04-05 03:59:10

AOG
Member
Registered: 2014-02-24
Posts: 490

Re: FPC 3.2 rc1

Agreed. FPC 3.2 is the way to go. If all goes well, this will be a very good and stable release.

For sure, compatibility with actual trunk MUST be guaranteed. Trunk is the future of FPC.
But I do not expect any mORMot major breaking changes going into trunk this year.

And, any working Lazarus will do.
Personally, I use Lazarus trunk, due to cocoa and QT5 updates.

Offline

#11 2020-04-05 09:03:42

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,649
Website

Re: FPC 3.2 rc1

@Alfred
How do we setup FPC 3.2 + Lazarus trunk from FPCUpDeluxe ?

I am trying FPC: "fixes3.2" and Lazarus: "fixes2.0".
I downloaded the latest fpcupdeluxe .x release.
It is currently building... let's see!

Result:

Ubuntu 18.04.4 LTS - Linux 5.3.0-42-generic (cp65001)
    4 x Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz (x64)
Using mORMot 1.18.5934
    TSQLite3LibraryStatic 3.31.0 with internal MM
Generated with: Free Pascal 3.2 64 bit compiler

Time elapsed for all tests: 2m48
Performed 2020-04-05 11:58:55 by ab on devlaptop

Total assertions failed for all test suits:  0 / 43,227,911
! All tests passed successfully.
Heap dump by heaptrc unit of /home/ab/dev/lib/SQLite3/fpc/bin/x86_64-linux/TestSQL3
66492108 memory blocks allocated : 20425856622/20585961984
66492108 memory blocks freed     : 20425856622/20585961984
0 unfreed memory blocks : 0

So it worked out-of-the-box! Nice!
I will now try to setup the cross-compilers...

Offline

#12 2020-04-05 13:34:43

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,649
Website

Re: FPC 3.2 rc1

Everything green! big_smile

And the code generation did actually improve.
For instance:

?_02624:cmp     rdi, rcx                                ; 0018 _ 48: 39. CF
        ja      ?_02629                                 ; 001B _ 77, 3C
        mov     rsi, qword ptr [rdi]                    ; 001D _ 48: 8B. 37
        cmp     rsi, rdx                                ; 0020 _ 48: 39. D6
        jz      ?_02628                                 ; 0023 _ 74, 30
        mov     rsi, qword ptr [rdi+8H]                 ; 0025 _ 48: 8B. 77, 08
        cmp     rsi, rdx                                ; 0029 _ 48: 39. D6
        jz      ?_02627                                 ; 002C _ 74, 22
        mov     rsi, qword ptr [rdi+10H]                ; 002E _ 48: 8B. 77, 10
        cmp     rsi, rdx                                ; 0032 _ 48: 39. D6
        jz      ?_02626                                 ; 0035 _ 74, 14
        mov     rsi, qword ptr [rdi+18H]                ; 0037 _ 48: 8B. 77, 18
        cmp     rsi, rdx                                ; 003B _ 48: 39. D6
        jz      ?_02625                                 ; 003E _ 74, 06
        add     rdi, 32                                 ; 0040 _ 48: 83. C7, 20
        jmp     ?_02624                                 ; 0044 _ EB, D2

is now generated as:

?_0271: cmp     rcx, rdi                                ; 0018 _ 48: 39. F9
        jc      ?_0276                                  ; 001B _ 72, 30
        cmp     rdx, qword ptr [rdi]                    ; 001D _ 48: 3B. 17
        jz      ?_0275                                  ; 0020 _ 74, 27
        cmp     rdx, qword ptr [rdi+8H]                 ; 0022 _ 48: 3B. 57, 08
        jz      ?_0274                                  ; 0026 _ 74, 1C
        cmp     rdx, qword ptr [rdi+10H]                ; 0028 _ 48: 3B. 57, 10
        jz      ?_0273                                  ; 002C _ 74, 11
        cmp     rdx, qword ptr [rdi+18H]                ; 002E _ 48: 3B. 57, 18
        jz      ?_0272                                  ; 0032 _ 74, 06
        add     rdi, 32                                 ; 0034 _ 48: 83. C7, 20
        jmp     ?_0271                                  ; 0038 _ EB, DE

There is no unneeded values moved to registers any more!

It is SO nice seeing such improvements in a pascal compiler.
Delphi didn't improve its code generator since a decade. It only introduced regressions (e.g. about FPU stack, or when inlining) on some targets.
FPC is a good shape, I can tell you!

Offline

#13 2020-04-05 13:50:09

AOG
Member
Registered: 2014-02-24
Posts: 490

Re: FPC 3.2 rc1

Same experience here !!
Also on ARM(64) targets.

Offline

#14 2020-04-05 23:06:11

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,649
Website

Re: FPC 3.2 rc1

And Lazarus: "fixes2.0" is very stable.
It never crashed on huge mORMot 1.18 units!

This new Lazarus stability has nothing to compare with any version of Delphi - which all are unstable beasts.
In comparison, Lazarus is just fast and insanely stable - a real pleasure to use.

Offline

#15 2020-04-08 12:13:43

wai-kit
Member
From: Amsterdam, the Netherlands
Registered: 2012-11-27
Posts: 90

Re: FPC 3.2 rc1

I don't see any NewPascal updates anymore.
Does this means the NewPascal is deprecated?


fpcdeluxe, FPC 3.2 / Lazarus 2.0, mORMot on Windows 10 ...

Offline

#16 2020-04-16 22:52:05

urhen
Member
Registered: 2020-02-13
Posts: 36

Re: FPC 3.2 rc1

I think NewPascal is not deprecated, it's dead.
The guy behind it (Maciej Izak?) left the FPC/Delphi community completely or?

Offline

#17 2020-04-17 04:18:40

edwinsn
Member
Registered: 2010-07-02
Posts: 1,218

Re: FPC 3.2 rc1

IIRC, some of the NewPascal features have been merged into the FPC trunk?


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#18 2020-04-17 04:52:09

AOG
Member
Registered: 2014-02-24
Posts: 490

Re: FPC 3.2 rc1

Some time ago, Maciej went through a severe personal tragedy. That has kept him away from active involvement with NewPascal.

He was also (a bit) frustrated with the amount of friction he encountered with his work for FPC.
I must agree: its hard to change anything in FPC. Bugfixes are accepted, but acceptance of (simple) changes can even take years, if ever.

But he is still around. I expect him back sooner or later.
And NewPascal is definitely on hold.

Offline

Board footer

Powered by FluxBB