Recent

Author Topic: Unable to rebuild lazarus ide with new version install  (Read 390 times)

mewpokemon

  • New Member
  • *
  • Posts: 29
Unable to rebuild lazarus ide with new version install
« on: November 06, 2019, 05:03:06 am »
Heyas!

I cannot recompile the IDE.

I've just installed Lazarus 2.06.  I deleted the old install.  I selected to delete the previous configurations.

It fails:

Fatal: Unable to open file C:Usersd1englandAppDataLocallazarusidemake.cfg -dx86_64

What is going wrong?


Daniel.

Zvoni

  • Sr. Member
  • ****
  • Posts: 267
Re: Unable to rebuild lazarus ide with new version install
« Reply #1 on: November 06, 2019, 09:38:53 am »
Are you logged in as "d1england"?
One System to rule them all, One IDE to find them,
One Code to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
People call me crazy, because i'm jumping out of perfectly fine aircrafts

wp

  • Hero Member
  • *****
  • Posts: 6334
Re: Unable to rebuild lazarus ide with new version install
« Reply #2 on: November 06, 2019, 10:05:14 am »
The problem is: why are the backslashes missing?

What exactly did you do when you installed v2.0.6? You obviously did not select to create a secondary installation (because then the config files would not necessarily go into c:\users\<name>\AppData\Local\Lazarus). Please repeat the installation and check "create secondary installation" this time. Does the issue appear again?
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

mewpokemon

  • New Member
  • *
  • Posts: 29
Re: Unable to rebuild lazarus ide with new version install
« Reply #3 on: November 06, 2019, 02:16:01 pm »
*sigh*

Sorry, I may have copied the error message from one of the ten times I tried installing it.

I tried installing it again...  Secondary installation.

I get this error:

Fatal: Unable to open file D:laz_conflazarus206idemake.cfg -dx86_64

In the meantime, I have even tried to make sure that my make is correct.  I edited my path such that the FPC dir is at the top.  When I "startlazarus" for the first time, it is picking up FPC from the previous install attempt but I am changing it to use the one with the installation ($(lazdir)... or something).  I checked that the make setting was correct and it was.

I am at a loss.


Daniel.

mewpokemon

  • New Member
  • *
  • Posts: 29
Re: Unable to rebuild lazarus ide with new version install
« Reply #4 on: November 06, 2019, 02:56:37 pm »
Here is what I get when trying to build from the command-line (copying out what I would get by doing make useride):

Quote
D:\lazarus206>lazbuild.exe --lazarusdir=. --build-ide=
using config file D:\lazarus206\lazarus.cfg
SetPrimaryConfigPath NewValue="D:\laz_conf\lazarus206" -> "D:\laz_conf\lazarus206"
Note: (lazarus) renamed file "D:\lazarus206\lazarus.exe" to "D:\lazarus206\lazarus.old.exe"
Info: (lazarus) Execute Title="Build IDE"
Info: (lazarus) Working Directory="D:\lazarus206\"
Info: (lazarus) Executable="D:\lazarus206\fpc\3.0.4\bin\x86_64-win64\make.exe"
Info: (lazarus) Param[0]="-w"
Info: (lazarus) Param[1]="idepkg"
D:\lazarus206\fpc\3.0.4\bin\x86_64-win64\make.exe: Entering directory `D:/lazarus206'
D:/lazarus206/fpc/3.0.4/bin/x86_64-win64/make.exe -C ide idepkg
make.exe[1]: Entering directory `D:/lazarus206/ide'
../tools/svn2revisioninc.exe .. revision.inc
D:/lazarus206/fpc/3.0.4/bin/x86_64-win64/make.exe --assume-new=lazarus.pp lazarus.exe OPT=' -WG "@D:\laz_conf\lazarus206\idemake.cfg"'
make.exe[2]: Entering directory `D:/lazarus206/ide'
D:/lazarus206/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 "@D:\laz_conf\lazarus206\idemake.cfg" -dx86_64 lazarus.pp
Hint: (11030) Start of reading config file D:\lazarus206\fpc\3.0.4\bin\x86_64-win64\fpc.cfg
Hint: (11031) End of reading config file D:\lazarus206\fpc\3.0.4\bin\x86_64-win64\fpc.cfg
Fatal: (11009) Unable to open file D:laz_conflazarus206idemake.cfg -dx86_64
Fatal: (1018) Compilation aborted
Error: D:\lazarus206\fpc\3.0.4\bin\x86_64-win64\ppcx64.exe returned an error exitcode
make.exe[2]: *** [lazarus.exe] Error 1
make.exe[2]: Leaving directory `D:/lazarus206/ide'
make.exe[1]: *** [idepkg] Error 2
make.exe[1]: Leaving directory `D:/lazarus206/ide'
D:\lazarus206\fpc\3.0.4\bin\x86_64-win64\make.exe: *** [idepkg] Error 2
D:\lazarus206\fpc\3.0.4\bin\x86_64-win64\make.exe: Leaving directory `D:/lazarus206'
Error: (lazarus) Build IDE: stopped with exit code 2
Error: (lazarus) Building IDE: Building IDE failed.


