Due to Bugtracker not available i post it here:
I have an "Execute before command" in a package:
$(LazarusDir)/tools/lazres runtime.lrs "LazProfilerRunTime.pas"=rt "LazProfilerCore.pas"=core "$PkgDir(etpackage)epiktimer.pas"=timer
I often get the following error when compiling:
Package LazProfiler 0.1.3: Executing command before: missing executable "C:\freepascal\laz\tools\lazres", Errors: 1
Panic: internal error: missing executable "C:\freepascal\laz\tools\lazres"
Debugoutput is the following:
Hint: (lazarus) compile package LazProfiler 0.1.3 Flags=[]
Hint: (lazarus) Missing state file of LazProfiler 0.1.3: C:\freepascal\laz\components\lazprofiler\lib\i386-win32\LazProfiler.compiled
Error: (lazarus) [TExternalTool.DoExecute.CheckError] Error=missing executable "C:\freepascal\laz\tools\lazres"
Error: (lazarus) [TLazPackageGraph.CompilePackage] ExecuteBefore failed: LazProfiler 0.1.3
If i now change the the name of the executable from
$(LazarusDir)/tools/lazres to $(LazarusDir)/tools/lazres
.exei can compile the package.
Ifi now remove the extension of the executable again i can also compile the package which failed before.
Here is the debug output:
Hint: (lazarus) compile package LazProfiler 0.1.3 Flags=[]
Info: (lazarus) Execute Title="Package LazProfiler 0.1.3: Executing command before"
Info: (lazarus) Working Directory="C:\freepascal\laz\components\lazprofiler\"
Info: (lazarus) Executable="C:\freepascal\laz\tools\lazres.exe"
Info: (lazarus) Param[0]="runtime.lrs"
Info: (lazarus) Param[1]="LazProfilerRunTime.pas=rt"
Info: (lazarus) Param[2]="LazProfilerCore.pas=core"
Info: (lazarus) Param[3]="C:\freepascal\Config\i386\onlinepackagemanager\packages\epiktimer\epiktimer.pas=timer"
The clue to this situation seems to be the following debug message:
Hint: (lazarus) Missing state file of LazProfiler 0.1.3: C:\freepascal\laz\components\lazprofiler\lib\i386-win32\LazProfiler.compiled
If the state file is missing the resolving of the executable is not working as expected.