Forum > Linux

Build lazarus and fpc in linux is not support multi thread.

(1/3) > >>

gasensor:
In linux build lazarus and fpc form source  is not support multi thread.


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---make all -j2
OS:   Fedora 35
fpc:   3.2.0 src
lazarus : 2.30(test edition)
make:  4.3

PascalDragon:
At least in FPC you additionally need to use FPMAKEOPT="-T 2". The reason is that one can not query the value of -j from within the Makefile and the majority of the package compilation is not handled by make, but instead by fpmake.
In Lazarus this might be the case as well, I don't know.

gasensor:
I compiled freepascal 3.2.0 use command above:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---make all FPMAKEOPT="-T 2"
And find it works  when compiling packages. Time costing is lower. In Lazarus(src 2.3.0) it do not work.

marcov:
That's on par with expectations. FPC compiles the packages part, and every core added beyond 2 has diminishing returns (though a six core is still faster with -T 6 than with -T 4, just not much).

Free Pascal compiling is not massively parallel like C, but there are reasons for that. (and some of those tradeoffs mean FPC is always quite fast)

gasensor:
But, as a Linux user, use"-j" is a habitual operation to build a large software.



--- Quote from: marcov on May 14, 2022, 05:16:56 pm ---That's on par with expectations. FPC compiles the packages part, and every core added beyond 2 has diminishing returns (though a six core is still faster with -T 6 than with -T 4, just not much).

Free Pascal compiling is not massively parallel like C, but there are reasons for that. (and some of those tradeoffs mean FPC is always quite fast)

--- End quote ---

Navigation

[0] Message Index

[#] Next page

Go to full version