Recent

Author Topic: FPC 3.2.x series branched, trunk update to 3.3.1  (Read 110825 times)

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #30 on: December 13, 2018, 12:18:48 am »
It worked 'til 99%, then it broke compiling the utils package:
---------------------------------------------------------------------
       Compiling ide\fptemplt.pas
       Linking ide\bin\i386-win32\fp.exe
[ 99%] Compiled package ide
make[2]: Leaving directory `C:/lazarus/fpc/3.2.0/packages'
make[1]: Leaving directory `C:/lazarus/fpc/3.2.0'
c:/lazarus/fpc/3.0.4/bin/i386-win32/make utils_all FPC=C:/lazarus/fpc/3.2.0/comp
iler/ppc386.exe FPCFPMAKE=C:/lazarus/fpc/3.2.0/compiler/ppc386.exe RELEASE=1 'OP
T='
make[1]: Entering directory `C:/lazarus/fpc/3.2.0'
c:/lazarus/fpc/3.0.4/bin/i386-win32/make -C utils all
make[2]: Entering directory `C:/lazarus/fpc/3.2.0/utils'
C:/lazarus/fpc/3.2.0/compiler/ppc386.exe fpmake.pp  -FuC:/lazarus/fpc/3.2.0/rtl/
units/i386-win32 -FuC:/lazarus/fpc/3.2.0/packages/paszlib/units/i386-win32 -FuC:
/lazarus/fpc/3.2.0/packages/fcl-process/units/i386-win32 -FuC:/lazarus/fpc/3.2.0
/packages/hash/units/i386-win32 -FuC:/lazarus/fpc/3.2.0/packages/libtar/units/i3
86-win32 -FuC:/lazarus/fpc/3.2.0/packages/fpmkunit/units/i386-win32 -FuC:/lazaru
s/fpc/3.2.0/packages/fcl-json/units/i386-win32
./fpmake.exe compile --localunitdir=.. --globalunitdir=../packages --os=win32 --
cpu=i386 -o -Ur -o -Xs -o -O2 -o -n -o -di386 -o -dRELEASE --compiler=C:/lazarus
/fpc/3.2.0/compiler/ppc386.exe -bu
Start compiling package utils for target i386-win32.
       Compiling BuildUnit_utils.pp
       Compiling usubst.pp
       Compiling ptopu.pp
       Compiling ptop.pp
The installer encountered the following error:
External command "C:/lazarus/fpc/3.2.0/compiler/ppc386.exe -Twin32 -FEbin\i386-w
in32 -FUunits\i386-win32\ -FuC:\lazarus\fpc\3.2.0\rtl\units\i386-win32\ -FuC:\la
zarus\fpc\3.2.0\units\i386-win32\fcl-base\ -FuC:\lazarus\fpc\3.2.0\units\i386-wi
n32\fcl-res\ -FuC:\lazarus\fpc\3.2.0\units\i386-win32\rtl-objpas\ -FuC:\lazarus\
fpc\3.2.0\units\i386-win32\paszlib\ -FuC:\lazarus\fpc\3.2.0\units\i386-win32\has
h\ -FuC:\lazarus\fpc\3.2.0\units\i386-win32\fcl-json\ -FuC:\lazarus\fpc\3.2.0\un
its\i386-win32\rtl-extra\ -Ur -Xs -O2 -n -di386 -dRELEASE -viq ptop.pp" failed w
ith exit code 1. Console output:
Target OS: Win32 for i386
Compiling ptop.pp
ptop.pp(21,29) Fatal: Can't find unit CustApp used by PtoP
Fatal: Compilation aborted


make[2]: *** [all] Error 1
make[2]: Leaving directory `C:/lazarus/fpc/3.2.0/utils'
make[1]: *** [utils_all] Error 2
make[1]: Leaving directory `C:/lazarus/fpc/3.2.0'
make: *** [build-stamp.i386-win32] Error 2

C:\lazarus\fpc\3.2.0>
---------------------------------------------------------------------

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9791
  • Debugger - SynEdit - and more
    • wiki
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #31 on: December 13, 2018, 12:56:51 am »
Odd...
Which way? Mine or Marcov?

This is an unmodified copy of fixes 3.2?  (first get the unmodified to build, then see what happens when you make changes...)

