Re: [fpc-pascal] How to handle fpc.cfg on Ubuntu with 3.0.4 and 3.2.0 co-existing?

2021-02-08 Thread Graeme Geldenhuys via fpc-pascal
On 08/02/2021 11:53 pm, Bo Berglund via fpc-pascal wrote:
> I assume if this is left as is as $(CompPath) it will use the globally defined
> compiler 3.2.0, but if changed will use the project defined compiler instead.

Yes, everything you stated is correct. I find that setting the global option is
quicker (less user steps). But again, that depends on your needs. If certain
project are only going to use a certain compiler version, then I guess setting 
it
in the Project Options would be better suited for your needs.

The projects I work on are compilable with all FPC versions. So for my needs,
changing the global compiler options is more convenient.

What is nice with MSEide, is that I can configure project or global macros that
define my compiler version (and other stuff). I can have keyboard shortcuts to
switch between those macro groups. I can also have desktop shortcuts that when
they launch MSEide, it configures the FPC version macro via a ide command line
parameter. MSEide starts up instantly, so even closing and reopening the IDE 
with
a different FPC version enabled is super fast.


Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How to handle fpc.cfg on Ubuntu with 3.0.4 and 3.2.0 co-existing?

2021-02-08 Thread Bo Berglund via fpc-pascal
On Mon, 8 Feb 2021 17:20:12 +, Graeme Geldenhuys via fpc-pascal
 wrote:

>On 06/02/2021 10:07 am, Bo Berglund via fpc-pascal wrote:
>> How do you manage different versions of the compiler in Lazarus?
>
>This is where I believe MSEide does things much better that Lazarus,
>but that's for another discussion.
>
>In Lazarus under "Tools -> Options... -> Compiler executable" I have a
>drop-down list of frequently used compilers versions. They all look
>as follows - just with the version in the path being different.
>
>  /data/devel/fpc-3.2.0/x86_64-linux/bin/fpc
>
>
>My ~/bin/fpc always point to the latest stable FPC version, but I hardly
>ever use it (maybe only for occasional command line compilation of small
>test programs). My IDEs always explicitly define which FPC executable I want
>to use. My IDEs never reference the one in ~/bin/
>

OK, that is a Lazarus global option.
If I want to build using 3.0.4 rather than 3.2.0 I will set this option
correspondingly, right?
But then if I forget about it and close Lazarus after the build and then later
come back and need to rebuild Lazarus, what will happen?
Will it try to use 3.0.4 in this case and fail since 3.2.0 is the minimum for
building Lazarus 2.0.10?

Or should I set the global option to 3.2.0 and if I want to build a *project*
then use the selector below Project/Project Options?
In Project Options/Compiler Options/Compiler Commands there is a drop-down for
selecting the specific compiler.

I assume if this is left as is as $(CompPath) it will use the globally defined
compiler 3.2.0, but if changed will use the project defined compiler instead.


-- 
Bo Berglund
Developer in Sweden

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How to handle fpc.cfg on Ubuntu with 3.0.4 and 3.2.0 co-existing?

2021-02-08 Thread Graeme Geldenhuys via fpc-pascal
On 06/02/2021 10:07 am, Bo Berglund via fpc-pascal wrote:
> How do you manage different versions of the compiler in Lazarus?

This is where I believe MSEide does things much better that Lazarus,
but that's for another discussion.

In Lazarus under "Tools -> Options... -> Compiler executable" I have a
drop-down list of frequently used compilers versions. They all look
as follows - just with the version in the path being different.

  /data/devel/fpc-3.2.0/x86_64-linux/bin/fpc


My ~/bin/fpc always point to the latest stable FPC version, but I hardly
ever use it (maybe only for occasional command line compilation of small
test programs). My IDEs always explicitly define which FPC executable I want
to use. My IDEs never reference the one in ~/bin/


Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How to handle fpc.cfg on Ubuntu with 3.0.4 and 3.2.0 co-existing?

2021-02-08 Thread Graeme Geldenhuys via fpc-pascal

On 06/02/2021 10:28 am, Michael Van Canneyt via fpc-pascal wrote:
> No, you don't. I think my fpc.cfg has not changed in many many years.

