Forum > General
Recompile FPC Package
Weitentaaal:
Hello,
i wanted to reinstall the Package "fcl-pdf" because it hase some Fixes that i need. How do i recompile the package ?i found some posts about this already but i thought i would ask and maybe find an easier way to do it (i don't want to break my installation). i did download it from here: "https://gitlab.com/freepascal.org/fpc/source/-/tree/main/packages/fcl-pdf" and then replaced the package in my install folder. Now i need to recompile it. How should i do that ?
marcov:
Easiest: recompile everything in order (fpc - lazarus - additional packages).
If you feel like taking a chance, you could erase (or move away) the fcl-pdf directory in the fpc\units\<target> directory and replace it with the compiled files of the newer ones.
That only works if nothing else precompiled depends on it. If only lazarus packages depend on it, let lazarus rebuild itself.
Weitentaaal:
do i need trunk to recompile everything ?
or can i use the script from this site: "https://wiki.lazarus.freepascal.org/FPC_recompilation_automation" also with a normal installation ?
Khrys:
(Assuming 64-bit Windows and FPC 3.2.0; paths may need to be adjusted)
Replace C:/lazarus/fpc/3.2.0/source/packages/fcl-pdf with the new version of the package's source and run the following in a command line, in that directory:
--- Code: Text [+][-]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";}};} ---fpc fpmake.pp && ./fpmake --globalunitdir=../../..
Now you can copy the contents of the newly created units build directory into C:/lazarus/fpc/3.2.0/units/x86_64-win64/fcl-pdf.
But like Marco said, replacing a single package with another version is quite unlikely to work - so I wouldn't really recommend this approach.
TRon:
--- Quote from: Weitentaaal on August 07, 2024, 12:58:10 pm ---do i need trunk to recompile everything ?
--- End quote ---
No in case you are currently not using trunk compiler and yes if you currently use trunk compiler (see below)
In case using something like 3.2.2 (not trunk compiler) and if you are lucky then you should be able to get the trunk fcl-pdf sourcecode and compile that with your existing compiler.
It can get more complicated if other packages depend on (individual) units of the fcl-pdf package. In that case you need to recompile those as well.
--- Quote ---or can i use the script from this site: "https://wiki.lazarus.freepascal.org/FPC_recompilation_automation" also with a normal installation ?
--- End quote ---
Assuming that you are currently using FPC 3.2.2 then no. In case you want to update a trunk (currently 3.3.1) compiler then just do a checkout and a complete recompile (the script is then applicable) as it leaves no room for errors.
Navigation
[0] Message Index
[#] Next page