[Lazarus] Proposal for changing fpc version on the fly in the IDE
patspiper at gmail.com
Thu Aug 22 16:12:04 CEST 2013
On 22/08/13 16:23, Mark Morgan Lloyd wrote:
> patspiper wrote:
>> When multiple FPC versions are used, the fpc binary and related
>> utilities are usually located in <fpc folder>/<fpc version>/bin, and
>> the compiler itself (ppcxxx) in <fpc folder>/<fpc
>> version>/lib/fpc/<fpc version>. The folders could be different than
>> these, but the point to note is that there are 2 folders that rely on
>> the fpc version.
> I don't see that here (Linux/Debian, FPC and Lazarus built broadly
> with defaults). Binaries are in /usr/local/bin, FPC-specific stuff in
> /usr/local/lib/fpc/x.y.z where x.y.z is a version number. As a general
> point, I normally copy a clean fpcsrc into x.y.z for Lazarus's benefit
> but that still only leaves a single directory named for a version number.
When you install using the distribution's packages or standard
installers, you'll not be able to use more than one FPC version without
Furthermore, each version has its own fpc binary and tools in the
usr/local/bin folder. They could be compatible or incompatible across
versions. Thus it is better for each version to have its own set of folders.
>> Furthermore, it is not good practice to specify the ppcxxx compiler
>> in the compiler path in the IDE options, especially when
>> cross-compiling. The fpc binary must be specified instead, and that
>> binary must be able to locate the ppcxxx folder.
> For users who aren't cross-compiling, why is this a bad idea? (I ask
> for information, not because I'm arguing or criticising).
AFAIK, the fpc binary is supposed to be the gate to the compiler, and
that's by design. You can get away by using the ppcxxx compiler directly
if you're not cross compiling, but that's not guaranteed to not break in
> I usually add a couple of symlinks in /usr/local/bin e.g. ppcsparc ->
> ppcsparc-2.6.2 and ppcsparc-2.6.2 ->
> /usr/local/lib/fpc/2.6.2/ppcsparc. The fpc binary will be the one
> installed by the most recent build.
You are tweaking your system unnecessarily. Just make sure that both
folder paths are exported and forget about any symlinks. That's by far
more flexible, easily upgradeable, and less prone to errors.
More information about the Lazarus