[Lazarus] Free Pascal 2.4.2 released!

Bo Berglund bo.berglund at gmail.com
Sun Nov 14 21:52:09 CET 2010


On Sun, 14 Nov 2010 21:00:20 +0100, Sven Barth
<pascaldragon at googlemail.com> wrote:

>>> If you have used the installer for 2.4.2 the path
>>> "C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32" should already be in
>>> %PATH% (and thus you could also just use "make" without the path...).
>>
>> I inspected the path by reading it on the command line, but there was
>> no trace of fpc (not 2.4.2 and not 2.2.4 from the lazarus installation
>> either).
>> This lack of path info previously forced me to use the full path to
>> make.exe because otherwise the make that would be picked up was the
>> one from my BDS2006 installation, which is on path.
>> I got this advice when I wanted to rebuild a broken lazarus.
>>
>> Now I looked in ControlPanel/System/Advanced/Environment and I can see
>> the added path, but it was done to the SYSTEM path, not the USER path.
>> The difference between thies is very profound, anything added to USER
>> path will be available to any application that is started after the
>> setting has been done, but in order to get the SYSTEM path changes
>> activated you need to restart Windows....
>> That is why I don't have fpc 2.4.2 on my path yet.
>>
>
>Ehm... no. In the last few weeks I've worked on my system PATH very 
>often and I never restarted Windows. You just need to restart the 
>applications that use the PATH, because their environment settings are 
>fixed once they've started (and no, you don't need to restart 
>explorer.exe). So if you have a command window open and you change the 
>PATH in the Control Panel then you need to close that command window and 
>start it again. Just try it :)

I have inspected the environment variable path as follows (for
readability I have replaced ; with CRLF so each path item will be on a
separate line):

In ControlPanel the System path is:

C:\Programs\Tcl\bin
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\
C:\Programs\Borland\BDS\4.0\Bin
C:\Programs\Python\.
C:\Programs\Borland\Delphi7\Bin
C:\Programs\Borland\Delphi7\Projects\Bpl\
%SystemRoot%\system32
%SystemRoot%
%SystemRoot%\System32\Wbem
C:\Program Files\Microsoft SQL Server\80\Tools\BINN
C:\Program Files\Borland\CaliberRM SDK 2005 R2\lib
c:\Program Files\Microsoft SQL Server\90\Tools\binn\
C:\Programs\ULTRAE~1
C:\Programs\Microchip\MPLAB IDE\VDI
C:\Programs\GnuPG
C:\Program Files\IVI Foundation\VISA\WinNT\Bin\
C:\Program Files\IVI Foundation\VISA\WinNT\Bin
C:\Programs\TortoiseSVN\bin
C:\Programs\Subversion\bin
C:\Programs\lazarus\fpc\2.4.2\bin\i386-Win32

And user path is:

C:\Programs\Utils
C:\Documents and Settings\Bosse\My Documents\Borland Studio
Projects\Bpl
C:\Programs\CVSNT\
C:\Programs\QT\4.4.3\bin

When I start a new command window and type PATH into it:

C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\
C:\Programs\Borland\BDS\4.0\Bin
C:\Programs\Python\.
C:\Programs\Borland\Delphi7\Bin
C:\Programs\Borland\Delphi7\Projects\Bpl\
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\Program Files\Microsoft SQL Server\80\Tools\BINN
C:\Program Files\Borland\CaliberRM SDK 2005 R2\lib
c:\Program Files\Microsoft SQL Server\90\Tools\binn\
C:\Programs\ULTRAE~1
C:\Programs\Microchip\MPLAB IDE\VDI
C:\Programs\GnuPG
C:\Program Files\IVI Foundation\VISA\WinNT\Bin\
C:\Program Files\IVI Foundation\VISA\WinNT\Bin
C:\Programs\TortoiseSVN\bin
C:\Programs\Subversion\bin
C:\Programs\Utils
C:\Documents and Settings\Bosse\My Documents\Borland Studio
Projects\Bpl
C:\Programs\CVSNT\
C:\Programs\QT\4.4.3\bin

As you can see in the active path there is no sign of FPC, but I have
not restarted after installing FPC...

------------ Restarting test PC --------

And here is the output of path after restart:

C:\Programs\Tcl\bin
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\
C:\Programs\Borland\BDS\4.0\Bin
C:\Programs\Python\.
C:\Programs\Borland\Delphi7\Bin
C:\Programs\Borland\Delphi7\Projects\Bpl\
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\Program Files\Microsoft SQL Server\80\Tools\BINN
C:\Program Files\Borland\CaliberRM SDK 2005 R2\lib
c:\Program Files\Microsoft SQL Server\90\Tools\binn\
C:\Programs\ULTRAE~1
C:\Programs\Microchip\MPLAB IDE\VDI
C:\Programs\GnuPG
C:\Program Files\IVI Foundation\VISA\WinNT\Bin\
C:\Program Files\IVI Foundation\VISA\WinNT\Bin
C:\Programs\TortoiseSVN\bin
C:\Programs\Subversion\bin
C:\Programs\lazarus\fpc\2.4.2\bin\i386-Win32
C:\Programs\Utils
C:\Documents and Settings\Bosse\My Documents\Borland Studio
Projects\Bpl
C:\Programs\CVSNT\
C:\Programs\QT\4.4.3\bin

Now two items have been added:
C:\Programs\Tcl\bin
C:\Programs\lazarus\fpc\2.4.2\bin\i386-Win32


>As a side note: it seems that either make or Windows look for 
>executables in the directory where make is located. Thus when you use 
>the make in your 2.2.4 dir it uses the 2.2.4 compiler and if you use the 
>make in your 2.4.2 dir it will use the 2.4.2 compiler. This changes of 
>course if you explicitly specify a compiler using the FPC or PP variable 
>when calling make...

Yes, I guess that would be the case if make.exe changes the current
dir when it starts. 

But the strange thing in that case is that the lazaus makefile resides
in the directory where I invoked the command so how does make find it
if it changes the current dir?

I had a look at the makefile and searched for FPC and located a
section where it goes to extensive lengths to find the FPC compiler!

Anyways I repeated my compilation now with the extra FPC argument
added (all on one line of course):

C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32\make.exe clean all
FPC=C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32\fpc.exe

At the end there was this error:

Compiling lazconfigstorage.pas
lresources.pp(5320,13) Error: Incompatible types: got "AnsiString"
expected "Char"
lresources.pp(5514) Fatal: There were 1 errors compiling module,
stopping
Fatal: Compilation aborted

I guess I have to get the dev snapshot of lazarus sources to get
around this?


Bo Berglund





More information about the Lazarus mailing list