I just did a build of fixes3.2 rev 40528. So it the build is not broken. Sometimes it just is a bad commit.

Also sometimes it will fail if build with certain options (I several times noticed that it was unable to build with -CR / but there may be other options). So try building with no extra opts at all.

CustApp is in fcl-base (filesystem search) and that is listed in the include path on your output.
Restart your build (without cleaning) but in OPT add -va
Hopefully that gives you some extra output about what it is looking for.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #32 on: December 13, 2018, 05:29:20 am »
Odd...
Which way? Mine or Marcov?
Mine. I was still trying to adapt my "make distclean clean all install".
Tomorrow, I'll try yours.
Ant then, Marcov's.

Quote
This is an unmodified copy of fixes 3.2?  (first get the unmodified to build, then see what happens when you make changes...)

I just did a build of fixes3.2 rev 40528. So it the build is not broken. Sometimes it just is a bad commit.

Also sometimes it will fail if build with certain options (I several times noticed that it was unable to build with -CR / but there may be other options). So try building with no extra opts at all.

CustApp is in fcl-base (filesystem search) and that is listed in the include path on your output.
Restart your build (without cleaning) but in OPT add -va
Hopefully that gives you some extra output about what it is looking for.
Thanks.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11382
  • FPC developer.
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #33 on: December 13, 2018, 10:25:08 am »
The unit paths that refer to a top level  FPC dir are dodgy somehow:

 -FuC:\lazarus\fpc\3.2.0\units\i386-win32\fcl-base\

just compiled fcl-base units come from:

 -FuC:\lazarus\fpc\3.2.0\packages\fcl-base\uniits\i386-win32

You either are not building (this part) using the toplevel file, or are passing random unit paths.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9791
  • Debugger - SynEdit - and more
    • wiki
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #34 on: December 25, 2018, 12:53:20 pm »
For Windows users: FPC 3.2.0 beta revision 40627 (bundled with Lazarus 2.0RC3) is available for testing the FPC branch.
https://sourceforge.net/projects/lazarus-snapshots/files/

BSaidus

  • Hero Member
  • *****
  • Posts: 540
  • lazarus 1.8.4 Win8.1 / cross FreeBSD
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #35 on: December 26, 2018, 07:39:35 pm »
Hello !!
I Wonder which version of FPC will be shiped with lazarus 2.
I'm confused.
I want really to use mORMot with the next release of FPC.
thanks.
lazarus 1.8.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

zeljko

  • Hero Member
  • *****
  • Posts: 1594
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #36 on: December 26, 2018, 07:42:39 pm »
3.0.4, 3.2 won't be released soon.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9791
  • Debugger - SynEdit - and more
    • wiki
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #37 on: December 26, 2018, 08:24:57 pm »
Yes Lazarus 2.0 will be shipped with 3.0.4. Same as the official release candidates.

The installers including the 3.2-beta are for testing of the FPC branch only.

antispam88

  • Jr. Member
  • **
  • Posts: 60
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #38 on: December 30, 2018, 10:53:24 am »
Hi,

we are using the pascalio package (https://github.com/SAmeis/pascalio).
The package uses following construct with inheritance:
Code: Pascal  [Select][+][-]
  1.   TADConverter = class(TObject)
  2.   protected
  3.     class function GetMaxValue: Longint; static; virtual; abstract;
  4.     ...
  5.   public
  6.     class property MaxValue: Longint read GetMaxValue;
  7.     ...
  8.   end;
  9.  

With Lazarus 1.8.4 / FPC 3.0.4 it is compiling without an error but with 2.0.0 RC3 / 3.2.0 (rev. 59877) I'm getting following error:
fpadc.pas(60,50) Error: Procedure directive "VIRTUAL" cannot be used with "STATIC".

So for me there are two questions:
1) Is it an error that this is possible in 1.8.4/3.0.4? See https://www.freepascal.org/docs-html/3.0.0/ref/refse39.html.
2) And how is the correct solution for that problem?

Best regards,
antispam88

Cyrax

  • Hero Member
  • *****
  • Posts: 836
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #39 on: December 30, 2018, 11:06:42 am »
Hi,

