Recent

Author Topic: We are planning the next release: Lazarus 2.0.2  (Read 35460 times)

dsiders

  • Hero Member
  • *****
  • Posts: 1052
Re: We are planning the next release: Lazarus 2.0.2
« Reply #60 on: April 15, 2019, 10:54:21 pm »
Could it be, that you have another "make.exe" in your path?

Not in my case, on Win 8.1.
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
Re: We are planning the next release: Lazarus 2.0.2
« Reply #61 on: April 16, 2019, 03:52:12 pm »
From the logs on the issue, this is the command that fails
Code: [Select]
C:/lazarus/fpc/3.0.4/bin/x86_64-win64/fpc.exe -gl -vbqewnhi -Sci -dlclwin32 -Fu../designer -Fu../debugger -Fu../debugger/frames -Fu../converter -Fu../packager -Fu../packager/frames -Fu../components/custom -Fuinclude/win -Fuframes -Fu. -Fiinclude -Fiinclude/win64 -Fi../images -FE.. -FU../units/x86_64-win64/win32 -WG "@C:\Users\User\AppData\Local\lazarus\idemake.cfg" -dx86_64 lazarus.pp
Is your user-account called "User"?

The backslash are still in place. And it is the same command that my IDE goes through (only I do not get the error).

"my IDE" here refers to the installation I made with the official installer as it comes from sourceforge.
That means I have the same fpc. We should both have the same "make.exe"

Leaves the question if there is a diff in the OS.
I don't yet have the current Windows Update installed. So no idea if that will change anything.
(Does 2.0.0 still work/rebuild on your PC?)

According to the logfile, it looks like fpc tries to access the file:
Code: [Select]
@C:UsersUserAppDataLocallazarusidemake.cfg -dx86_64Fpc must have seen the @, because that makes it tread this as a file to be read.
Though it could have thought this is the file to compile, yet then I would have expected a warning that more than one file was specified...

At what time the " and \ were removed, is unclear. But I guess something went bad with the quoting, because it joined the next argument to the current.

Can you open a cmd.exe
And then run the above command from there?

If it fails at -va

yurix

  • New Member
  • *
  • Posts: 14
Re: We are planning the next release: Lazarus 2.0.2
« Reply #62 on: April 16, 2019, 05:40:35 pm »
Is your user-account is called "User"?
(Does 2.0.0 still work/rebuild on your PC?)
Can you open a cmd.exe
And then run the above command from there?
If it fails at -va
Yes, user-account called "User".
And the command completed without error.
The checksum of the installation files is correct.
I checked rebuild Lazarus 2.0.0. No errors on this version.

Code: [Select]
c:\lazarus\ide>C:/lazarus/fpc/3.0.4/bin/x86_64-win64/fpc.exe -gl -vbqewnhi -Sci -dlclwin32 -Fu../designer -Fu../debugger -Fu../debugger/frames -Fu../converter -Fu../packager -Fu../packager/frames -Fu../components/custom -Fuinclude/win -Fuframes -Fu. -Fiinclude -Fiinclude/win64 -Fi../images -FE.. -FU../units/x86_64-win64/win32 -WG "@C:\Users\User\AppData\Local\lazarus\idemake.cfg" -dx86_64 lazarus.pp
Hint: (11030) Start of reading config file C:\lazarus\fpc\3.0.4\bin\x86_64-win64\fpc.cfg
Hint: (11031) End of reading config file C:\lazarus\fpc\3.0.4\bin\x86_64-win64\fpc.cfg
Hint: (11030) Start of reading config file C:\Users\User\AppData\Local\lazarus\idemake.cfg
Hint: (11031) End of reading config file C:\Users\User\AppData\Local\lazarus\idemake.cfg
Free Pascal Compiler version 3.0.4 [2019/04/13] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
(1002) Target OS: Win64 for x64
(3104) Compiling lazarus.pp
c:\lazarus\ide\lazarus.pp(115,20) Warning: (5044) Symbol "MainFormOnTaskBar" is not portable
(9022) Compiling resource C:\lazarus\units\x86_64-win64\win32\lazarus.obj
(9015) Linking ..\lazarus.exe
(1008) 261 lines compiled, 8.0 sec, 14273984 bytes code, 875044 bytes data
(1021) 1 warning(s) issued
(1022) 4 hint(s) issued

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
Re: We are planning the next release: Lazarus 2.0.2
« Reply #63 on: April 16, 2019, 07:14:08 pm »
A mystery....

The command in the makefile appears correct. (and should be the same for 2.0.0 and 2.0.2 => pretty sure that has not changed in a while)
The command runs outside the makefile.

