Recent

Author Topic: Portable verion of FPC and Lazarus  (Read 1637 times)

LeP

  • Sr. Member
  • ****
  • Posts: 337
Re: Portable verion of FPC and Lazarus
« Reply #15 on: May 19, 2026, 08:20:29 pm »
Compilers create enourmous impact on SSD, less than cache of browsers (which can be totally avoided/disabled), but still we have enormous transfer rate, thus lifespan of SSD will be quite fast reached.

@backprop
Then have fpcupdeluxe for install and have configure compiler output result to virtual memory.

In Delphi I use a ram disk. All my projects compile on ram disk all temp things, like dcu, maps, debug. Simple and reliable.
Of course in Windows.
Un Sistema per domarli, un IDE per trovarli, un codice per ghermirli e nel framework incatenarli.
An operating system to tame them, an IDE to find them, a code to catch them and in the framework chain them.

backprop

  • Full Member
  • ***
  • Posts: 236
Re: Portable verion of FPC and Lazarus
« Reply #16 on: May 19, 2026, 08:47:56 pm »
In Delphi I use a ram disk. All my projects compile on ram disk all temp things, like dcu, maps, debug. Simple and reliable.
Of course in Windows.

Delphi is quite different... It doesn't recompile RTL nor components when some compiler directives where changed. Long time ago was talking about making and using components dynamically as in Delphi, but that never accomplished and it will never hapens...

With need of multiple FPC/Lazarus versions, at least two, last "official" release and one from trunk it is clear why transfer rate with SSD is quite enormous...
« Last Edit: May 19, 2026, 08:55:30 pm by backprop »

Thausand

  • Hero Member
  • *****
  • Posts: 560
Re: Portable verion of FPC and Lazarus
« Reply #17 on: May 19, 2026, 09:53:48 pm »
In Delphi I use a ram disk. All my projects compile on ram disk all temp things, like dcu, maps, debug. Simple and reliable.
Of course in Windows.
Can make same for freepascal/lazarus for windows/linux (not know for mac) and also use ramdisk (is same virtual memory) if want.

is also hint for backprop, it no matter what do delphi and what do freepascal/lazarus: make output for store at virtual memory.
A docile goblin always follow HERMES.md

backprop

  • Full Member
  • ***
  • Posts: 236
Re: Portable verion of FPC and Lazarus
« Reply #18 on: May 20, 2026, 12:22:57 am »
is also hint for backprop, it no matter what do delphi and what do freepascal/lazarus: make output for store at virtual memory.

This solves practically nothing if all need to be recompiled all over all the time and set all over again on every project and Lazarus itself. Long time ago, when memory and speed was limited and precious, all needed to be optimized, even compiled files, now, another approach need to be done in order to avoid SSD destruction. Why not focus on that?

Would it be possible to rebuild entire Layarus in memory and how much will be last full process? Well, that is not solution in this case.

Thausand

  • Hero Member
  • *****
  • Posts: 560
Re: Portable verion of FPC and Lazarus
« Reply #19 on: May 20, 2026, 12:50:08 pm »
This solves practically nothing if all need to be recompiled all over all the time and set all over again on every project and Lazarus itself. Long time ago, when memory and speed was limited and precious, all needed to be optimized, even compiled files, now, another approach need to be done in order to avoid SSD destruction. Why not focus on that?
That is why exist special filesystem that is SSD optimize.

Quote
Would it be possible to rebuild entire Layarus in memory and how much will be last full process? Well, that is not solution in this case.
Yes, /and/ run lazarus complete in memory if want but I not know what is "how much be last full process".
A docile goblin always follow HERMES.md

backprop

  • Full Member
  • ***
  • Posts: 236
Re: Portable verion of FPC and Lazarus
« Reply #20 on: May 20, 2026, 05:57:12 pm »
That is why exist special filesystem that is SSD optimize.

For instance? I'm not aware of any, except to use live distro. Every distro, every application I'm aware saves quite a bit data withouth single reason, not only caches which can be relocated or disable in some way. Even with large  buffer and algorithm to distribute data blocks inside SSDs, phycial limitation of FETs can't be avoided. Others prefer to buy cheap SSDs on ever few months and do not care much even on agresivelly writing browser cache... On everything is need to take care to minimize transfer rate on SSD.

Quote
Yes, /and/ run lazarus complete in memory if want but I not know what is "how much be last full process".

I do that already for my own small projects, but since IDE need to be recompiled from time to time and even on changing project model and some directives all seems quite messy and unpredictable...

It doesn't really matters if you do not care for SSD lifespan...
« Last Edit: May 20, 2026, 10:40:15 pm by backprop »

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12901
  • FPC developer.