If I manually change directory to D:\lazarus206\ide I can do the following:
Quote
D:\lazarus206\ide>D:/lazarus206/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 @D:\laz_conf\lazarus206\idemake.cfg -dx86_64 lazarus.pp
Hint: (11030) Start of reading config file D:\lazarus206\fpc\3.0.4\bin\x86_64-win64\fpc.cfg
Hint: (11031) End of reading config file D:\lazarus206\fpc\3.0.4\bin\x86_64-win64\fpc.cfg
Hint: (11030) Start of reading config file D:\laz_conf\lazarus206\idemake.cfg
Hint: (11031) End of reading config file D:\laz_conf\lazarus206\idemake.cfg
Free Pascal Compiler version 3.0.4 [2019/10/27] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
(1002) Target OS: Win64 for x64
(3104) Compiling lazarus.pp
D:\lazarus206\ide\lazarus.pp(115,20) Warning: (5044) Symbol "MainFormOnTaskBar" is not portable
(9022) Compiling resource D:\lazarus206\units\x86_64-win64\win32\lazarus.obj
(9015) Linking ..\lazarus.exe
(1008) 261 lines compiled, 8.2 sec, 14283680 bytes code, 875156 bytes data
(1021) 1 warning(s) issued
(1022) 4 hint(s) issued

I stripped off the quotes from the config file parameter and it works.  Why do the scripts get this wrong?  I don't know how to fix it.


Daniel

mewpokemon

  • New Member
  • *
  • Posts: 29
Re: Unable to rebuild lazarus ide with new version install
« Reply #5 on: November 06, 2019, 03:30:16 pm »
If I keep the quotes and change the '\' to '/' it also works:

Quote
D:\lazarus206\ide>D:/lazarus206/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 "@D:/laz_conf/lazarus206/idemake.cfg" -dx86_64 lazarus.pp


As far as I can tell, this isn't in the make scripts but coming out of lazbuild.  Is this correct?  I can't find a definition of the variable CFGFILE in the scripts.  This seems to be the variable being used here.


Daniel.

mattias

  • Administrator
  • Full Member
  • *
  • Posts: 145
    • http://www.lazarus.freepascal.org
Re: Unable to rebuild lazarus ide with new version install
« Reply #6 on: November 06, 2019, 05:23:25 pm »
The bug seems to appear only on some system, with some conflicting tools in PATH.
Lazarus trunk and fixes now adds the double quotes around idemak.cfg only if there are spaces.

wp

  • Hero Member
  • *****
  • Posts: 6334
Re: Unable to rebuild lazarus ide with new version install
« Reply #7 on: November 06, 2019, 05:30:57 pm »
I contacted the dev mailing list and Mattias resolved the issue in trunk. If you don't use Laz trunk, open file "BuildLazDlg.pas" in folder "ide" of the Lazarus installation. Find procedure "TLazarusBuilder.AppendExtraOption". There is a line "if AutoQuote then". Replace this by "if AutoQuote and (pos(' ',aOption)>0) then". Rebuilding the IDE from the Tools menu should work now. (of course, make a backup copy of the file before changing anything!)

Please report back if the issue is solved or not.

[EDIT]
Ah, Mattias was faster...
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

mewpokemon

  • New Member
  • *
  • Posts: 29
Re: Unable to rebuild lazarus ide with new version install
« Reply #8 on: November 06, 2019, 05:44:11 pm »
Nope, no better.

The file is "buildlazdialog.pas", btw...

I thought I might need to rebuild lazbuild so I did a "make lazbuild" first.  It didn't help.

I had to do a "make useride" after that to get it to work.

So, it does work now...

However, won't there still be an issue if there are spaces in the path since the real problem is the backslashes?  Don't you need to convert them to forward slashes, too?  All of the rest of the build chain (in make files) does this.


Daniel.