Also 2.0.0 should have the same version of make. But to be sure, can you check?
Make.exe is in the fpc/3.0.4/x86...../bin directory in each Lazarus installation.
Run: make.exe -version

I get: GNU Make 3.80
for 2.0.2 and 2.0.0

The Makefile in both directories (ide) also is the same on my installs.

yurix

  • New Member
  • *
  • Posts: 14
Re: We are planning the next release: Lazarus 2.0.2
« Reply #64 on: April 16, 2019, 08:33:49 pm »
Run: make.exe -version

I get: GNU Make 3.80
for 2.0.2 and 2.0.0

An interesting situation. Perhaps an error in the causes close to this.
I have installed MinGW. Make from the MinGW is registered in my path variable. By default "make.exe -version" show 3.81.
I have prescribed the path "C:\lazarus\fpc\3.0.4\bin\x86_64-win64" above the others.
Then "make.exe -version" show 3.80. But the error remained.
I can’t completely delete all the "path" to make. This is likely to make inoperable many programs (Altera Quartus Prime, Atollic TrueStudio, etc).

Sorry for my English. If I wrote something is not clear, I will try to reformulate.

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: We are planning the next release: Lazarus 2.0.2
« Reply #65 on: April 16, 2019, 08:39:31 pm »
Version 3.81 should work just as well as 3.80, provided both are "GNU make".

In fact, "3.81" is the version of make used in this Linux box.

The problems arise when there is a "make" in the path which is not "GNU make", like for example the Borland make.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

creaothceann

  • Full Member
  • ***
  • Posts: 117
Re: We are planning the next release: Lazarus 2.0.2
« Reply #66 on: April 16, 2019, 09:37:30 pm »
I can’t completely delete all the "path" to make. This is likely to make inoperable many programs (Altera Quartus Prime, Atollic TrueStudio, etc).

The PATH variable is a variable for a reason. You can change it with the set command and run your program, then change it back, leave it as is, or simply close your command-line interpreter. In a batch file you can use the setlocal command to make sure that the environment variables are restored.

yurix

  • New Member
  • *
  • Posts: 14
Re: We are planning the next release: Lazarus 2.0.2
« Reply #67 on: April 16, 2019, 09:43:08 pm »
Probably, I found where the cause of the bug.
In the environment variable "Path" I have the values "c:\MinGW\MSYS\1.0\bin" and "C:\msys64\usr\bin".
If "c:\MinGW\MSYS\1.0\bin" is above "C:\msys64\usr\bin", then the bug manifests, otherwise it does not.
But in version 2.0.0 and below this bug was missing. Therefore, I believe that this can be considered an error in version 2.0.2, and not an error in the system.

ASBzone

  • Hero Member
  • *****
  • Posts: 678
  • Automation leads to relaxation...
    • Free Console Utilities for Windows (and a few for Linux) from BrainWaveCC
Re: We are planning the next release: Lazarus 2.0.2
« Reply #68 on: April 16, 2019, 10:40:23 pm »
But in version 2.0.0 and below this bug was missing. Therefore, I believe that this can be considered an error in version 2.0.2, and not an error in the system.

Are you saying that you installed 2.0 after you had already installed both of these versions of MinGW?

From the description of the problem with the path, it appears that you have installed the x64 version of Lazarus.  Were your earlier versions of Lazarus also 64-bit, or rather 32-bit?
-ASB: https://www.BrainWaveCC.com/

Lazarus v2.2.7-ada7a90186 / FPC v3.2.3-706-gaadb53e72c
(Windows 64-bit install w/Win32 and Linux/Arm cross-compiles via FpcUpDeluxe on both instances)

My Systems: Windows 10/11 Pro x64 (Current)

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: We are planning the next release: Lazarus 2.0.2
« Reply #69 on: April 17, 2019, 01:44:03 am »
I guess its too late to say that there is a memory leak in TBitBnt in Cocoa ?

