Recent

Author Topic: Preparing FPC 3.2.4, point out road blocks now  (Read 16058 times)

Fred vS

  • Hero Member
  • *****
  • Posts: 2509
    • StrumPract is the musicians best friend
Re: Preparing FPC 3.2.4, point out road blocks now
« Reply #15 on: October 26, 2021, 02:00:09 pm »
Hello.

I did try to compile my apps with last commit of fixes_3_2.

Code: Pascal  [Select][+][-]
  1. fred@ /usr/lib/fpc/3.2.3/ppcx64 -iV
Quote
3.2.3

OK, even without your -Xg baa28faa19 patch, now it compiles and link ( with a warning ) and run all my apps with -Cg.

Quote
Hint: (11030) Start of reading config file /etc/fpc.cfg
Hint: (11031) End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 3.2.3 [2021/10/26] for x86_64
Copyright (c) 1993-2021 by Florian Klaempfl and others
(1002) Target OS: Linux for x86-64
(3104) Compiling strumpract.pas
...
(9015) Linking strumpract
/usr/bin/ld: /usr/lib/fpc/3.2.3/units/x86_64-linux/rtl/si_c.o: warning: relocation in read-only section `.text.n_si_c_$$__fpc_libc_start'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
(1008) 567509 lines compiled, 15.7 sec
(1021) 128 warning(s) issued
(1022) 2961 hint(s) issued
(1023) 545 note(s) issued

So, nice, already without patch, fpc 3.2.3 can create pie (with a warning) apps that use BGRABitmap.
[EDIT] Imho the warning is ok because it shows that the pie linking was done.

Fre;D


« Last Edit: October 26, 2021, 07:20:10 pm by Fred vS »
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

Fred vS

  • Hero Member
  • *****
  • Posts: 2509
    • StrumPract is the musicians best friend
Re: Preparing FPC 3.2.4, point out road blocks now
« Reply #16 on: October 26, 2021, 02:26:11 pm »
I Am I testing what I think I am testing ?
Davo

Hello Davo.

I do this and it install fpc 3.2.3 out-of-the-box:

1) Download source + unzip : https://gitlab.com/freepascal.org/fpc/source/-/archive/fixes_3_2/source-fixes_3_2.zip

2) Create a script file named "build_fpc64_linux.sh" and save it into /source-fixes_3_2/build_fpc64_linux.sh

Here the script:

Code: Pascal  [Select][+][-]
  1. #!/bin/sh
  2.  
  3. COMPILER=/usr/lib/fpc/3.2.0/ppcx64
  4.  
  5. make clean
  6. make all FPC=$COMPILER OPT="-Fl/usr/local/lib"
  7. make FPC=$COMPILER install INSTALL_PREFIX=/usr/
  8.  

Then do :
Code: Pascal  [Select][+][-]
  1. > cd /thedirectoryof/source-fixes_3_2/

Then
Code: Pascal  [Select][+][-]
  1. sudo build_fpc64_linux.sh

It will compile + install fpc 3.2.3 in /usr/lib/fpc/3.2.3/

Fre;D



I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

dbannon

  • Hero Member
  • *****
  • Posts: 1674
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Preparing FPC 3.2.4, point out road blocks now
« Reply #17 on: October 26, 2021, 02:41:52 pm »
I Am I testing what I think I am testing ?
Davo

Hello Davo.

I do this and it install fpc 3.2.3 out-of-the-box:
....

Thanks Fred, I am doing pretty much the same but not installing into root space.

But when you do as you say, does your Fixes install claim to be version 3.2.0 ?

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

Fred vS

  • Hero Member
  • *****
  • Posts: 2509
    • StrumPract is the musicians best friend
Re: Preparing FPC 3.2.4, point out road blocks now
« Reply #18 on: October 26, 2021, 02:49:08 pm »
But when you do as you say, does your Fixes install claim to be version 3.2.0 ?

Davo

Sorry but I dont understand.
What fixes, in previous post it is only to compile + install original fpc 3.2.3.

Are you talking about a warning when I did the fixes for fpc 3.3.1 ( reverted a problematic commit )?
If so, also no claim at installation.

But maybe I miss something.

Fre;D
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

Seenkao

  • Sr. Member
  • ****
  • Posts: 261
Re: Preparing FPC 3.2.4, point out road blocks now
« Reply #19 on: October 26, 2021, 07:48:10 pm »
Is this a regression from 3.0.4 or 3.2.0? If not, then this has no place here.
Да, я неправильно понял суть топика. Это не регресс, это обычное поведение для всех компиляторов 3.0.4, 3.2.1, 3.2.2.

Видимо это ни когда не случится.... ))) Уже давно было ввести переменные, которые подменяют числа и для Linux (и вероятно для многих других систем, кроме Windows - где это сделано).

Извиняюсь, что потревожил.

Eng:Yes, I misunderstood the essence of the topic. This is not a regression, this is the usual behavior for all compilers 3.0.4, 3.2.1, 3.2.2.

Apparently this will never happen....))) It has long been possible to introduce variables that substitute numbers for Linux (and probably for many other systems other than Windows - where this is done).

I'm sorry for disturbing you.

FPK

  • Moderator
  • Full Member
  • *****
  • Posts: 115
Re: Preparing FPC 3.2.4, point out road blocks now
« Reply #20 on: October 26, 2021, 08:23:26 pm »
Hello.

After high fight I found the commit that makes me problems:
Commit ee10850a of 17 Oct, 2021: Reducing and aligning ...
https://gitlab.com/freepascal.org/fpc/source/-/commit/ee10850a5793b69b19dc82b9c28342bdd0018f2e

Since that commit all my applications do not run anymore.

So maybe your patch for fpc 3.2.4 for -Cg will work but I cannot test it with last trunk 3.3.1 ( because of this ee10850a commit ).

[Out of the subject of the topic]
For msegui and some other console apps (did not test LCL), there is a serious problem since commit ee10850a5793.

Well, they probably make assumptions about internla structures they shouldn't:

https://wiki.freepascal.org/User_Changes_Trunk#System_-_Ref._count_of_strings

But please keep such unrelated things out of this thread. It is about regressions of 3.2.3 against 3.2.2 and 3.0.4

Fred vS

  • Hero Member
  • *****
  • Posts: 2509
    • StrumPract is the musicians best friend
Re: Preparing FPC 3.2.4, point out road blocks now
« Reply #21 on: October 26, 2021, 08:41:20 pm »
But please keep such unrelated things out of this thread. It is about regressions of 3.2.3 against 3.2.2 and 3.0.4

OK, ok ( but you asked me  :-[) :
Quote
Can you please check after baa28faa19 with main/3.3.1? If it helps, I merge it.

And to check it, better to be able to run it...
Anyway, like explained in last post, with last fixes-3.2.3 the PIE binary is created at linking with a warning from linker and runs ok, like with fpc 3.0.4 (where there was no warning).

With your patch pic-field, the link is OK too, without any warning.
Imho a little note like "PIE link done." would be welcome, my 0.0001 cent, of course.

Fre;D

PS: If you want, I may apply your pic-field patch for 3.3.1 to  3.2.3 and see if all is OK ( but it should be ok ).
« Last Edit: October 26, 2021, 08:43:27 pm by Fred vS »
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

dbannon

  • Hero Member
  • *****
  • Posts: 1674
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Preparing FPC 3.2.4, point out road blocks now
« Reply #22 on: October 27, 2021, 01:20:50 am »

Sorry but I dont understand.
What fixes, in previous post it is only to compile + install original fpc 3.2.3.


When I download FPC fixes_3_2, compile and install, the resulting fpc reports itself as being 3.2.0 - I expect it to be 3.2.3 as mentioned several times in this thread.

Just to be clear, I download https://gitlab.com/freepascal.org/fpc/source/-/archive/fixes_3_2/source-fixes_3_2.zip. It includes a version.pas file that does have appropriate version numbers in it (but a very out of date copyright statement) but when that source is used, compiled and installed I get -

Code: Pascal  [Select][+][-]
  1. dbannon@dell:~/bin/FPC/fixes_3_2/bin$ pwd
  2. /home/dbannon/bin/FPC/fixes_3_2/bin
  3. dbannon@dell:~/bin/FPC/fixes_3_2/bin$ ls -la fpc
  4. -rwxr-xr-x 1 dbannon dbannon 518512 Oct 26 18:47 fpc
  5. dbannon@dell:~/bin/FPC/fixes_3_2/bin$ ./fpc -iV
  6. 3.2.0                                         // this line should say 3.2.3 IMHO
  7. dbannon@dell:~/bin/FPC/fixes_3_2/bin$

See, fpc -iv reports itself as being 3.2.0, -iW reports the same thing - I would expect it to be 3.2.3 or, even 3.2.2 but certainly not 3.2.0.  And the copyright ....

I would like to test fixes_3_2, the one that is likely to become 3.2.4 shortly, I believe it is tagged 3.2.3. Like you Fred, I am interested in the Hardening, especially if changes are being made to how it works this late in the process. I think its important that end users like me test things like FPC but if I cannot be sure just what I am testing, there is no point.

I am the first to admit I may be doing something wrong, but if I am, maybe its because the correct process is unclear ?  Other potential users may be just as silly as I apparently am.

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

Fred vS

  • Hero Member
  • *****
  • Posts: 2509
    • StrumPract is the musicians best friend
Re: Preparing FPC 3.2.4, point out road blocks now
« Reply #23 on: October 27, 2021, 01:40:06 am »

I am the first to admit I may be doing something wrong, but if I am, maybe its because the correct process is unclear ?  Other potential users may be just as silly as I apparently am.

Davo

Please, could you give the script that you used to compile + install fpc?

[EDITED]

Here the content of /compiler/version.pas that I get from  https://gitlab.com/freepascal.org/fpc/source/-/archive/fixes_3_2/source-fixes_3_2.zip.

Code: Pascal  [Select][+][-]
  1. unit version;
  2.  
  3. {$i fpcdefs.inc}
  4.  
  5. interface
  6.  
  7.     const
  8.        { version string }
  9.        version_nr = '3';
  10.        release_nr = '2';
  11.        patch_nr   = '3';
  12.        minorpatch = '';

Very strange that you get something else...
« Last Edit: October 27, 2021, 02:00:28 am by Fred vS »
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

dbannon

  • Hero Member
  • *****
  • Posts: 1674
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Preparing FPC 3.2.4, point out road blocks now
« Reply #24 on: October 27, 2021, 03:45:56 am »

Please, could you give the script that you used to compile + install fpc?

No script needed, its just -
Code: Pascal  [Select][+][-]
  1. make all
  2. make install INSTALL_PREFIX=/home/dbannon/bin/FPC/fixes_3_2/
Thats all I have ever used for that job.

Quote
Here the content of /compiler/version.pas that I get from  https://gitlab.com/freepascal.org/fpc/source/-/archive/fixes_3_2/source-fixes_3_2.zip.

Yes, I quoted the same content from version.pas several posts ago. Thats why I considered it worth raising.

I think I will try the same process on a clean vm, but it will require FPC3.2.[0,2] of course....

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

Fred vS

  • Hero Member
  • *****
  • Posts: 2509
    • StrumPract is the musicians best friend
Re: Preparing FPC 3.2.4, point out road blocks now
« Reply #25 on: October 27, 2021, 04:28:42 am »
Hello Davo.

Yep, I think I get it.

Indeed, doing like you did, not in /usr/  but in directory /home/fred/fpc_test/ :

Testing fpc:

Code: Pascal  [Select][+][-]
  1. /home/fred/fpc_test/bin/fpc -iV
Quote
3.2.2

But if you test ppcx64

Code: Pascal  [Select][+][-]
  1.  /home/fred/fpc_test/lib/fpc/3.2.3/ppcx64 -iV
Quote
3.2.3

Indeed, very strange....

[EDIT] And I confirm that my /usr/bin/fpc also show 3.2.2 ( the compiler used to compile ppcx64 ), so yes, imho there is something not normal.

Fre;D

« Last Edit: October 27, 2021, 04:57:25 am by Fred vS »
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

dbannon

  • Hero Member
  • *****
  • Posts: 1674
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Preparing FPC 3.2.4, point out road blocks now
« Reply #26 on: October 27, 2021, 07:32:32 am »
OK, so, what I see now - we are both building FPC 3.2.3 but we are using a different compiler to build it, there is a pattern -

Fred uses 3.2.2 to compile and gets a fpc that thinks its 3.2.2

Davo uses 3.2.0 to compile and gets a fpc that thinks its 3.2.0

So, Davo tries a clean vm, installs from the ubuntu repo 3.2.2 and uses that to build the 3.2.3 source, and, you guessed it, the result thinks its 3.2.2 !

So, the version that fpc reports does not depend on its own source code, it depends on the version of the compiler used to build it !  Maybe the build process is intended to use the newly build ppcx64 to build fpc but somehow ends up using the underlying 'old' one ?

And yep, testing ppcx64 does report 3.2.3 - thats positive at least.

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

dbannon

  • Hero Member
  • *****
  • Posts: 1674
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Preparing FPC 3.2.4, point out road blocks now
« Reply #27 on: October 27, 2021, 09:43:26 am »
...
No, you shouldn't be surprised and no, you're not testing what you think you're testing.

The fpc compiler driver binary picks up the real backend compiler binaries either if they're in the same directory (e.g. on Windows or if you install using our installation scripts provided with the binary releases) or if they're in PATH. If you simply do a make install neither will be true. So you need to temporary put lib/fpc/3.2.3/ (where ppcx64 resides) into your PATH (at the front) so that the correct binary is picked up.

Indeed, I worked out at least some of that just now.  I found that by putting the (3.2.3) ppcx64 in the same directory as the fpc executable (much as I do when setting up a cross compiler), I got the result I expected.  My initial test was a little artificial, not having my PATH pointing to the new fpc. Now I can confidently test properly, for that I will have to change my PATH.

Thanks PascalDragon, I feel a lot more comfortable now.

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

PascalDragon

  • Hero Member
  • *****
  • Posts: 3496
  • Compiler Developer
Re: Preparing FPC 3.2.4, point out road blocks now
« Reply #28 on: October 28, 2021, 09:09:38 am »
Thanks PascalDragon, I feel a lot more comfortable now.

Good. :)

By the way: can it be that someone removed the post of mine that dbannon quoted from? :o

avk

  • Hero Member
  • *****
  • Posts: 504
    • my self-education project
Re: Preparing FPC 3.2.4, point out road blocks now
« Reply #29 on: October 28, 2021, 09:47:17 am »
Аccidentally discovered that FPC 3.2.2(and 3.3.1)-win64 lacks compiled units for the GMP package. Are there any reasons for this?

 

TinyPortal © 2005-2018