FPC 3.0.X next to 2.6.4 on Linux

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

FPC 3.0.X next to 2.6.4 on Linux

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

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

Re: FPC 3.0.X next to 2.6.4 on Linux

Michael Van Canneyt


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
> "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.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FPC 3.0.X next to 2.6.4 on Linux

Mark Morgan Lloyd-5
On 06/01/17 20:30, Michael Van Canneyt wrote:
> 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]
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FPC 3.0.X next to 2.6.4 on Linux

Krzysztof
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 or at runtime. I want to implement --fpcversion input param for my projects which return what it means :)

Regards

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

Re: FPC 3.0.X next to 2.6.4 on Linux

Jonas Maebe-3
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 or at runtime. I 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

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

Re: FPC 3.0.X next to 2.6.4 on Linux

Krzysztof
2017-02-08 21:59 GMT+01:00 Jonas Maebe <[hidden email]>:

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

Excellent!

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

Re: FPC 3.0.X next to 2.6.4 on Linux

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

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

Re: FPC 3.0.X next to 2.6.4 on Linux

Marco van de Voort
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.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FPC 3.0.X next to 2.6.4 on Linux

Mark Morgan Lloyd-5
In reply to this post by Jonas Maebe-3
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 or at runtime. I 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  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FPC 3.0.X next to 2.6.4 on Linux

Fabio Luis Girardi
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" <[hidden email]> 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 or at runtime. I 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  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

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