(Sorry, just spotted it,  https://bugs.freepascal.org/view.php?id=35400 )

(I'm going to open another forum thread under Mac 'cos there are other things related)

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

dsiders

  • Hero Member
  • *****
  • Posts: 1052
Re: We are planning the next release: Lazarus 2.0.2
« Reply #70 on: April 17, 2019, 01:55:38 am »
Probably, I found where the cause of the bug.
In the environment variable "Path" I have the values "c:\MinGW\MSYS\1.0\bin" and "C:\msys64\usr\bin".
If "c:\MinGW\MSYS\1.0\bin" is above "C:\msys64\usr\bin", then the bug manifests, otherwise it does not.
But in version 2.0.0 and below this bug was missing. Therefore, I believe that this can be considered an error in version 2.0.2, and not an error in the system.

In my case, it wasn't make.exe. It was something else in the Cygwin environment. Removing cygwin from my path allowed it to build successfully. And no, it was not make.exe- there wasn't one in Cygwin. I haven't pinpointed the exact cause yet. But removing Cygwin was enough.
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

yurix

  • New Member
  • *
  • Posts: 14
Re: We are planning the next release: Lazarus 2.0.2
« Reply #71 on: April 17, 2019, 07:31:28 am »
Are you saying that you installed 2.0 after you had already installed both of these versions of MinGW?
Yes it is.

Were your earlier versions of Lazarus also 64-bit, or rather 32-bit?
All previous versions on this system were also x64.

In my case, it wasn't make.exe. It was something else in the Cygwin environment. Removing cygwin from my path allowed it to build successfully. And no, it was not make.exe- there wasn't one in Cygwin. I haven't pinpointed the exact cause yet. But removing Cygwin was enough.
It seems that on my system the cause was not make.exe. Just like you.
When I set the "clear all" option when reassembling, in the message window I often saw "c:/msys64/usr/bin/rm.exe ...".
That is, Lazarus version 2.0.2 prefers to use the utilities from the Path environment, rather than those used in its distribution. The use of "/" instead of the "\" is also surprising. But this does not cause an error.

Thaddy

  • Hero Member
  • *****
  • Posts: 14215
  • Probably until I exterminate Putin.
Re: We are planning the next release: Lazarus 2.0.2
« Reply #72 on: April 17, 2019, 07:53:42 am »
The use of "/" instead of the "\" is also surprising. But this does not cause an error.
The majority of platforms supported by FPC use / as path separator.  Furthermore it is transparent: both / and \ can be used.
\ is a windows/dos centric path separator.
You should not be surprised at all  :D
Specialize a type, not a var.

yurix

  • New Member
  • *
  • Posts: 14
Re: We are planning the next release: Lazarus 2.0.2
« Reply #73 on: April 17, 2019, 08:16:48 am »
You should not be surprised at all  :D
I considered that the "/" is used only for Unix-like systems. Windows usually uses a backslash. But it seems that the "/" also works well for Windows.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
Re: We are planning the next release: Lazarus 2.0.2
« Reply #74 on: April 17, 2019, 01:53:22 pm »
Could either of you test the following patch (with your original environment)?
Applies only if you build from within the IDE. If you use commandline (make/lazbuild) you need to adapt the path yourself.

Alternatively download the f-ide-build branch from
https://github.com/User4martin/lazarus/tree/f-ide-build

Code: [Select]
ide/buildlazdialog.pas | 13 +++++++++++--
diff --git a/ide/buildlazdialog.pas b/ide/buildlazdialog.pas
index 3b560fb937..5c3e562fec 100644
--- a/ide/buildlazdialog.pas
+++ b/ide/buildlazdialog.pas
@@ -58,7 +58,7 @@ uses
   CodeToolManager, DefineTemplates,
   // IDEIntf
   LazIDEIntf, IDEMsgIntf, IDEHelpIntf, IDEImagesIntf, IDEWindowIntf, IDEDialogs,
-  PackageIntf, IDEExternToolIntf,
+  PackageIntf, IDEExternToolIntf, BaseIDEIntf,
   // IDE
   LazarusIDEStrConsts, TransferMacros, LazConf, DialogProcs,
   MainBar, EnvironmentOpts,
@@ -419,6 +419,9 @@ var
   IdeBuildMode: TIdeBuildMode;
   s: String;
   DefaultTargetFilename: String;
+  {$IFDEF WINDOWS}
+  env: TStringList;
+  {$ENDIF}
 begin
   // Get target files and directories.
   Result:=mrCancel;
@@ -437,8 +440,14 @@ begin
     EnvironmentOverrides.Values['LCL_PLATFORM']:=LCLPlatformDirNames[Profile.TargetPlatform];
     EnvironmentOverrides.Values['LANG']:= 'en_US';
     s:=EnvironmentOptions.GetParsedCompilerFilename;
-    if s<>'' then
+    if s<>'' then begin
       EnvironmentOverrides.Values['PP']:=s;
+      {$IFDEF WINDOWS}
+      env := EnvironmentAsStringList;
+      EnvironmentOverrides.Values['PATH']:= ExtractFileDir(s) + ';' + env.Values['PATH'];
+      env.Free;
+      {$ENDIF}
+    end;
 
     Executable:=EnvironmentOptions.GetParsedMakeFilename;
     if (Executable<>'') and (not FileExistsUTF8(Executable)) then

 

TinyPortal © 2005-2018