Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2017-01

FPC 3.0.X next to 2.6.4 on Linux

10 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Krzysztof

Hi,

I have installed FPC 2.6.4 for a long time on my Linux with install.sh script in /usr dirs. I would like to install FPC 3.0.0 but keep 2.6.4 as "default" version due to a lot of company projects which I don't want reconfigure. I want to install FPC 3.0.0 somewhere in my home dir and configure only my new personal projects to use 3.0 version. Can anyone instruct me how to do that to not mess up current FPC configuration?

What I want to do is:
1. Install FPC 3.0.0 in home dir
2. Make copy of Lazarus source and rebuild it with FPC 3.0.0. The question is how to force "make" command to use FPC 3.0 from home dir, not default 2.6.4
3. Use Lazarus with separated dir via "startlazarus --pcp=~/.lazarus_FPC3"

Regards

Reply by email

Michael Van Canneyt
to Krzysztof
Krzysztof wrote 15 lines
Hi, I have installed FPC 2.6.4 for a long time on my Linux with install.sh script in /usr dirs. I would like to install FPC 3.0.0 but keep 2.6.4 as "default" version due to a lot of company projects which I don't want reconfigure. I want to install FPC 3.0.0 somewhere in my home dir and configure only my new personal projects to use 3.0 version. Can anyone instruct me how to do that to not mess up current FPC configuration? What I want to do is: 1. Install FPC 3.0.0 in home dir 2. Make copy of Lazarus source and rebuild it with FPC 3.0.0. The question is how to force "make" command to use FPC 3.0 from home dir, not default 2.6.4 3. Use Lazarus with separated dir via "startlazarus --pcp=~/.lazarus_FPC3"

What I do is to have all installs in /usr/local/lib/fpc/$VERSION and in /usr/local/bin I have symlinks

fpc

ppcx64-3.0.0 -> /usr/local/lib/fpc/3.0.0/ppcx64
ppcx64-2.6.4 -> /usr/local/lib/fpc/2.6.4/ppcx64

and the same for versions back to the mists of time...

In your .fpc config file you can use
#IFDEF VER3
/path/to/your/private/fpc
#else
/path/to/public/fpc
#endif

but if they're all installed in the same place, you can use the default, fpc will figure out the correct version because of the $fpcversion macro it sets up by default.

and when I run make, I use

make PP=ppcx64-x.y.z

Depending on the version I need. this works since years for me.

Michael.

Reply by email

Mark Morgan Lloyd
to Michael Van Canneyt
Michael Van Canneyt wrote 16 lines
On Fri, 6 Jan 2017, Krzysztof wrote: > Hi, > > I have installed FPC 2.6.4 for a long time on my Linux with install.sh > script in /usr dirs. I would like to install FPC 3.0.0 but keep 2.6.4 as What I do is to have all installs in /usr/local/lib/fpc/$VERSION and in /usr/local/bin I have symlinks fpc ppcx64-3.0.0 -> /usr/local/lib/fpc/3.0.0/ppcx64 ppcx64-2.6.4 -> /usr/local/lib/fpc/2.6.4/ppcx64 and the same for versions back to the mists of time...

Agreed, and I fairly regularly run very old versions- both FPC and Lazarus- without clashes. The one thing I also do- although I'm not sure to what extent it's necessary- is install the binaries for fpc, fp, fpcres and so on in /usr/local/bin/fpc.d/2.6.4 and so on in an attempt to keep tools for e.g. documentation generation etc. from being overwritten... I don't know the extent to which this is necessary, but I've tried in the past to extract lists of things like the FPC version at which a specific package was added.

The above works well with fpc's -V option.

Some of the 2.7 development versions installed in /usr/local/bin rather than /usr/local/bin/fpc etc., both 2.6.4 and 3.0.0 are OK.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Krzysztof
to Mark Morgan Lloyd

Thank you guys! Sorry for such delay but finally had time to prepare seriously my enviromnent for FPC V3. Everything seems to work perfect (Lazarus IDE and FPC) but just curious question: Is it possible to get information which FPC version my project was compiled? By binary analysis want to implement --fpcversion input param for my projects which return what it means :)

Regards

Reply by email

Jonas Maebe
to Krzysztof
Krzysztof wrote 6 lines
Thank you guys! Sorry for such delay but finally had time to prepare seriously my enviromnent for FPC V3. Everything seems to work perfect (Lazarus IDE and FPC) but just curious question: Is it possible to get information which FPC version my project was compiled? By binary analysis want to implement --fpcversion input param for my projects which return what it means :)

http://www.freepascal.org/docs-html/prog/progsu41.html (FPCVERSION)

Jonas

Reply by email

Krzysztof
to Krzysztof

Last thing. Is possible that some FPC mixed version of .ppu or .o will be linked into my binary? I mean some third party stuff which I forgot clean up etc, you know how it is. Just wondering if final binary file can contain *.ppu and *.o compiled by different FPC versions

Reply by email

Marco van de Voort
to Krzysztof

In our previous episode, Krzysztof said:

Last thing. Is possible that some FPC mixed version of .ppu or .o will be linked into my binary? I mean some third party stuff which I forgot clean up etc, you know how it is. Just wondering if final binary file can contain *.ppu and *.o compiled by different FPC versions

No. In theory it is possible to force the .o (combine .o from one build with .ppu from another), but that is not likely to happen in practice.

The only exceptions are trunk builds from different but not TOO different dates.

Reply by email

Mark Morgan Lloyd
to Jonas Maebe: http://www.freepascal.org/docs-html/prog/progsu41.html (FPCVERSION) Jonas
Jonas Maebe wrote 9 lines
On 08/02/17 21:54, Krzysztof wrote: > Thank you guys! Sorry for such delay but finally had time to prepare > seriously my enviromnent for FPC V3. Everything seems to work perfect > (Lazarus IDE and FPC) but just curious question: Is it possible to get > information which FPC version my project was compiled? By binary > analysis want to implement --fpcversion input param for > my projects which return what it means :) http://www.freepascal.org/docs-html/prog/progsu41.html (FPCVERSION)

In extremis, Lazarus/LCL programs from about 0.9.30 onwards have a version string which can fairly easily be grepped for.

Lazarus LCL: 0.9.30.4 - FPC: 2.4.4

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Fabio Luis Girardi
to Mark Morgan Lloyd

In my environment I have FPC 2.4.4, 2.6.4, 3.0.0, 3.0.1 and 3.1.1, all installed on my home folder (/home/<username>/development/fpc/x.x.x), with the same folder structure.

To choose one FPC version or another, I created a shell script for each version, that sets the path environment variable to selected FPC version and then open gnome terminal.

Em 9 de fev de 2017 6:17 AM, "Mark Morgan Lloyd" <

Show quoted text 31 lines
escreveu: On 08/02/17 21:00, Jonas Maebe wrote: > On 08/02/17 21:54, Krzysztof wrote: > >> Thank you guys! Sorry for such delay but finally had time to prepare >> seriously my enviromnent for FPC V3. Everything seems to work perfect >> (Lazarus IDE and FPC) but just curious question: Is it possible to get >> information which FPC version my project was compiled? By binary >> analysis want to implement --fpcversion input param for >> my projects which return what it means :) >> > > http://www.freepascal.org/docs-html/prog/progsu41.html (FPCVERSION) > In extremis, Lazarus/LCL programs from about 0.9.30 onwards have a version string which can fairly easily be grepped for. Lazarus LCL: 0.9.30.4 - FPC: 2.4.4 -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply by email