Re: Portable verion of FPC and Lazarus
« Reply #21 on: May 20, 2026, 07:03:23 pm »
For instance? I'm not aware of any, except to use live distro. Every distro, every application I'm aware saves quite a bit data withouth single reason, not only caches which can be relocated or disable in some way. Even with large  buffer and algorithm to distribute data blocks inside SSDs, phycial limitation of FETs can't be avoided. Others prefer to buy cheap SSDs on ever few months and do not care much even on agresivelly writing browser cache... On everything is need to take care to minimize transfer rate on SSD.

Are you talking flash drives or cards or SSDs? I still have all my SSDs(close to ten in total), including the early 2008 one in my Core2 6600 that survived doing FPC development for half a decade.



backprop

  • Full Member
  • ***
  • Posts: 236
Re: Portable verion of FPC and Lazarus
« Reply #22 on: May 20, 2026, 10:58:58 pm »
Are you talking flash drives or cards or SSDs? I still have all my SSDs(close to ten in total), including the early 2008 one in my Core2 6600 that survived doing FPC development for half a decade.

By "cards" you meant nvme? Well, all use basically the same technology and NAND chips. And all FETs (one bit cells) become damages slighty during erased/writing cycle. It is all in specification of is. Cheap one have very short lifespan, maybe just few 1000s, some quality ones even 30 or 50 000 cycles... You can't generalize in form "I never had any problems with" if you do not know exactly manufacturers specification. I use one some 4 years and still have 90% lifespan left with perfect SMART status. But some my collegue bough the same model when I did and he ruin it in 3 months complaining it is garbage... But he didn't take any precaution measures to minimize transfer, even he use it for OS only...
« Last Edit: May 20, 2026, 11:04:06 pm by backprop »

Thausand

  • Hero Member
  • *****
  • Posts: 560
Re: Portable verion of FPC and Lazarus
« Reply #23 on: May 21, 2026, 05:52:53 am »
For instance?
UBIFS, JFFS, F2FS etc.

Quote
Even with large  buffer and algorithm to distribute data blocks inside SSDs, phycial limitation of FETs can't be avoided.
You make confuse write  :D You want use or not want use SSD ?

if want SSD then SSD have limit (platter HDD have also limit but have more better limit when not throw/vibrate).

Then exist filesystem that have know flash memory and store data and use special method for this.

You write not want and only solution is live distro. I make suggest write output to memory and then you have write this not work ok (it do).

Then is also exist frugal install and is other solution for not write live physical device (read only).

Quote
I do that already for my own small projects, but since IDE need to be recompiled from time to time and even on changing project model and some directives all seems quite messy and unpredictable...
May be I not have understand correct what is mean messy...

It work same as write SSD/HD only differ is all byte is store in side memory.


And may be I not have understand correct what is mean unpredictable...

Process for build (fpc and lazarus) all make same result every time (ok, location is can differ).


I have run linux SSD and use simple ext4 for many years. I make all build output to memory and only make install SSD when want have for keep.

Example cache browser you write is for me configure and store memory.

I have think is many misunderstand what is make wear SSD and how can make measure for prevent. There is exist SSD and have error controller firmware or have bad SSD (or have fake replicate). It is happen some time.

I not write you have no valid concern but there is exist solution for have more better care for SSD if want.
A docile goblin always follow HERMES.md

Thaddy

  • Hero Member
  • *****
  • Posts: 19268
  • Glad to be alive.
Re: Portable verion of FPC and Lazarus
« Reply #24 on: May 21, 2026, 06:07:32 am »
Delphi is quite different... It doesn't recompile RTL nor components when some compiler directives where changed. Long time ago was talking about making and using components dynamically as in Delphi, but that never accomplished and it will never hapens...
A lot of effort is currently being made to achieve just that. Better follow the development a bit closer. Not Lazarus, but the compiler.
It is not by any means ready yet, but PascalDragon, who leads that development,  has only so much time and the time available for FPC is for a great deal spend on just that: Dynamic packages.
Once that is in place, the recompile cycle for Lazarus becomes obsolete.
Note that that only bothers me on my last Raspberry Pi 1 that still works. Recompile is quick even on modest hardware.
« Last Edit: May 21, 2026, 06:12:52 am by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

backprop

  • Full Member
  • ***
  • Posts: 236
Re: Portable verion of FPC and Lazarus
« Reply #25 on: May 21, 2026, 07:38:50 am »
You make confuse write  :D You want use or not want use SSD ?
...
May be I not have understand correct what is mean messy...
...

If you do not understand, then stop replying, simple as that. I was perfectly clear what I refer to and from whom I expect clarification. And didn't I wrote that I do not want messy Ai replies? This is exactly what is happening here!
« Last Edit: May 21, 2026, 07:40:29 am by backprop »

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12901
  • FPC developer.
Re: Portable verion of FPC and Lazarus
« Reply #26 on: May 21, 2026, 09:46:14 am »
Are you talking flash drives or cards or SSDs? I still have all my SSDs(close to ten in total), including the early 2008 one in my Core2 6600 that survived doing FPC development for half a decade.

