What is the difference between fpc and ppcx64 ? lazarus / 1-Linux ---------------------------------------------------------------------- lazer · 2022-10-20 13:25 Hi, I just did a build of fresh pull of FPC main  using my distro's fpc. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i export FPCVER="3.3.1"make allmake install INSTALL_PREFIX=/usr ls -ail /usr/lib/fpc/3.3.1total 46681462708 drwxr-xr-x. 5 root root    4096 Oct 20 15:08 .1442640 drwxr-xr-x. 6 root root    4096 Oct 20 15:08 ..1732256 drwxr-xr-x. 3 root root    4096 Oct 20 15:08 fpmkinst1462711 drwxr-xr-x. 2 root root    4096 Oct 20 15:08 msg1462709 -rwxr-xr-x. 1 root root 4747696 Oct 20 15:08 ppcx641462710 -rwxr-xr-x. 1 root root  3446 Oct 20 15:08 samplecfg1462760 drwxr-xr-x. 3 root root    4096 Oct 20 15:08 units ls -ail `which fpc` `which ppcx64`1451555 -rwxr- xr-x. 1 root root 547472 Oct 20 15:08 /bin/fpc1456515 lrwxrwxrwx. 1 root root     25 Sep 21  2021 /bin/ppcx64 -> ../lib64/fpc/3.2.2/ppcx64   We see this installed as requested in /usr/lib  but also created /bin/fpc which is an executable, not a link and has a different size. What is the difference between fpc and ppcx64 and why does install two different compilers? TIA ---------------------------------------------------------------------- marcov · 2022-10-20 13:30 fpc is a frontend binary that calls architecture dependent backends. The x86_64 backend is called ppcx64, the 32-bit x86 ppc386 etc. The lib vs lib64 is a afaik distribution dependent thing. Some always reserve "lib" for the "main architecture" and name the secondary one lib32 or lib64, some always have lib (for 32-bit) and lib64 for 64-bit.  Moreover as 32-bit is phased out distributions might change scheme, since nothing in the Linux world is really nailed down. To work around, you can tell  "make install" what to use as prefix by passing INSTALL_PREFIX= e.g. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  make install INSTALL_PREFIX=/usr/lib64 ---------------------------------------------------------------------- lazer · 2022-10-20 13:41 Thanks but won't that end up in /usr/lib64/lib/  ? That's the prefix, not the install dir. Thanks for the explanation. Why is this "front-end" bigger than the actual compiler ? :? ---------------------------------------------------------------------- marcov · 2022-10-20 13:48 Quote from: lazer on October 20, 2022, 03:41:45 pmThanks but won't that end up in /usr/lib64/lib/  ? That's the prefix, not the install dir. Correct.   It should be INSTALL_LIBDIR it seems. QuoteThanks for the explanation. Why is this "front-end" bigger than the actual compiler ? :? ppcx64 is 4.7 MB, fpc is 0.547 so nearly ten times smaller. Did you miss a digit ? ---------------------------------------------------------------------- lazer · 2022-10-20 14:08 OK we'll call that a draw on the silly mistakes !  Thanks for the explanations. ---------------------------------------------------------------------- MarkMLl · 2022-10-20 20:30 Quote from: lazer on October 20, 2022, 04:08:08 pmOK we'll call that a draw on the silly mistakes !  Thanks for the explanations. I'm not sure of the developers' position on this, but my experience is that the fpc wrapper is backward-compatible (i.e. works reliably with versions of ppc* significantly older than itself) and that it's fairly happy if ppcx64 etc. is symlinked to e.g. ppcx64-3.2.2 which is itself symlinked to /usr/local/lib/fpc/3.2.2/ppcx64. This is also compatible with the fpc -V option, although whether that works reliably is patchy. Apart from fpc, fp and fpcres all the binaries that would normally have gone into /usr/local/bin are actually in e.g. /usr/local/bin/fpc.d/3.2.2 Both the above are with the caveat that I adopted that convention a significant number of years ago, and more recent "official" alternatives might be more reliable. MarkMLl ---------------------------------------------------------------------- marcov · 2022-10-20 20:45 Quote from: MarkMLl on October 20, 2022, 10:30:41 pmQuote from: lazer on October 20, 2022, 04:08:08 pmOK we'll call that a draw on the silly mistakes !  Thanks for the explanations. I'm not sure of the developers' position on this, but my experience is that the fpc wrapper is backward-compatible (i.e. works reliably with versions of ppc* significantly older than itself) and that it's fairly happy if ppcx64 etc. is symlinked to e.g. ppcx64-3.2.2 which is itself symlinked to /usr/local/lib/fpc/3.2.2/ppcx64. This is also compatible with the fpc -V option, although whether that works reliably is patchy. No guarantee on it, but using an older "fpc" binary isn't the riskiest thing to do.  I've used -V myself for years, and never found much problems with it (it simply appends the argument to the formed (-P) binary name ) QuoteApart from fpc, fp and fpcres all the binaries that would normally have gone into /usr/local/bin are actually in e.g. /usr/local/bin/fpc.d/3.2.2 Both the above are with the caveat that I adopted that convention a significant number of years ago, and more recent "official" alternatives might be more reliable. fp contains the ppc* compiler so that policy is on shaky grounds philosophically. ---------------------------------------------------------------------- MarkMLl · 2022-10-21 06:59 Quote from: marcov on October 20, 2022, 10:45:03 pmNo guarantee on it, but using an older "fpc" binary isn't the riskiest thing to do.  I've used -V myself for years, and never found much problems with it (it simply appends the argument to the formed (-P) binary name ) In practice I copy over the newest, hence my comment about it being backward compatible. Quotefp contains the ppc* compiler so that policy is on shaky grounds philosophically. Thanks, I hadn't spotted that. In practical terms I tend not to use it. MarkMLl ---------------------------------------------------------------------- marcov · 2022-10-21 07:55 Also fpcres might be safer on the longer term, but currently still mutates heavily and might contain bugfixes important to lazarus. ---------------------------------------------------------------------- MarkMLl · 2022-10-21 07:59 Quote from: marcov on October 21, 2022, 09:55:35 amAlso fpcres might be safer on the longer term, but currently still mutates heavily and might contain bugfixes important to lazarus. Yes, and as I said that's one of the few binaries I copy over. MarkMLl