Same here. My last modification date on that file is 2013. :-)


Regards,
  Graeme
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How to handle fpc.cfg on Ubuntu with 3.0.4 and 3.2.0 co-existing?

2021-02-06 Thread Michael Van Canneyt via fpc-pascal



On Sat, 6 Feb 2021, Bo Berglund via fpc-pascal wrote:


FPC versions.


Graeme thanks for the info!
Since I am not doing any fpc or lazarus development I guess I don't really need
all of that..

My .fpc.cfg file also has the $fpcversion everywhere in the paths so I guess
that unless a new version of fpc adds extra stuff into the file I don't really
need to modify the .fpc.cfg file when installing a new fpc release?


No, you don't. I think my fpc.cfg has not changed in many many years.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How to handle fpc.cfg on Ubuntu with 3.0.4 and 3.2.0 co-existing?

2021-02-06 Thread Bo Berglund via fpc-pascal
On Sat, 06 Feb 2021 10:53:51 +0100, Bo Berglund via fpc-pascal
 wrote:

FOLLOW-UP:

>BTW, my installs sit in:
>fpc: $HOME/dev/fpc/$fpcversion
>lazarus: $HOME/dev/lazarus/$lazversion
>

I have symlinked the compiler as follows:
ll ~/bin/pp*
lrwxrwxrwx 1 bosse bosse  32 2020-04-10 21:25 bin/ppcx64 ->
/home/bosse/lib/fpc/3.0.4/ppcx64

I guess this is not really optimal if I want to use the 3.2.0 compiler?
How do you manage different versions of the compiler in Lazarus?
Right now Lazarus only finds the ~/bin/ppcx64 linked file...

This I think was set up when I initíally installed Lazarus 2.0.8 on this Ubuntu
Mate 18.04 machine (in the dialog that pops up on first start of a fresh
Lazarus).
I think the dialog might be possible to bring up again from inside Lazarus but I
fail to find from where in the menus...


-- 
Bo Berglund
Developer in Sweden

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How to handle fpc.cfg on Ubuntu with 3.0.4 and 3.2.0 co-existing?

2021-02-06 Thread Bo Berglund via fpc-pascal
On Sat, 6 Feb 2021 01:15:46 +, Graeme Geldenhuys via fpc-pascal
 wrote:

>On 05/02/2021 11:18 pm, Bo Berglund via fpc-pascal wrote:
>> Can they share the same fpc.cfg file (or rather .fpc.cfg)?
>
>Yes, I've been doing so for probably the last 10 years. I have
>7 different FPC versions installed on my system - all working together.
>
>The trick is to have paths as follows in you ~/.fpc.cfg file:
>