we are using the pascalio package (https://github.com/SAmeis/pascalio).
The package uses following construct with inheritance:
Code: Pascal  [Select][+][-]
  1.   TADConverter = class(TObject)
  2.   protected
  3.     class function GetMaxValue: Longint; static; virtual; abstract;
  4.     ...
  5.   public
  6.     class property MaxValue: Longint read GetMaxValue;
  7.     ...
  8.   end;
  9.  

With Lazarus 1.8.4 / FPC 3.0.4 it is compiling without an error but with 2.0.0 RC3 / 3.2.0 (rev. 59877) I'm getting following error:
fpadc.pas(60,50) Error: Procedure directive "VIRTUAL" cannot be used with "STATIC".

So for me there are two questions:
1) Is it an error that this is possible in 1.8.4/3.0.4? See https://www.freepascal.org/docs-html/3.0.0/ref/refse39.html.
2) And how is the correct solution for that problem?

Best regards,
antispam88

Remove the virtual and abstract modifiers?

antispam88

  • Jr. Member
  • **
  • Posts: 60
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #40 on: December 30, 2018, 11:13:14 am »
As I remarked it is used with inheritance:
Code: Pascal  [Select][+][-]
  1.   TMCP3X0X = class(TADConverter)
  2.   ...
  3.   end;
  4.  
  5.   TMCP300X = class(TMCP3X0X)
  6.   protected                
  7.     class function GetMaxValue: Longint; static; override;
  8.   end;
  9.  

Cyrax

  • Hero Member
  • *****
  • Posts: 836
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #41 on: December 30, 2018, 11:55:34 am »
Quote
The reason for the requirement is that a class property is associated to the particular class in which it is defined, but not to descendent classes. Since class methods can be virtual, this would allow descendent classes to override the method, making them unsuitable for class property access.

As the documentation say, you can't use class property getters/setters that way. If 3.0.4 version of FPC allows it, then it is a bug and it is fixed 3.2.x series.

hnb

  • Sr. Member
  • ****
  • Posts: 270
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #42 on: December 30, 2018, 01:05:08 pm »
Quote
The reason for the requirement is that a class property is associated to the particular class in which it is defined, but not to descendent classes. Since class methods can be virtual, this would allow descendent classes to override the method, making them unsuitable for class property access.

As the documentation say, you can't use class property getters/setters that way. If 3.0.4 version of FPC allows it, then it is a bug and it is fixed 3.2.x series.
I can confirm, this was bug, fixed in 3.2.x (see my rev. 35724)
Checkout NewPascal initiative and donate beer - ready to use tuned FPC compiler + Lazarus for mORMot project

best regards,
Maciej Izak

BrunoK

  • Sr. Member
  • ****
  • Posts: 452
  • Retired programmer
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #43 on: January 02, 2019, 09:47:26 am »
Re : NEW FPC TRUNK VERSION, has still issue 0033963: Wrong result when a currency variable is multiplied by a constant.
NOT YET FIXED !
Code: Pascal  [Select][+][-]
  1. program prjTestCurrency;
  2.  
  3. { Fails with Free Pascal Compiler version 3.3.1 [2019/01/02] for i386 }
  4.  
  5. {$mode objfpc}{$H+}
  6.  
  7. var
  8.   C: currency;
  9. begin
  10.   c := 1000;
  11.   c := c * 1.05;
  12.   // at this point C=1000 instead of 1050
  13.   WriteLn(c);
  14.   ReadLn;
  15. end.
  16.  
  17.  
Output :  1.000000000000000000E+03   1000

This issue is super dangerous for database software using monetary values, because one could execute a SQL batch update and not be conscious it ends with wrong values in the updated fields.                                                                                                                                                                             

hnb

  • Sr. Member
  • ****
  • Posts: 270
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #44 on: January 02, 2019, 10:28:02 am »
Currency usage in FPC is risky. Currency can fails in other hard to debug cases. Small example : https://github.com/LongDirtyAnimAlf/fpcupdeluxe/issues/75#issuecomment-431494080

AFAIK not reported yet on bugtracker  :-[
Checkout NewPascal initiative and donate beer - ready to use tuned FPC compiler + Lazarus for mORMot project

best regards,
Maciej Izak

 

TinyPortal © 2005-2018