Recent

Author Topic: recompile FPC 3.2.0 under lazarus 2.0.12  (Read 325 times)

folkeu08

  • New Member
  • *
  • Posts: 42
recompile FPC 3.2.0 under lazarus 2.0.12
« on: April 15, 2021, 11:51:48 am »
Hi all,
I have already read posts on this topic but it was a dialogue between experts. I am beginner level.

I create a master-detail application under splite3. To create this relation, I need to override 3 units including Tsqlite3dataset of FPC from this download: http://sqlite4fpc.yolasite.com/update-fpc-component.php.

how should I do under windows 10-64 bits to recompile FPC with modified units?

I found this tool fpcupdeluxe-x86_64-win64 but it will search the sources under github to reset everything, which I don't want.
Thank you
Fanch


Gustavo 'Gus' Carreno

  • Sr. Member
  • ****
  • Posts: 499
  • Professional amateur ;-P
Re: recompile FPC 3.2.0 under lazarus 2.0.12
« Reply #1 on: April 15, 2021, 12:27:29 pm »
Hey folkeu08,

No need to recompile FPC. On the page you linked, right at the top option 2:
Quote from: Update the fpc component
2. Add the directory of the new files to the compiler path

Just use it as any non visual library: Add path to project and voilá, done.

Hope it helps.

Cheers,
Gus
Lazarus 2.1.0(trunk) FPC 3.3.1(trunk) Ubuntu 20.10 64b Dark Theme
Lazarus 2.0.12(stable) FPC 3.2.0(stable) Ubuntu 20.10 64b Dark Theme
http://github.com/gcarreno

folkeu08

  • New Member
  • *
  • Posts: 42
Re: recompile FPC 3.2.0 under lazarus 2.0.12
« Reply #2 on: April 15, 2021, 04:13:34 pm »
OK, thanks.
I will try this method.
I'm afraid there will be a compile-level pb because 2 different code units will have the same name.
It suits me well if this method works because my installation will remain original (unmodified)
Fanch

ASBzone

  • Hero Member
  • *****
  • Posts: 615
  • Automation leads to relaxation...
    • Free Console Utilities for Windows (and a few for Linux) from BrainWaveCC
Re: recompile FPC 3.2.0 under lazarus 2.0.12
« Reply #3 on: April 15, 2021, 04:37:25 pm »
OK, thanks.
I will try this method.
I'm afraid there will be a compile-level pb because 2 different code units will have the same name.
It suits me well if this method works because my installation will remain original (unmodified)
Fanch

Why not consider the following instead?

Take the files you want to change, and put a copy of them in the folder with your other source files, and change them there.   Then, when you compile, they will be called from that location, rather than the normal location because of the search order.

-ASB: https://www.BrainWaveCC.com/

Lazarus v2.0.13 r64843 / FPC v3.2.1-r49055 (via FpcUpDeluxe) -- Windows 64-bit install w/Win32 and Linux/Arm cross-compiles
Primary System: Windows 10 Pro x64, Version 2009 (Build 19042)
Other Systems: Windows 10 Pro x64, Version 2009 (Build 19042) or greater

Bart

  • Hero Member
  • *****
  • Posts: 4238
    • Bart en Mariska's Webstek
Re: recompile FPC 3.2.0 under lazarus 2.0.12
« Reply #4 on: April 15, 2021, 06:19:53 pm »
But then any precompiled unit (in fpc) which uses one of those units, still uses the old code.
If you want to patch fpc, then by all means change the source, rebuild and re-install.

If you have the sources then
Code: [Select]
cd /path/to/fpc/sources
make all
make install

On Windows, this will build fpc, and then install it in c:\pp.
You'll have to generate a fpc.cfg file for this patched compiler, for which you can use fpcmkcfg.exe (it is in the same folder as your new fpc.exe).

Also, doing it this way will prevent name clashes and the infamous "unit not found" error (when it finds an incompatible ppu).

Bart

 

TinyPortal © 2005-2018