FPC 3.0 and FPC 2.6 on Ubuntu. How to change default version?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

FPC 3.0 and FPC 2.6 on Ubuntu. How to change default version?

Krzysztof
Hi,

Need to have both FPC versions, 2.6 for all old projects (a lot) and
3.0 for new ones (only one for now). Installed 3.0 from debs (2.6 is
also from deb packages). While installing got info that there is
another FPC version and /etc/fpc.cfg need to be changed for switching
between default versions. Allowed that. Now 3.0 becomes default and I
would like to have 2.6 as default since more projects use it. Looking
at fpc.cfg and can't find what need to be changed for make 2.6 as
default. For example, have lazarus fixes_1_6 svn repo and 'make'
command should always use FPC 2.6

Regards
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FPC 3.0 and FPC 2.6 on Ubuntu. How to change default version?

Jonas Maebe-2
On 04/08/16 21:53, Krzysztof wrote:

>
> Need to have both FPC versions, 2.6 for all old projects (a lot) and
> 3.0 for new ones (only one for now). Installed 3.0 from debs (2.6 is
> also from deb packages). While installing got info that there is
> another FPC version and /etc/fpc.cfg need to be changed for switching
> between default versions. Allowed that. Now 3.0 becomes default and I
> would like to have 2.6 as default since more projects use it. Looking
> at fpc.cfg and can't find what need to be changed for make 2.6 as
> default. For example, have lazarus fixes_1_6 svn repo and 'make'
> command should always use FPC 2.6

The default FPC version is not changed via /etc/fpc.cfg. It's handled
via symlinks in /usr/bin. You can use the old compiler by directly
calling it via /usr/lib/fpc/2.6.0/ppc386 (or ppcx64 for the x86-64 version).

The configuration file should be compatible with both FPC 2.6.x and
3.0.0, as long as they are installed in the same prefix (e.g. /usr or
/usr/local).


Jonas
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FPC 3.0 and FPC 2.6 on Ubuntu. How to change default version?

Krzysztof
2016-08-04 22:38 GMT+02:00 Jonas Maebe <[hidden email]>:
> The default FPC version is not changed via /etc/fpc.cfg. It's handled via
> symlinks in /usr/bin. You can use the old compiler by directly calling it
> via /usr/lib/fpc/2.6.0/ppc386 (or ppcx64 for the x86-64 version).
>
> The configuration file should be compatible with both FPC 2.6.x and 3.0.0,
> as long as they are installed in the same prefix (e.g. /usr or /usr/local).

Thanks Jonas for quick answer!

In /user/bin I have two symlinks:
- ppcx64 which point to /etc/alternatives/ppcx64
- ppcx64-3.0.0 which point to ../lib/fpc/3.0.0/ppcx64

So I can just change these symlinks to point to 2.6.4 dir and that is
enough? I want to have everything be 2.6 default, 3.0 will be handled
manually in new experimental projects.
BTW: When saw symlink point to *alternatives* reminds me that when
installed FPC 3.0, in console message which asked for override
fpc.cfg, there was info about 'update alternatives'. Is it some kind
of debian solution for switching between versions? Forgot to mention,
I have Kubuntu 16.04 64bit
BTW2: I didn't install FPC 3.0 manually from downloaded debs, only
2.6. FPC 3.0 was suggested in 'sudo aptitude dist-upgrade' command. I
accepted that (actually I had no other choice) because I needed it
anyway but this is weird. What forced this? I don't even have Lazarus
installed from deb, it is build from fixes branch using make command.
Checked 'sudo aptitude dist-ugprade' on my old laptop with Kubuntu
14.04, Lazarus 1.4 and also Lazarus 1.6 Fixes and nothing related to
FPC 3.0. Does it mean that FPC 3.0 is in official Ubunty 16.04 repo
and some dependencies forced to install FPC 3.0 too?
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FPC 3.0 and FPC 2.6 on Ubuntu. How to change default version?

Jonas Maebe-2
Krzysztof wrote:
> In /user/bin I have two symlinks:
> - ppcx64 which point to /etc/alternatives/ppcx64
> - ppcx64-3.0.0 which point to ../lib/fpc/3.0.0/ppcx64
>
> So I can just change these symlinks to point to 2.6.4 dir and that is
> enough?

Normally, yes.

> BTW: When saw symlink point to *alternatives* reminds me that when
> installed FPC 3.0, in console message which asked for override
> fpc.cfg, there was info about 'update alternatives'. Is it some kind
> of debian solution for switching between versions?

Yes.

> BTW2: I didn't install FPC 3.0 manually from downloaded debs, only
> 2.6. FPC 3.0 was suggested in 'sudo aptitude dist-upgrade' command. I
> accepted that (actually I had no other choice) because I needed it
> anyway but this is weird. What forced this?
[snip]
> Does it mean that FPC 3.0 is in official Ubunty 16.04 repo
> and some dependencies forced to install FPC 3.0 too?

Probably. It's better to ask about this on a Debian mailing list, they
will know the details and the commands you can use to figure out what
depends on what.


Jonas
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FPC 3.0 and FPC 2.6 on Ubuntu. How to change default version?

Marco van de Voort
In reply to this post by Krzysztof
In our previous episode, Krzysztof said:
> Thanks Jonas for quick answer!
>
> In /user/bin I have two symlinks:
> - ppcx64 which point to /etc/alternatives/ppcx64

That is something debian/buntu specific. What does this point to. This
should point to the version you want to use by default.
/usr/.../lib/fpc/<version>/ppcx64

> - ppcx64-3.0.0 which point to ../lib/fpc/3.0.0/ppcx64

The other version (not default) should be symlinked with version number like
this.

Then you can compile the non default with fpc -V<versionnumber>

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal