Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2021-10

Lazbuild error on Windows

5 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Ryan Joseph

I'm trying to build a Lazarus project on Windows and I've ran into a problem. Since I barely know Windows all I have known to do is download the latest version of the compiler and Lazarus then install them via their installers. I expected then to be able to use lazbuild like I do on macOS but I got an error that some file is missing.

Here's the part which fails. How could lazfileutils.pas not be found? I actually see the .ppu file where it should be so it feels like the compiler and the version of Lazarus are not matching or something.

Free Pascal Compiler version 3.2.2 [2021/05/15] for i386 Copyright (c) 1993-2021 by Florian Klaempfl and others (1002) Target OS: Win32 for i386
(3104) Compiling weblaz.pas
(3104) Compiling fpideexteditorinsertfilenameunit.pas (10001) PPU Loading C:\lazarus\components\lazutils\lib\i386-win32\lazfileutils.ppu (10011) PPU Source: lazfileutils.pas not found
(10011) PPU Source: lazutils_defines.inc not available (10011) PPU Source: lazfileutils.inc not available (10011) PPU Source: winlazfileutils.inc not available (10028) Recompiling LazFileUtils, checksum changed for C:\FPC\3.2.2\units\i386-win32\rtl\system.ppu C:\lazarus\components\fpweb\fpideexteditorinsertfilenameunit.pas(37,22) Fatal: (10022) Can't find unit LazFileUtils used by fpIDEExtEditorInsertFileNameUnit Fatal: (1018) Compilation aborted
Error: C:\FPC\3.2.2\bin\i386-Win32\ppc386.exe returned an error exitcode Error: (lazarus) Compile package weblaz 1.0: stopped with exit code 1 Error: (lazarus) [TLazPackageGraph.CompileRequiredPackages] "Exit code 1"

Regards,
Ryan Joseph

Ryan Joseph
On Oct 28, 2021, at 9:39 PM, Dennis Lee Bieber via fpc-pascal wrote: Are you actually running on a 32-bit system? You appear to have installed a 32-bit compiler.

I think I may have downloaded the 32 bit version of the compiler and then the 64 bit Lazarus! That would make sense it would fail then. Let me try downloading the correct version and I'll report back.

If Lazarus installed the compiler also maybe I just need to update my paths so "fpc" points to the version in Lazarus...

Thanks.

Regards,
Ryan Joseph

Ryan Joseph
to Ryan Joseph

Sorry I didn't look up high enough in the output to see this before. It looks like lazbuild can't find the correct version of the compiler that is packaged. I can confirm that path exists but I think the variable $Lazarusdir may be wrong.

What could be wrong here? I got Lazarus via an installer so I don't know how else to set it up.

PS C:\Users\Ryan Joseph\Desktop\Developer\pascal-language-server> C:\lazarus\lazbuild.exe pasls.lpi SetupCompilerFilename: The compiler path "$Lazarusdir\fpc\3.2.0\bin\i386-win32\fpc.exe" => "C:\lazarus\$Lazarusdir\fpc\3.2.0\bin\i386-win32\fpc.exe" is invalid (Error: file not found) Searching a proper one ... SearchCompilerCandidates Value=$Lazarusdir\fpc\3.2.0\bin\i386-win32\fpc.exe File=C:\lazarus\$Lazarusdir\fpc\3.2.0\bin\i386-win32\fpc.exe SearchCompilerCandidates Value=$Lazarusdir\fpc\3.2.0\bin\i386-win32\\fpc.exe File=C:\lazarus\$Lazarusdir\fpc\3.2.0\bin\i386-win32\fpc.exe SearchCompilerCandidates Value=$Lazarusdir\fpc\3.2.0\bin\i386-win32\\fpc.exe File=C:\lazarus\$Lazarusdir\fpc\3.2.0\bin\i386-win32\fpc.exe SearchCompilerCandidates Value=fpc.exe File=C:\FPC\3.2.2\bin\i386-Win32\fpc.exe

On Oct 29, 2021, at 9:46 AM, Ryan Joseph wrote: I think I may have downloaded the 32 bit version of the compiler and then the 64 bit Lazarus! That would make sense it would fail then. Let me try downloading the correct version and I'll report back.

Regards,
Ryan Joseph

Mattias Gaertner
to Ryan Joseph
Sorry I didn't look up high enough in the output to see this before. It looks like lazbuild can't find the correct version of the compiler that is packaged. I can confirm that path exists but I think the variable $Lazarusdir may be wrong.

Lazarus uses macros of the form $(LazarusDir) .

Did you check the fpc path in Lazarus?
Tools / Options / Environment

What could be wrong here? I got Lazarus via an installer so I don't know how else to set it up.

Maybe it uses some old config?
lazbuild --verbose pasls.lpi

Mattias

Show quoted text 31 lines
PS C:\Users\Ryan Joseph\Desktop\Developer\pascal-language-server> C:\lazarus\lazbuild.exe pasls.lpi SetupCompilerFilename: The compiler path "$Lazarusdir\fpc\3.2.0\bin\i386-win32\fpc.exe" => "C:\lazarus\$Lazarusdir\fpc\3.2.0\bin\i386-win32\fpc.exe" is invalid (Error: file not found) Searching a proper one ... SearchCompilerCandidates Value=$Lazarusdir\fpc\3.2.0\bin\i386-win32\fpc.exe File=C:\lazarus\$Lazarusdir\fpc\3.2.0\bin\i386-win32\fpc.exe SearchCompilerCandidates Value=$Lazarusdir\fpc\3.2.0\bin\i386-win32\\fpc.exe File=C:\lazarus\$Lazarusdir\fpc\3.2.0\bin\i386-win32\fpc.exe SearchCompilerCandidates Value=$Lazarusdir\fpc\3.2.0\bin\i386-win32\\fpc.exe File=C:\lazarus\$Lazarusdir\fpc\3.2.0\bin\i386-win32\fpc.exe SearchCompilerCandidates Value=fpc.exe File=C:\FPC\3.2.2\bin\i386-Win32\fpc.exe > On Oct 29, 2021, at 9:46 AM, Ryan Joseph > wrote: > > I think I may have downloaded the 32 bit version of the compiler > and then the 64 bit Lazarus! That would make sense it would fail > then. Let me try downloading the correct version and I'll report > back. Regards, Ryan Joseph _______________________________________________ fpc-pascal maillist - https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Ryan Joseph
to Mattias Gaertner
Show quoted text 6 lines
On Oct 29, 2021, at 2:01 PM, Mattias Gaertner via fpc-pascal wrote: Lazarus uses macros of the form $(LazarusDir) . Did you check the fpc path in Lazarus? Tools / Options / Environment

So what happened here is that I as a new user on Windows decided I needed the compiler first so I downloaded the most recent version 3.2.2. After that I wanted to use lazbuild and some Lazarus libraries so I installed that next. Problem was Lazarus uses "fpc" as the compiler path and due to the installation order that pointed to the newer version of FPC which wasn't compatible with the 3.2.0 units compiled in Lazarus.

Maybe Lazarus should by default point to the version of the compiler that comes packaged with it? That would eliminate a bunch of the confusion I had and when I wanted to change the compiler version I would have had to set it explicitly myself and triggered the error but at least then I would know it was because of something I did.

Regards,
Ryan Joseph