"PPU file isn't found by the compiler" error lazarus / 1-Linux ---------------------------------------------------------------------- Dave75 · 2026-02-16 17:51 Hi all, I'm brand new in Lazarus. I've a fresh installation in Debian 13 but I've a problem getting the compiled binary. While I have no problem in Compiling and Running an application, I go the following error when I try to create a binary file of the application: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i "Build File /home/davide/Progetti_FP/Prova/unit1.pas: Codice di uscita 1, Errori: 1Copyright (c) 1993-2021 by Florian Klaempfl and othersTarget OS: Linux for x86-64unit1.pas(8,22) Error: Impossibile trovare Forms usato da Unit1, ppu=/home/davide/.lazarus/lib/LCLBase/units/x86_64-linux/forms.ppu incompatibile, pacchetto LCLBase.You tried to use a unit of which the PPU file isn't found by the compiler. Check your configuration file for the unit paths."  Note that I've got the problem even with a blank brand new application with just a form in it (the basic code proposed by Lazarus when a new application project is created), like the following: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit Unit1; {$mode objfpc}{$H+} interface uses  Classes, SysUtils, Forms, Controls, Graphics, Dialogs; type  TForm1 = class(TForm)  private   public   end; var  Form1: TForm1; implementation {$R *.lfm} end. Actually the file mentioned exists: ppu=/home/davide/.lazarus/lib/LCLBase/units/x86_64-linux/forms.ppu Thanks to anyone who may have some hints. ---------------------------------------------------------------------- Martin_fr · 2026-02-16 18:20 Maybe a problem after updating Lazarus.... Try: Menu > Tools > Configure Build Lazarus  => Select "clean all" (radio-box)  => Press "build" (button) You do not need to restart (you can, but you do not need). After that, try building your app again. ---------------------------------------------------------------------- Martin_fr · 2026-02-16 18:24 Quote from: Dave75 on February 16, 2026, 06:51:47 pmActually the file mentioned exists: ppu=/home/davide/.lazarus/lib/LCLBase/units/x86_64-linux/forms.ppu Yes the file exists, but the error says "incompatibile" => e.g. build with a different version of FPC. (or diff settings) In rare cases the IDE does not detect this, and then you get this error. Normally the IDE should detect this, and then the IDE would rebuild it automatically. Rebuild Lazarus with "clean all" is just a way to force rebuilding that unit too. ---------------------------------------------------------------------- Dave75 · 2026-02-16 19:10 Thank you Martin_fr I've tried what you've suggested. It worked for few minutes succesfully (with some warnings, but I guess it's normal). At the end Lazarus closed and restarted. In attachment the "build Lazarus" window before clicking on "Build" (Costruisci) button. I've tried again with the code posted before (an empty form): no problems in "Running" the code, the form appears, but again when I ask to build the binary the same error comes out. ---------------------------------------------------------------------- Martin_fr · 2026-02-16 19:37 Quote from: Dave75 on February 16, 2026, 08:10:56 pmI've tried again with the code posted before (an empty form): no problems in "Running" the code, the form appears, but again when I ask to build the binary the same error comes out. "running" <> "build the binary" Strictly speaking, when you "run" there is a binary being build too. Just to be sure I understand, - Menu: Project > New Project > Application - Menu: Run > Run  (or just F9 / or the green arrow button) => app starts running from the IDE => If you added code source editor shows some blue dots on the left side => the "pause" and "stop" button in the toolbar become active But - Menu: Run > Build => and you get the error? Or do you mean "lazbuild"? ---------------------------------------------------------------------- Martin_fr · 2026-02-16 19:49 I just noted: Quote"Build File If you selected "build file" that will not generate the binary (though the error message is not what I would expect at all). "build file" will compile/build the current file. But "unit1" is not a file that generates an executable. There is a 2nd file "project1.lpr" and that can generate the executable. If you just go for "run > build" then the IDE will build that. You can see this 2nd file by: Menu: project > view project source ---------------------------------------------------------------------- Dave75 · 2026-02-16 19:52 yes, exactly, you understand correctly, this is what is happening. I'm a bit puzzled ... I cannot understand how it can works when I ask "Run / Run" but it doesn't when I ask "Run / Build"  In attachment after asking "Run / Run". ---------------------------------------------------------------------- Dave75 · 2026-02-16 19:56 Quote from: Martin_fr on February 16, 2026, 08:49:04 pm There is a 2nd file "project1.lpr" and that can generate the executable. If you just go for "run > build" then the IDE will build that. You can see this 2nd file by: Menu: project > view project source Just tried this as well ... not exactly the same error (now pointing to "Interfaces" instead of "Form"), but still an error of missing / incompatible file (see attachment). I'm really puzzled. ---------------------------------------------------------------------- Martin_fr · 2026-02-16 20:21 Quote from: Dave75 on February 16, 2026, 08:56:31 pmQuote from: Martin_fr on February 16, 2026, 08:49:04 pm There is a 2nd file "project1.lpr" and that can generate the executable. If you just go for "run > build" then the IDE will build that. You can see this 2nd file by: Menu: project > view project source Just tried this as well ... not exactly the same error (now pointing to "Interfaces" instead of "Form"), but still an error of missing / incompatible file (see attachment). That was with Menu: Run > Build file or with Menu: Run > Build ? "Build file" does seem to have a problem. I don't know exactly how it should be used (I don't use it myself). Someone else needs to look into that. But "Build"  (the 2nd entry in the "Run" menu) should work. ---------------------------------------------------------------------- Dave75 · 2026-02-16 20:27 Quote from: Martin_fr on February 16, 2026, 09:21:35 pm "Build file" does seem to have a problem. I don't know exactly how it should be used (I don't use it myself). Someone else needs to look into that. But "Build"  (the 2nd entry in the "Run" menu) should work. Defenitely "Build" works!  ... I was using "Build file"    Thanks Martin_fr! it's solved! ---------------------------------------------------------------------- Martin_fr · 2026-02-16 20:29 Afaik (but I haven't looked at it in a long time) "Build file" is to check the current file for compile errors. But given that it fails even that, I don't know... Not sure how it needs to be set up.