Sign in Join

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

Mailing lists / lazarus / 2010-09

Is there a way to choose with fpc to use in lazarus command?

11 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Frank Church

Is there a way to pass on the version of FPC you want to use with startlazarus or lazarus command?

Is there a way it can be set in the fpc.cfg, and can the fpc.cfg be passed to ths lazarus command?

I have a 2.2.4 from repository and a 2.4.0 svn build and Lazarus is always reverting to the 2.2.4 version.

Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100925/01b9b799/attachment-0001.html>
Mattias Gaertner
to Frank Church
Show quoted text 8 lines
Is there a way to pass on the version of FPC you want to use with startlazarus or lazarus command? Is there a way it can be set in the fpc.cfg, and can the fpc.cfg be passed to ths lazarus command? I have a 2.2.4 from repository and a 2.4.0 svn build and Lazarus is always reverting to the 2.2.4 version.

Change the Environment / Options ... / Environment / Files / compiler path.

Mattias

Marcos Douglas
to Frank Church: Is there a way to pass on the version of FPC you want to use with startlazarus or lazarus…

2010/9/25 Frank Church :

Is there a way to pass on the version of FPC you want to use with startlazarus or lazarus command?

The configuration of Lazarus is created, at the first time, in C:\Documents and Settings\<username>\Application Data\lazarus\ You can modify these files, manually, or you can use the IDE to modify them. After, copy this folder to other place and use the parameter --pcp=<your new config folder> like this (on Windows):

start lazarus --pcp=c:\your_config_folder

Is there a way it can be set in the fpc.cfg, and can the fpc.cfg be passed to ths lazarus command?

You can use the enviroment variable PPC_CONFIG_PATH to set where is the fpc.cfg file.

I have a 2.2.4 from repository and a 2.4.0 svn build and Lazarus is always reverting to the 2.2.4 version.

I use FPC 2.5.1 and Laz 0.9.29.

Marcos Douglas

Frank Church
to Marcos Douglas
Marcos Douglas wrote 28 lines
2010/9/25 Frank Church : > > Is there a way to pass on the version of FPC you want to use with > startlazarus or lazarus command? The configuration of Lazarus is created, at the first time, in C:\Documents and Settings\<username>\Application Data\lazarus\ You can modify these files, manually, or you can use the IDE to modify them. After, copy this folder to other place and use the parameter --pcp=<your new config folder> like this (on Windows): start lazarus --pcp=c:\your_config_folder > Is there a way it can be set in the fpc.cfg, and can the fpc.cfg be passed > to ths lazarus command? You can use the enviroment variable PPC_CONFIG_PATH to set where is the fpc.cfg file. > I have a 2.2.4 from repository and a 2.4.0 svn build and Lazarus is always > reverting to the 2.2.4 version. I use FPC 2.5.1 and Laz 0.9.29.

Can you set which ppc386 file to use in the fpc.cfg?

Is there a way to automatically generate the right fpc.cfg based on which ppc386 your are using. Sven Barth has shown me a way to tell the fpc which ppc386 to use, but I am looking for a way to set it in the IDE or in the fpc.cfg

Show quoted text 8 lines
Marcos Douglas -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100925/e6f9d338/attachment.html>
Mattias Gaertner
to Frank Church
Show quoted text 31 lines
On 25 September 2010 20:58, Marcos Douglas wrote: > 2010/9/25 Frank Church : > > > > Is there a way to pass on the version of FPC you want to use with > > startlazarus or lazarus command? > > The configuration of Lazarus is created, at the first time, in > C:\Documents and Settings\<username>\Application Data\lazarus\ > You can modify these files, manually, or you can use the IDE to modify > them. > After, copy this folder to other place and use the parameter > --pcp=<your new config folder> like this (on Windows): > > start lazarus --pcp=c:\your_config_folder > > > Is there a way it can be set in the fpc.cfg, and can the fpc.cfg be > passed > > to ths lazarus command? > > You can use the enviroment variable PPC_CONFIG_PATH to set where is > the fpc.cfg file. > > > I have a 2.2.4 from repository and a 2.4.0 svn build and Lazarus is > always > > reverting to the 2.2.4 version. > > I use FPC 2.5.1 and Laz 0.9.29. > > Can you set which ppc386 file to use in the fpc.cfg?

No. The fpc.cfg is read by the ppc386.

Is there a way to automatically generate the right fpc.cfg based on which ppc386 your are using. Sven Barth has shown me a way to tell the fpc which ppc386 to use, but I am looking for a way to set it in the IDE or in the fpc.cfg

What's wrong with
IDE menu / Environment / Options ... / Environment / Files / compiler path
?

Mattias

Frank Church
to Mattias Gaertner
Mattias Gaertner wrote 49 lines
On Sat, 25 Sep 2010 21:13:32 +0100 Frank Church wrote: > On 25 September 2010 20:58, Marcos Douglas wrote: > > > 2010/9/25 Frank Church : > > > > > > Is there a way to pass on the version of FPC you want to use with > > > startlazarus or lazarus command? > > > > The configuration of Lazarus is created, at the first time, in > > C:\Documents and Settings\<username>\Application Data\lazarus\ > > You can modify these files, manually, or you can use the IDE to modify > > them. > > After, copy this folder to other place and use the parameter > > --pcp=<your new config folder> like this (on Windows): > > > > start lazarus --pcp=c:\your_config_folder > > > > > Is there a way it can be set in the fpc.cfg, and can the fpc.cfg be > > passed > > > to ths lazarus command? > > > > You can use the enviroment variable PPC_CONFIG_PATH to set where is > > the fpc.cfg file. > > > > > I have a 2.2.4 from repository and a 2.4.0 svn build and Lazarus is > > always > > > reverting to the 2.2.4 version. > > > > I use FPC 2.5.1 and Laz 0.9.29. > > > > > Can you set which ppc386 file to use in the fpc.cfg? No. The fpc.cfg is read by the ppc386. > Is there a way to automatically generate the right fpc.cfg based on which > ppc386 your are using. Sven Barth has shown me a way to tell the fpc which > ppc386 to use, but I am looking for a way to set it in the IDE or in the > fpc.cfg What's wrong with IDE menu / Environment / Options ... / Environment / Files / compiler path ?

Because the caption of the compiler path settings says "Compiler path (e.g. fpc)" I thought it had to be set to the bin/fpc. It is now set to ppc386

I am now get the dreaded "Fatal: Can't find unit Contnrs used by xxxxx" error, yet it is located in <source_dir>/packages/fcl-base/src/contnrs.pp

Show quoted text 8 lines
Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100925/a5b421bf/attachment.html>
Sven Barth
to Frank Church
Frank Church wrote
I am now get the dreaded "Fatal: Can't find unit Contnrs used by xxxxx" error, yet it is located in <source_dir>/packages/fcl-base/src/contnrs.pp

That normally means that the compiler is still using the wrong configuration file. It might still use the ~/.fpc.cfg (or even the /etc/fpc.cfg) which point to the 2.2.4 paths. You need to override the paths in there with the ones from your current installation. For that just backup the current ~/.fpc.cfg (or copy the one from /etc/fpc.cfg to ~/.fpc.cfg) and add "/home/???/LazarusInstalls/fpc240" before all "/lib/..." paths. If there are "2.2.4" values you should also replace them by "2.4.0".

Sidenote: the compiler shouldn't look for "contnrs.pp" but for "contnrs.ppu" (and "contnrs.o") in
"~/LazarusInstalls/fpc240/lib/fpc/2.4.0/units/i386-linux/rtl", because those units were already compiled when calling "make".

Regards,
Sven

Mattias Gaertner
to Frank Church: Because the caption of the compiler path settings says "Compiler path (e.g. fpc)" I…
Show quoted text 54 lines
On 25 September 2010 21:30, Mattias Gaertner wrote: > On Sat, 25 Sep 2010 21:13:32 +0100 > Frank Church wrote: > > > On 25 September 2010 20:58, Marcos Douglas wrote: > > > > > 2010/9/25 Frank Church : > > > > > > > > Is there a way to pass on the version of FPC you want to use with > > > > startlazarus or lazarus command? > > > > > > The configuration of Lazarus is created, at the first time, in > > > C:\Documents and Settings\<username>\Application Data\lazarus\ > > > You can modify these files, manually, or you can use the IDE to modify > > > them. > > > After, copy this folder to other place and use the parameter > > > --pcp=<your new config folder> like this (on Windows): > > > > > > start lazarus --pcp=c:\your_config_folder > > > > > > > Is there a way it can be set in the fpc.cfg, and can the fpc.cfg be > > > passed > > > > to ths lazarus command? > > > > > > You can use the enviroment variable PPC_CONFIG_PATH to set where is > > > the fpc.cfg file. > > > > > > > I have a 2.2.4 from repository and a 2.4.0 svn build and Lazarus is > > > always > > > > reverting to the 2.2.4 version. > > > > > > I use FPC 2.5.1 and Laz 0.9.29. > > > > > > > > Can you set which ppc386 file to use in the fpc.cfg? > > No. The fpc.cfg is read by the ppc386. > > > > Is there a way to automatically generate the right fpc.cfg based on which > > ppc386 your are using. Sven Barth has shown me a way to tell the fpc > which > > ppc386 to use, but I am looking for a way to set it in the IDE or in the > > fpc.cfg > > What's wrong with > IDE menu / Environment / Options ... / Environment / > Files / compiler path > ? > Because the caption of the compiler path settings says "Compiler path (e.g. fpc)" I thought it had to be set to the bin/fpc.

The caption says fpc, because for most users the path to the fpc executable is the best choice.

It is now set to ppc386 I am now get the dreaded "Fatal: Can't find unit Contnrs used by xxxxx" error, yet it is located in <source_dir>/packages/fcl-base/src/contnrs.pp

The compiler searches the ppu.
The error message probably means the compiler found ppu files compiled with a different version. Note: The Contnrs is just the first unit the compiler misses.
Have you compiled lazarus with the new compiler?

Mattias

Frank Church
to Mattias Gaertner
Mattias Gaertner wrote 82 lines
On Sat, 25 Sep 2010 21:48:27 +0100 Frank Church wrote: > On 25 September 2010 21:30, Mattias Gaertner < >wrote: > > > On Sat, 25 Sep 2010 21:13:32 +0100 > > Frank Church wrote: > > > > > On 25 September 2010 20:58, Marcos Douglas wrote: > > > > > > > 2010/9/25 Frank Church : > > > > > > > > > > Is there a way to pass on the version of FPC you want to use with > > > > > startlazarus or lazarus command? > > > > > > > > The configuration of Lazarus is created, at the first time, in > > > > C:\Documents and Settings\<username>\Application Data\lazarus\ > > > > You can modify these files, manually, or you can use the IDE to modify > > > > them. > > > > After, copy this folder to other place and use the parameter > > > > --pcp=<your new config folder> like this (on Windows): > > > > > > > > start lazarus --pcp=c:\your_config_folder > > > > > > > > > Is there a way it can be set in the fpc.cfg, and can the fpc.cfg be > > > > passed > > > > > to ths lazarus command? > > > > > > > > You can use the enviroment variable PPC_CONFIG_PATH to set where is > > > > the fpc.cfg file. > > > > > > > > > I have a 2.2.4 from repository and a 2.4.0 svn build and Lazarus is > > > > always > > > > > reverting to the 2.2.4 version. > > > > > > > > I use FPC 2.5.1 and Laz 0.9.29. > > > > > > > > > > > Can you set which ppc386 file to use in the fpc.cfg? > > > > No. The fpc.cfg is read by the ppc386. > > > > > > > Is there a way to automatically generate the right fpc.cfg based on which > > > ppc386 your are using. Sven Barth has shown me a way to tell the fpc > > which > > > ppc386 to use, but I am looking for a way to set it in the IDE or in the > > > fpc.cfg > > > > What's wrong with > > IDE menu / Environment / Options ... / Environment / > > Files / compiler path > > ? > > > > Because the caption of the compiler path settings says "Compiler path (e.g. > fpc)" I thought it had to be set to the bin/fpc. The caption says fpc, because for most users the path to the fpc executable is the best choice. > It is now set to ppc386 > > I am now get the dreaded "Fatal: Can't find unit Contnrs used by xxxxx" > error, yet it is located in <source_dir>/packages/fcl-base/src/contnrs.pp The compiler searches the ppu. The error message probably means the compiler found ppu files compiled with a different version. Note: The Contnrs is just the first unit the compiler misses. Have you compiled lazarus with the new compiler?

I am sure I did, because the latest svn needs to be compiled with fpc 2.4.0.

I think I may have deleted the .o and.ppu file for contnrs because googling indicated that they may be corrupted or something.

When I pass the mouse over the file names, I get the popups showing the file location correctly, except for contnrs. Does the IDE obtain the filename from the .o or .ppu files, or my scanning the source directory?

The contnrs file is in the <fpc_source_dir>/packages/fcl-base/src directory. Can the IDE locate them there?

If I delete them can't Lazarus recompile them again?

Mattias

Show quoted text 7 lines
-- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100925/46f3538c/attachment.html>
Mattias Gaertner
to Frank Church
Show quoted text 13 lines
[...] > > I am now get the dreaded "Fatal: Can't find unit Contnrs used by xxxxx" > > error, yet it is located in > <source_dir>/packages/fcl-base/src/contnrs.pp > > The compiler searches the ppu. > The error message probably means the compiler found ppu files compiled > with a different version. Note: The Contnrs is just the first unit the > compiler misses. > Have you compiled lazarus with the new compiler? > > I am sure I did, because the latest svn needs to be compiled with fpc 2.4.0.

Good.

I think I may have deleted the .o and.ppu file for contnrs because googling indicated that they may be corrupted or something.

I hope yo only deleted the 2.2.4 ppus, not the 2.4.0 ppu. Do you have the 2.4.0 contnrs.ppu?

When I pass the mouse over the file names, I get the popups showing the file location correctly, except for contnrs. Does the IDE obtain the filename from the .o or .ppu files, or my scanning the source directory?

The fpc source directories are special.
The IDE searches the contnrs.ppu in the ppu search path of the compiler. If it finds it, it searches the source in the FPC source directories.

The contnrs file is in the <fpc_source_dir>/packages/fcl-base/src directory. Can the IDE locate them there? If I delete them can't Lazarus recompile them again?

No.
The fpc ppu files are installed by you.

Mattias

Frank Church
to Mattias Gaertner
Mattias Gaertner wrote 50 lines
On Sat, 25 Sep 2010 22:43:48 +0100 Frank Church wrote: >[...] > > > I am now get the dreaded "Fatal: Can't find unit Contnrs used by xxxxx" > > > error, yet it is located in > > <source_dir>/packages/fcl-base/src/contnrs.pp > > > > The compiler searches the ppu. > > The error message probably means the compiler found ppu files compiled > > with a different version. Note: The Contnrs is just the first unit the > > compiler misses. > > Have you compiled lazarus with the new compiler? > > > > > I am sure I did, because the latest svn needs to be compiled with fpc 2.4.0. Good. > I think I may have deleted the .o and.ppu file for contnrs because googling > indicated that they may be corrupted or something. I hope yo only deleted the 2.2.4 ppus, not the 2.4.0 ppu. Do you have the 2.4.0 contnrs.ppu? > When I pass the mouse over the file names, I get the popups showing the file > location correctly, except for contnrs. Does the IDE obtain the filename > from the .o or .ppu files, or my scanning the source directory? The fpc source directories are special. The IDE searches the contnrs.ppu in the ppu search path of the compiler. If it finds it, it searches the source in the FPC source directories. > The contnrs file is in the <fpc_source_dir>/packages/fcl-base/src > directory. Can the IDE locate them there? > > If I delete them can't Lazarus recompile them again? No. The fpc ppu files are installed by you.

I believe all the problems were the result of using an fpc 2.4.0 created by fpc 2.2.4 to compile Lazarus. I thought the make install PP=/new/fpc2.4.0 would work. But I had to recompile the new fpc 2.4.0 source tree using the new fpc 2.4.0 to get things to work.

Is that the most likely reason for those errors?

Show quoted text 8 lines
Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100926/96905926/attachment-0001.html>