By "cards" you meant nvme?

No SD cards. I did rot quite a few in my older RPIs over time. Which is why I in the end attached an old sata SSD via an USB->Sata converter to it. I compile on the SSD, not on the SD.

Quote
Well, all use basically the same technology and NAND chips. And all FETs (one bit cells) become damages slighty during erased/writing cycle.

Yes, but different kinds quality and  overprovisioning.

Quote
It is all in specification of is. Cheap one have very short lifespan, maybe just few 1000s, some quality ones even 30 or 50 000 cycles... You can't generalize in form "I never had any problems with" if you do not know exactly manufacturers specification. I use one some 4 years and still have 90% lifespan left with perfect SMART status. But some my collegue bough the same model when I did and he ruin it in 3 months complaining it is garbage... But he didn't take any precaution measures to minimize transfer, even he use it for OS only...

I have OS and the compile business on it, and work 40 hrs a week ( plus maybe another hobby) on it. Several SSDs, the current one (my first NMVE TLC though) holding up fine for 6+ years already. Several at work, but those get stressed less.


backprop

  • Full Member
  • ***
  • Posts: 236
Re: Portable verion of FPC and Lazarus
« Reply #27 on: June 06, 2026, 08:40:34 pm »
I finally found a bit of time to play with this. It is not quite solved, but it is a progress...

Building FPC and Lazarus from source (KDE and Qt5)

Assume FPC 3.2.2 and Lazarus 4.6 where installed from .deb "official"

Craeted /FPC_LAZ directory in /tmp and from it performed:

git clone https://gitlab.com/freepascal.org/fpc/source.git
git clone https://gitlab.com/freepascal.org/lazarus/lazarus/-/tree/main

Assume there is two directories now:

/tmp/FPC_LAZ/fpc-main
/tmp/FPC_LAZ/lazarus-main

Assume also this is installed as minimum:

sudo apt-get install git build-essential pkg-config libgtk2.0-dev libgtk-3-dev libpango1.0-dev libx11-dev libgdk-pixbuf2.0-dev libqt5pas-dev

or

sudo apt-get sudo apt-get install git build-essential pkg-config libgtk2.0-dev libgtk-3-dev libpango1.0-dev libx11-dev libgdk-pixbuf2.0-dev libxpm-dev libjpeg-dev libtiff-dev libpng-dev libxtst-dev libxaw7-dev libglu1-mesa-dev libqt5pas-dev

For FPC this should be performed from FPC_LAZ:
make all -j

For Lazarus and qt5:
make bigide -j LCL_PLATFORM=qt5

/tmp/FPC_LAZ/fpc-main/compiler/ppcx64
Free Pascal Compiler version 3.3.1 [2026/06/06] for x86_64
Copyright (c) 1993-2026 by Florian Klaempfl and others

Now:
/tmp/FPC_LAZ/lazarus-main/lazarus --primary-config-path=/tmp/FPC_LAZ

or

/tmp/FPC_LAZ/lazarus-main/lazarus --pcp=/tmp/FPC_LAZ

And that works fine.

To compile Lazarus with new FPC for qt5:

make bigide -j FPC=/tmp/FPC_LAZ/fpc-main/compiler/ppcx64 LCL_PLATFORM=qt5


Now IDE only complaints it missing .cfg file after inserting /tmp/FPC_LAZ/fpc-main/compiler/ppcx64 as new compiler...

backprop

  • Full Member
  • ***
  • Posts: 236
Re: Portable verion of FPC and Lazarus
« Reply #28 on: June 07, 2026, 02:22:17 pm »
Well, IDE simply refuse to accept  /tmp/FPC_LAZ/fpc-main/compiler/ppcx64 even the rest is accepted.

This remain in Lazarus options:
/usr/bin/fpc
/usr/share/fpcsrc/$(FPCVER)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12411
  • Debugger - SynEdit - and more
    • wiki
Re: Portable verion of FPC and Lazarus
« Reply #29 on: June 07, 2026, 02:34:35 pm »
Now IDE only complaints it missing .cfg file after inserting /tmp/FPC_LAZ/fpc-main/compiler/ppcx64 as new compiler...

Is that the "fpc.cfg" file?

If you run the compiler from a shell
Code: Bash  [Select][+][-]
  1. cd /foo/lazarus
  2.  /tmp/FPC_LAZ/fpc-main/compiler/ppcx64 /tmp/project.pas

Assuming the pas file exists => does the compiler actually start compiling it?

The compiler needs an fpc.cfg file (so it can find all the fpc/rtl ppu files).



On Linux, the compiler will check in various global places. But if it find something there, and if that is from another version, then it wont work. (And if its the same version, but another install, it might use it but use the other installs ppu files).

you can compile with -va to see all the locations where it looks for the config.


 

TinyPortal © 2005-2018