Forum > General

Multiple FPC versions + fpcupdeluxe

(1/3) > >>

JuhaManninen:
I am finally testing fpcupdeluxe, got from here:
  https://github.com/newpascal/fpcupdeluxe
It successfully built FPC trunk. It downloaded a root compiler which worked well. It did not use my already installed FPC 3.0.2 as a root but that is OK.

I copied the config file ~/fpcupdeluxe/fpc/bin/x86_64-linux/fpc.cfg to directory /etc.
I can use the new compiler by defining its full path ~/fpcupdeluxe/fpc/bin/x86_64-linux/fpc.
I can also build Lazarus from my existing repo by setting the paths.

How do you people easily switch between compiler versions?
This may be a dummy question. I have already forgotten how to tweak the compiler configs.

Some notes about fpcupdeluxe:
The GUI is confusing. It shows settings for Lazarus, too, even if you don't plan to install it.
This tool is most useful for installing FPC. Lazarus is easy to install in any case once FPC works.
There should be sections (GroupBox) for FPC and Lazarus. A checkbox would select if a section gets built. If not checked, the section's settings would be disabled.
Finally a button would build what is selected.

molly:

--- Quote from: JuhaManninen on May 26, 2017, 02:41:36 pm ---How do you people easily switch between compiler versions?

--- End quote ---
afaik there are several options.

In one setup i let every fpc have it's own configuration file set the cfgdir to a common root and include a common fpc.cfg that is used by all FPC versions (correct directory tree is important there). You could also use environment variable PPC_CONFIG_PATH for that of course but, i like to stay flexible just in case it is needed.

Then, inside common fpc.cfg, you can do things like:
-Fu$FPC_ROOT$\$FPCVERSION\units\$FPCTARGET\*

(Shame that CFGDIR does not get 'translated' or there is a common ROOT that can be set, as it would avoid the use of FPC_ROOT environment variable in above example and/or would allow for a more portable solution).

My editor invokes the required FPC version (user configurable tool-menu options), and that is all to it.

In order to "switch" on commandline i use an environment variable for the FPC version and a small script that listens to the name fpc. I try to avoid depending on paths as FPC does not depend on it.

An alternative to using a script might be a small front-end that adds an extra parameter for supplying the version (that get's stripped from the argument list) and then invoke the corresponding fpc with the 'usual' parameters, just passing those to FPC.

Things can get a bit more complicated using multiple installations targeting different processors belonging to the same line (m68k, arm).

JuhaManninen:
One more thing. Can I build a debug RTL with fpcupdeluxe?
I found an old answer from 2016 and then it was not possible.
 http://forum.lazarus.freepascal.org/index.php/topic,34645.msg229957.html#msg229957

Maybe things have changed?
Debugging RTL is one of the main motivations to build your own compiler instead of installing ready binaries.

DonAlfredo:
@JuhaManninen

There is no easy switch between compiler versions, once an install-choice has been made.
Some users, including myself, just use different directories for complete FPC/Laz install, with their own local copy of fpcupdeluxe.

In fact and again speaking for myself, I have always 5 installs: stable, fixes, trunk, NewPascal and an old NewPascal.
All in their own directory, with their own cross-compilers and fpcupdeluxe.
In this way, all installs are fully isolated and remain that way.

In general, fpcupdeluxe is made to install both FPC and Lazarus as a working combi, with the correct settings.
In addition to this, you can also choose to only install FPC or Lazarus.
However, I will look into some GUI changes to make the distinction between FPC and Lazarus more clear.

It should also be possible to build a debug-compiler. However I did not check until now.
It should be as easy as adding the debug-settings into the [setup+] FPC compiler options.


Thaddy:

--- Quote from: DonAlfredo on May 31, 2017, 01:52:34 pm --- including myself, just use different directories for complete FPC/Laz install, with their own local copy of fpcupdeluxe.

--- End quote ---
Which is sheer....... Don't even promote it. Use OS defaults.
But you are doing a great job, you know my opinion.

A better solution is to use different subdirectories from the OS promoted directory.

This only goes wrong with Delphi7 and below, that requires a separation from the default directories and MS keeps informing me the software may be incompatible with the OS. Which it isn't. If you install in a wrong directory... :D
Regards,
Thaddy

Navigation

[0] Message Index

[#] Next page

Go to full version