Recent

Author Topic: JCL compilable with FPC 3.0.4  (Read 4780 times)

denis.totoliciu

  • Jr. Member
  • **
  • Posts: 53
JCL compilable with FPC 3.0.4
« on: September 14, 2020, 12:54:44 pm »
Hello,

Have been recently working on making JCL compatible and compilable with FPC 3.0.4, both 32-bit and 64-bit, and succeeded in doing so. Haven't committed any pull requests to the GitHub repository yet.

Would like first to ask for your advice regarding the following ideas:

1. Do you think it would be useful to make JCL compilable with older versions of FPC?
2. If so, what would be the oldest version that should compile JCL, considering that some features may have to be excluded with IFDEFs?
3. JCL can be compiled with all its features, including the use of generic types and collections that it does internally, i.e. `JclDebug.pas`, by having the `Jcl.lpk` package use the `sparta_generics.lpk` package that comes delivered with Lazarus. Do you find the dependency on this package to be an issue?

Thank you,
Totoliciu Denis Dan

PascalDragon

  • Hero Member
  • *****
  • Posts: 5444
  • Compiler Developer
Re: JCL compilable with FPC 3.0.4
« Reply #1 on: September 14, 2020, 01:28:26 pm »
1. Do you think it would be useful to make JCL compilable with older versions of FPC?
2. If so, what would be the oldest version that should compile JCL, considering that some features may have to be excluded with IFDEFs?

Considering that FPC is free I'd say that this isn't a concern that much, however if you do this I'd say to only add support for 2.6.4 as that was the last version before the introduction of the code page aware String type.

3. JCL can be compiled with all its features, including the use of generic types and collections that it does internally, i.e. `JclDebug.pas`, by having the `Jcl.lpk` package use the `sparta_generics.lpk` package that comes delivered with Lazarus. Do you find the dependency on this package to be an issue?

Please note that this dependency is no longer required with 3.2.0 as there the generic collections are provided with FPC. Also these won't work with anything older than 3.0.x.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11351
  • FPC developer.
Re: JCL compilable with FPC 3.0.4
« Reply #2 on: September 14, 2020, 01:56:38 pm »
Have been recently working on making JCL compatible and compilable with FPC 3.0.4, both 32-bit and 64-bit, and succeeded in doing so. Haven't committed any pull requests to the GitHub repository yet.

Note that as of June FPC 3.2.0 is the latest and greatest version

Quote
1. Do you think it would be useful to make JCL compilable with older versions of FPC?

Hardly. Usually the versions of the current fixes branch( 3.2.x) and the last of the previous fixes branch (3.0.4) are in somewhat regular use. And the latter often only because it is the default version in more conservative Linux distributions. (this is not the situation yet, since 3.2 is still quite new, and not few Linux distributions have released new branches yet, and new FPC major versions always penetrate a bit more slowly. Package manager's cold feet I assume)

Quote
3. JCL can be compiled with all its features, including the use of generic types and collections that it does internally, i.e. `JclDebug.pas`, by having the `Jcl.lpk` package use the `sparta_generics.lpk` package that comes delivered with Lazarus. Do you find the dependency on this package to be an issue?

Yes, see Sven's answer. It is 3.0.4 specific and would break 3.2.0. I would focus on 3.2.0 first, since 3.0.4 usage will wane in the coming months as more and more distributions and future Lazarus releases target 3.2.0.

« Last Edit: September 14, 2020, 01:59:44 pm by marcov »

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: JCL compilable with FPC 3.0.4
« Reply #3 on: September 14, 2020, 02:24:41 pm »
To me, JCL and JVCL always have been Windows-centered. Will your JCL port be cross-platform?

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11351
  • FPC developer.
Re: JCL compilable with FPC 3.0.4
« Reply #4 on: September 14, 2020, 03:30:29 pm »
iirc jcldebug even contained own traceback code that was debug format dependent. And giganormous amounts of ancient (D7 times) assembler.

denis.totoliciu

  • Jr. Member
  • **
  • Posts: 53
Re: JCL compilable with FPC 3.0.4
« Reply #5 on: September 15, 2020, 01:32:14 am »
To me, JCL and JVCL always have been Windows-centered. Will your JCL port be cross-platform?

The JCL port is Windows only.

denis.totoliciu

  • Jr. Member
  • **
  • Posts: 53
Re: JCL compilable with FPC 3.0.4
« Reply #6 on: September 15, 2020, 02:11:48 am »
iirc jcldebug even contained own traceback code that was debug format dependent. And giganormous amounts of ancient (D7 times) assembler.

You are right, from the looks of it `JclDebug.pas` handles the debug format for Delphi debug information.
Took it as an example of unit that uses generic collections.

denis.totoliciu

  • Jr. Member
  • **
  • Posts: 53
Re: JCL compilable with FPC 3.0.4
« Reply #7 on: September 15, 2020, 02:25:39 am »
So from the advice gathered, the plan would look like this:

1. Make it work for version 3.2.0.
2. Optionally make it work for 3.0.4 and 2.6.4

Will get back to work on it and have it available for the FreePascal Community.
Thank you very much for your help!

 

TinyPortal © 2005-2018