Recent

Author Topic: Cannot rebuild IDE built from snapshot lazarus-2.0.2-60960-fpc-3.2.0-beta-41793  (Read 613 times)

glorfin

  • Jr. Member
  • **
  • Posts: 61
I tried to install beta version of Lazarus 2.0.2 from last snapshot (see subject).
It installed successfully and compiled simple test project. However, attempt to rebuild IDE, even without adding any packages, leads to error messages, first of which is:

Panic: C:\lazarus2\fpc\3.2.0\bin\x86_64-win64\make.exe: Entering directory `C:/lazarus2'

Old Lazarus (2.0.0, fpc 3.0.4) behaves fine.

My paths do not contain any strange symbols. I tried "clean all" option for rebuild, tried to install this snapshot as secondary or single primary installation; tried to run it as administrator and tried both 32-bit and 64-bit versions. Result is same.

I have Windows 10, version 6.3.17134

Thank you in advance for help!

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5573
    • wiki
Check what is in your environment var PATH. There may be a make.exe in your path, or any other mingw stuff (like maybe a shell).

There were previous reports that older versions of Lazarus could be build with such files in path, but newer could not (no idea why).


Maybe start from a batch, that cleans PATH

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5573
    • wiki
Many thanks! It helped.
But this is unfortunate, I need MinGW sometimes. Is there a hope that this will be fixed?

It depends what exactly happened it your case. I am aware of 2 possibilities

1) The wrong make.exe is found.
In that case the following may help
https://github.com/User4martin/lazarus/commit/4ddf1d39c39915b85c4dae5240575948bfc503b9

2) The correct make.exe is found, but it finds a sh.exe (not sure what other shell names make.exe may try looking for). If it does find this, then there is no known fix, but to remove it from the PATH.

If anyone knows a way to fix this, please let us know.

---
In any case you can run the IDE from a batch, that changed the PATH for the IDE only.
If your app needs the PATH in the debugger, you can re-add it under run > run parameters

glorfin

  • Jr. Member
  • **
  • Posts: 61
Unfortunately, my previous reoly was a mistake. I rebuilt an old, primary Lazarus installation. Oops...
New one does not rebuild even after cleaning a path variable.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5573
    • wiki
How to you rebuild? From the Tools menu? Or calling make / buildlazarus from console?

I just installed the 41793 64bit and rebuild from the tools menu. Worked. Win 10, 1809, 64bit.

You may want to switch off "update revision inc" (only works in an svn folder, *should* be ignored otherwise).

If you still get the error, then right click the messages window, and "copy" > "copy all/original messages". Maybe that gives some extra.
You can also start the IDE with --debug-log=c:\somelogfile.txt
(you can edit the desktop shortcut to add this)
Maybe the logfile will have some info


Make sure it is not your AV, if you use one.

glorfin

  • Jr. Member
  • **
  • Posts: 61
From the Tools menu.

I found the solution, though do not understand it.

I am using Take Command Console (TCC) as command processor, and it was set as ComSpec in my system.

Now I replaced it with cmd.exe and after it recompiled new lazarus successfully.

But thank you for idea about system variables!

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5573
    • wiki
So if you apply the patch, and add
EnvironmentOverrides.Values['COMSPEC']:='';

Does that help?

glorfin

  • Jr. Member
  • **
  • Posts: 61
For now, I changed ComSpec in the system and it helped.

But where should I add EnvironmentOverrides.Values['COMSPEC']:='';?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5573
    • wiki
For now, I changed ComSpec in the system and it helped.

But where should I add EnvironmentOverrides.Values['COMSPEC']:='';?
Have a look at the github link. It inserts a line to set the PATH, right next to that line.

glorfin

  • Jr. Member
  • **
  • Posts: 61
Yes, after this patch it works with any system ComSpec.

Thank you!