Recent

Author Topic: Find revision of fpc  (Read 2825 times)

kapibara

  • Hero Member
  • *****
  • Posts: 610
Find revision of fpc
« on: August 15, 2017, 08:43:37 am »
How to know what revision an FPC installation has that is installed from sources?
Lazarus trunk / fpc 3.2.2 / Kubuntu 22.04 - 64 bit

Thaddy

  • Hero Member
  • *****
  • Posts: 14205
  • Probably until I exterminate Putin.
Re: Find revision of fpc
« Reply #1 on: August 15, 2017, 12:09:55 pm »
Well, with a default install there are no revision numbers...except 3.0.2, 3.0.4 etc.
But you can add them for trunk yourself.
Example:
sudo make clean all install REVSTR=36912 REVINC=force INSTALL_PREFIX=/usr/local/ OPT='-dREVINC -CpARMv7a -CfVFPv4 -OoFASTMATH -OpARMv7a -Fl/usr/lib/gcc/arm-linux-gnueabihf/4.9.2 -vm5024' GDBMI=1

After that built you will get a nice:

Free Pascal Compiler version 3.1.1-r36912 [2017/08/15] for arm
Copyright (c) 1993-2017 by Florian Klaempfl and others
/usr/local/bin/fpc [options] <inputfile> [options]
 Only options valid for the default or selected platform are listed.

So you will have to do it by hand or write a script.

The revision 36912 is what the svn checkout gives you in this case...

It is not for noobs. If you can't even build from source, don't use it.
Trunk is for freaks, debuggers and developers, not for programmers..
« Last Edit: August 15, 2017, 12:18:16 pm by Thaddy »
Specialize a type, not a var.

kapibara

  • Hero Member
  • *****
  • Posts: 610
Re: Find revision of fpc
« Reply #2 on: August 15, 2017, 08:10:52 pm »
Thanks. I do this to hunt down the fpc revision that broke some of PascalScripts 64bit support. Should be one of the late 2.7.1 revisions or among the early 3.1.1 ones.

In lack of better method I compile fpc, run a test with pascalscript, then skip to newer fpc revision, if not found I skip backwards ..and so on. When the script will crash I can look for changed code in that fpc revision. The pascalscript author Carlo Kok can then adapt his code to that. (The code for fpc constructors, likely)
« Last Edit: August 15, 2017, 09:22:22 pm by kapibara »
Lazarus trunk / fpc 3.2.2 / Kubuntu 22.04 - 64 bit

Thaddy

  • Hero Member
  • *****
  • Posts: 14205
  • Probably until I exterminate Putin.
Re: Find revision of fpc
« Reply #3 on: August 15, 2017, 10:04:38 pm »
You should forget about 2.7.1. That was years ago. And is a very old trunk version that became eventually 3.0.
If it is still not solved in 3.0.0, 3.0.2 or 3.0.4 RC then plz give us an example. Compilable example!
Specialize a type, not a var.

kapibara

  • Hero Member
  • *****
  • Posts: 610
Re: Find revision of fpc
« Reply #4 on: August 15, 2017, 11:27:20 pm »
Sure, I'll prepare a compilable demo. The fpc 2.7.1 I use only trying to find the revision and code lines that affected pascalscript.

Calling the code below from a script on any 64bit system using fpc 3.0 or higher results in a crash. Because constructors doesn't work from scripts anymore. It still works to create an object from within applications and use that from the script though.

Code: Pascal  [Select][+][-]
  1. var
  2.   sl: TStringList;
  3. begin
  4.   sl:= TStringList.Create;
  5.   sl.Add('Test');
  6. end;
  7.  

Last released version of FPC that fully supported 64bit and pascalscript is fpc 2.6.4 I think. 2.6.0 definitively works. 32-bit apps are not affected.


You should forget about 2.7.1. That was years ago. And is a very old trunk version that became eventually 3.0.
If it is still not solved in 3.0.0, 3.0.2 or 3.0.4 RC then plz give us an example. Compilable example!
Lazarus trunk / fpc 3.2.2 / Kubuntu 22.04 - 64 bit

 

TinyPortal © 2005-2018