>I'm happy to send you a full copy of my ~/.fpc.cfg file if that will help.
>
>And as you can see from my paths above, all my FPC version are all installed
>under the /data/devel/* path and looks like this:
>
>=
>/data/devel/fpc-2.6.4
>??? src/
>??? x86_64-freebsd/
>??? x86_64-linux/
>/data/devel/fpc-3.0.0
>??? go.sh*
>??? src/
>??? x86_64-freebsd/
>??? x86_64-linux/
>/data/devel/fpc-3.0.2
>??? go.sh*
>??? src/
>??? x86_64-freebsd/
>??? x86_64-linux/
>/data/devel/fpc-3.0.4
>??? go.sh*
>??? src/
>??? x86_64-freebsd/
>??? x86_64-linux/
>/data/devel/fpc-3.2.0
>??? go.sh*
>??? src/
>??? x86_64-freebsd/
>??? x86_64-linux/
>/data/devel/fpc-3.2.1
>??? go.sh*
>??? src/
>??? x86_64-linux/
>/data/devel/fpc-3.3.1
>??? go-arduino.sh*
>??? go-freebsd.sh*
>??? go.sh*
>??? src/
>??? x86_64-linux/
>
>=
>
>
>The "go.sh" files you see are to compile the desired FPC version with the
>previous stable FPC version, and install it into the correct location.
>
>=[ example go.sh ]===
>#!/bin/sh
>
>TARGET_VER=3.2.0
>TARGET=x86_64-linux
>COMPILER=/data/devel/fpc-3.0.4/$TARGET/bin/ppcx64
>
>cd src
>
>make clean
>make all FPC=$COMPILER OPT="-Fl/usr/local/lib"
>make install INSTALL_PREFIX=/data/devel/fpc-$TARGET_VER/$TARGET 
>FPC=/data/devel/fpc-$TARGET_VER/src/compiler/ppcx64
>=
>
>I use this same setup in my Windows VMs too, when I need to support multiple
>FPC versions.

Graeme thanks for the info!
Since I am not doing any fpc or lazarus development I guess I don't really need
all of that..

My .fpc.cfg file also has the $fpcversion everywhere in the paths so I guess
that unless a new version of fpc adds extra stuff into the file I don't really
need to modify the .fpc.cfg file when installing a new fpc release?

In that case I will add a note in my script file (I use it on Linux platforms to
install from sources) to the effect that this is only needed for a first install
on any given device.

BTW, my installs sit in:
fpc: $HOME/dev/fpc/$fpcversion
lazarus: $HOME/dev/lazarus/$lazversion

And the support files go into $HOME/lib/fpc/ and $HOME/share


-- 
Bo Berglund
Developer in Sweden

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How to handle fpc.cfg on Ubuntu with 3.0.4 and 3.2.0 co-existing?

2021-02-05 Thread Graeme Geldenhuys via fpc-pascal
On 05/02/2021 11:18 pm, Bo Berglund via fpc-pascal wrote:
> Can they share the same fpc.cfg file (or rather .fpc.cfg)?

Yes, I've been doing so for probably the last 10 years. I have
7 different FPC versions installed on my system - all working together.

The trick is to have paths as follows in you ~/.fpc.cfg file:

=
# searchpath for units and other system dependent things
-Fu/data/devel/fpc-$fpcversion/$fpctarget/lib/fpc/$fpcversion/units/$fpctarget
-Fu/data/devel/fpc-$fpcversion/$fpctarget/lib/fpc/$fpcversion/units/$fpctarget/*
-Fu/data/devel/fpc-$fpcversion/$fpctarget/lib/fpc/$fpcversion/units/$fpctarget/rtl

# searchpath for fppkg user-specific packages
-Fu~/.fppkg/lib/fpc/$fpcversion/units/$FPCTARGET/*

# searchpath for libraries
-Fl/data/devel/fpc-$fpcversion/$fpctarget/lib/fpc/$fpcversion/units/$fpctarget
-Fl/lib;/usr/lib;/usr/local/lib

# Path to fpc utility applications like fpcres
-FD/data/devel/fpc-$fpcversion/$fpctarget/bin/
=

I'm happy to send you a full copy of my ~/.fpc.cfg file if that will help.

And as you can see from my paths above, all my FPC version are all installed
under the /data/devel/* path and looks like this:

=
/data/devel/fpc-2.6.4
├── src/
├── x86_64-freebsd/
└── x86_64-linux/
/data/devel/fpc-3.0.0
├── go.sh*
├── src/
├── x86_64-freebsd/
└── x86_64-linux/
/data/devel/fpc-3.0.2
├── go.sh*
├── src/
├── x86_64-freebsd/
└── x86_64-linux/
/data/devel/fpc-3.0.4
├── go.sh*
├── src/
├── x86_64-freebsd/
└── x86_64-linux/
/data/devel/fpc-3.2.0
├── go.sh*
├── src/
├── x86_64-freebsd/
└── x86_64-linux/
/data/devel/fpc-3.2.1
├── go.sh*
├── src/
└── x86_64-linux/
/data/devel/fpc-3.3.1
├── go-arduino.sh*
├── go-freebsd.sh*
├── go.sh*
├── src/
└── x86_64-linux/

=


The "go.sh" files you see are to compile the desired FPC version with the
previous stable FPC version, and install it into the correct location.

=[ example go.sh ]===
#!/bin/sh

TARGET_VER=3.2.0
TARGET=x86_64-linux
COMPILER=/data/devel/fpc-3.0.4/$TARGET/bin/ppcx64

cd src

make clean
make all FPC=$COMPILER OPT="-Fl/usr/local/lib"
make install INSTALL_PREFIX=/data/devel/fpc-$TARGET_VER/$TARGET 
FPC=/data/devel/fpc-$TARGET_VER/src/compiler/ppcx64
=

I use this same setup in my Windows VMs too, when I need to support multiple
FPC versions.

Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] How to handle fpc.cfg on Ubuntu with 3.0.4 and 3.2.0 co-existing?

2021-02-05 Thread Bo Berglund via fpc-pascal
I have an Ubuntu 18.04 laptop on which I have installed fpc 3.0.4/Lazarus 2.0.8
from sources via svn almost a year back into *my home dir*. No system-wide
install.

Now I am in the process of also installing fpc 3.2.0 from sources.
I have a script for installing on a clean machine that I am reading from and
using the appropriate calls when most has been already installed.
So for fpc my steps are:

cd ~/dev/fpc/3.2.0 (this is the source dir filled via svn)
make clean
make all FPC="$HOME/bin/ppcx64" (fpc 3.0.4 is symlinked here)
make install PREFIX=$HOME FPC="$HOME/bin/ppcx64"
make sourceinstall PREFIX=$HOME

This all works fine.

Now my notes say that I need to create the fpc.cfg file using:

$HOME/lib/fpc/3.2.0/samplecfg "$HOME/lib/fpc/3.2.0" "$HOME"

This creates the file $HOME/fpc.cfg, which is then renamed:
mv "$HOME/fpc.cfg" "$HOME/.fpc.cfg"

But my existing installation already contains the $HOME/.fpc.cfg, which is used
by Lazarus 2.0.8/fpc 3.0.4...

So what is the deal here if I want to have both Lazarus 2.0.10/fpc 3.2.0 and the
old Lazarus 2.0.8/fpc 3.0.4 operational?

Can they share the same fpc.cfg file (or rather .fpc.cfg)?

I renamed the existing .fpc.cfg before doing the last step so I have both the
new fpc.cfg and the old .fpc.cfg_3.0.4 and the diff between them looks like
this:

$ diff fpc.cfg .fpc.cfg_3.0.4
2c2
< # Config file generated by fpcmkcfg on 5-2-21 - 23:49:17
---
> # Config file generated by fpcmkcfg on 15-4-20 - 01:01:27
35,37d34
< #ELSE
<   # Strip debuginfo from the executable if not in debug mode
<   -Xs
43a41,42
> # path to Xcode 4.3+ utilities (no problem if it doesn't exist)
> -FD/Applications/Xcode.app/Contents/Developer/usr/bin
149,150c148,152
< # Search for $fpctarget/$fpcsubarch-$fpcmemorymodel/ subdirectory first
< # for i8086 CPU
---
> # searchpath for units and other system dependent things
> -Fu/home/bosse/lib/fpc/$fpcversion/units/$fpctarget
> -Fu/home/bosse/lib/fpc/$fpcversion/units/$fpctarget/*
> -Fu/home/bosse/lib/fpc/$fpcversion/units/$fpctarget/rtl
>
157,161d158
< # searchpath for units and other system dependent things
< -Fu/home/bosse/lib/fpc/$fpcversion/units/$fpctarget
< -Fu/home/bosse/lib/fpc/$fpcversion/units/$fpctarget/*
< -Fu/home/bosse/lib/fpc/$fpcversion/units/$fpctarget/rtl
<
175,177d171
< # searchpath for tools
< -FD/home/bosse/lib/fpc/$fpcversion/bin/$FPCTARGET
<
190a185,187
> # searchpath for tools
> -FD/home/bosse/lib/fpc/$fpcversion/bin/$FPCTARGET
>
250a248,250
>
> # Always strip debuginfo from the executable
> -Xs

Unfortunately I cannot decode this because I am not used to this diff format...
Can I keep my existing .fpc.cfg file or should I rename the fpc.cfg to .fpc.cfg?

I have not yet built Lazarus...


-- 
Bo Berglund
Developer in Sweden

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal