Sign in Join

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

Mailing lists / lazarus / 2014-12

Lazarus Configuration

4 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

J S

I have two lazarus installations.

I have been having problems compiling the svn branch lately, and this has caused me to examine further how lazarus determines which compiler installation to use.

My setup is this:

1) I start with a clean svn directory. "Clean" means that I purged all generated *.ppu, *.o, etc. and reverted all changes to the .po files (why the .po files are included in the svn and change upon building is another topic altogether)
2) I have a separate binutils directory, with ar.exe, as.exe, cp.exe, make.exe, etc. -- about 32 files in all (no fpc.exe here)
3) I set my path to include only the binutils and the compiler directory (e.g. PATH=C:\FPCBinutils;C:\FPC_2.6.4\bin\i386-win32)
4) I build lazbuild by running "make lazbuild"
5) I build lazarus by running "make bigide"

My expectation was that only the 2.6.4 compiler would be used in building lazarus.

I was wrong.

In my cursory examination, it appears that lazarus looks in a hardwired directory for configuration information. If this is true, it seems very, very wrong to me. My expectation was that there would be a configuration file for lazarus in the current search path that would guide its compilation.

It seems that I should be able to change configurations (e.g. laz_svn/fpc_2.6.4, laz_svn/fpc_2.7.1, laz_1.2.6/fpc_2.6.4, etc.) simply by changing the search path (and subsequently the configuration file found on that search path).

I also acknowledge the very real possibility that I am once again confused and have misunderstood things, and I welcome to be corrected. : -)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141222/41fbbe11/attachment.html>

Reply by email

Joost van der Sluis
to J S
J S wrote 5 lines
In my cursory examination, it appears that lazarus looks in a hardwired directory for configuration information. If this is true, it seems very, very wrong to me. My expectation was that there would be a configuration file for lazarus in the current search path that would guide its compilation.

It's easy: If you compile Lazarus from within Lazarus, it uses the same compiler as it uses for all other projects. And you can set this compiler in the configuration. There's nothing strange here.

If you build from the command-line, the compiler in your path is used, unless you provide one in the command-line.

Joost.

Reply by email

martin
to J S: I have two lazarus installations. I have been having problems compiling the svn branch…
J S wrote
I have two lazarus installations.

...

In my cursory examination, it appears that lazarus looks in a hardwired directory for configuration information.

It does, but it can be configured different.

Depending on the OS it follows the conventions used on that OS. That is usually in the user folder
Linux: /home/USER/.lazarus
And on Win in the appdir local of the current user.

Lazarus does not save [1] into the installation folder (as OS dependent this can be read only). But it checks for a lazarus.cfg file (search wiki) and appends options found inside to the commandline options. So you can specify in that file:
--primary-config-path=xxx

[1] if writeable and lazarus is rebuild it may place the new exe there. If not, then startlazarus will find it. In that case you need to try out where to put the above config file.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141222/e62067f9/attachment.html>

Reply by email

Mattias Gaertner
to J S: I have two lazarus installations. I have been having problems compiling the svn branch…
Show quoted text 7 lines
I have two lazarus installations. I have been having problems compiling the svn branch lately, and this has caused me to examine further how lazarus determines which compiler installation to use. My setup is this: 1) I start with a clean svn directory. "Clean" means that I purged all generated *.ppu, *.o, etc. and reverted all changes to the .po files (why the .po files are included in the svn and change upon building is another topic altogether)

This must not happen with a release.
This should not happen with trunk, but sometimes someone forgets to commit files.
So, in both cases: bug.

2) I have a separate binutils directory, with ar.exe, as.exe, cp.exe, make.exe, etc. -- about 32 files in all (no fpc.exe here)

For cross compile?

Show quoted text 5 lines
3) I set my path to include only the binutils and the compiler directory (e.g. PATH=C:\FPCBinutils;C:\FPC_2.6.4\bin\i386-win32) 4) I build lazbuild by running "make lazbuild" 5) I build lazarus by running "make bigide" My expectation was that only the 2.6.4 compiler would be used in building lazarus.

The "make bigide" contains the "make lazbuild".
The "make bigide" uses the command line compiler. So, yes, this should work. Unless you set some environment variables like PP.

I was wrong.

Do you mean the above "make" commands use another compiler?

In my cursory examination, it appears that lazarus looks in a hardwired directory for configuration information. If this is true, it seems very, very wrong to me. My expectation was that there would be a configuration file for lazarus in the current search path that would guide its compilation. It seems that I should be able to change configurations (e.g. laz_svn/fpc_2.6.4, laz_svn/fpc_2.7.1, laz_1.2.6/fpc_2.6.4, etc.) simply by changing the search path (and subsequently the configuration file found on that search path).

Mattias

Reply by email