[SOLVED] Lazarus IDE Start Up Issue and Re-Build Issue lazarus / 21-General ---------------------------------------------------------------------- Aruna · 2025-03-23 13:45 Hi everyone, The first attached screenshot shows an error message that has been around for quite some time. I usually just click "Skip" and continue working without issues. The second screenshot, however, is from just a few minutes ago when I asked the IDE to rebuild itself — this is a new error that I haven’t seen before. As for the first error, I believe it’s related to a missing custom component I created using an earlier version of the IDE. It hasn’t caused any real problems, but I think it’s time to resolve it properly. What’s the best way to cleanly fix this? The second question: how can I get the IDE to start building itself again? I was working on a Notepad example and wanted to check if it would be automatically included in the examples, which is why I attempted the rebuild. Thanks in advance for any advice! ---------------------------------------------------------------------- paweld · 2025-03-23 13:50 Menu > Package > Instal/Uninstall Packages ... Find package "NewComponent1" on the left list, select them ad click "Uninstall selection" next click "Build IDE" ---------------------------------------------------------------------- Aruna · 2025-03-23 14:40 Quote from: paweld on March 23, 2025, 02:50:24 pmMenu > Package > Instal/Uninstall Packages ... Find package "NewComponent1" on the left list, select them ad click "Uninstall selection" next click "Build IDE" Thank you @paweld please watch this to the end else no one will believe me: Lazarus IDE Startup and Rebuild Issues most of the errors are of my own doing and does not prevent me from coding but is a nuisance now. The building of the IDE I have no clue why it does that and chokes like that? ---------------------------------------------------------------------- paweld · 2025-03-23 16:27 Problem with non-existent packages will solve with a full rebuild of lazarus in the “Clean and Build All” profile: Menu > Tools > Configure “Build Lazarus” ... > set “Profile to build” to “Clean and build all” > press “Build” BUT before that you have to solve the error with missing file “clocale.ppu” - for this you need to compile FPC ---------------------------------------------------------------------- Martin_fr · 2025-03-23 17:01 "Checksum Changed" for an FPC/RTL unit usually means you have more than one version of that ppu in the unit/ppu seach path. This may be in your lazarus config, the project config, or the fpc.cfg config. Or you have a 2nd file called clocale. (E.g. a copy or modified copy of that file). Such a 2nd pas file would cause a 2nd ppu file. It can also happen, if you did compile FPC yourself, and did not compile with -Ur (not sure maybe -UR ?? => search: compile unit for release). ---------------------------------------------------------------------- Aruna · 2025-03-23 17:24 Quote from: paweld on March 23, 2025, 05:27:56 pmProblem with non- existent packages will solve with a full rebuild of lazarus in the “Clean and Build All” profile: Menu > Tools > Configure “Build Lazarus” ... > set “Profile to build” to “Clean and build all” > press “Build” BUT before that you have to solve the error with missing file “clocale.ppu” - for this you need to compile FPC Alright, thanks once again. I will try to figure out how to solve the clocal.ppu missing error. ---------------------------------------------------------------------- Aruna · 2025-03-23 17:31 Quote from: Martin_fr on March 23, 2025, 06:01:29 pm"Checksum Changed" for an FPC/RTL unit usually means you have more than one version of that ppu in the unit/ppu seach path. This may be in your lazarus config, the project config, or the fpc.cfg config. Or you have a 2nd file called clocale. (E.g. a copy or modified copy of that file). Such a 2nd pas file would cause a 2nd ppu file. It can also happen, if you did compile FPC yourself, and did not compile with -Ur (not sure maybe -UR ?? => search: compile unit for release). @Martin_frI I have honestly lost count of the number of Lazarus installations I have. I know they are definitely more than 4. The very first one I started with a 2.2.* something then I upgraded to another 2.8.* something then I remembered I used the deb's and installed an RC4.0 then I cloned the gitlab repo and did compile and built FPC so could be any one of those things. In between doing those I was trying my own experiments with the IDE. I also have 3.*.* lying around.... it is a royal mess but so far I have managed to work with it So yes you are right there are multiple versions of lazIDE on this hard drive. I have to now figure out how to fix that clocale error. ---------------------------------------------------------------------- Martin_fr · 2025-03-23 18:51 First of all, clocale is FPC => so versions of FPC. Then, I take it from your anwer you did not make any copies of clocale.pas (or .pp)? Good. Are the fpc (if more than one) all installed from official installer? If they are from fpcupdeluxe, are they wrapped in the script provided by fpcupdeluxe? On Linux, having more than one fpc may require some attention, because they all want to use /etc/fpc.cfg (or the fpc.cfg somewhere in the home dir...). So if you installed (rpm/dep/...) a newer fpc, then the older may give errors. Though usually that would be an error about ppu version... Strange. Make sure that in your Lazarus and your project dir (and any package used by lazarus) there is no clocale.ppu anywhere. That must only exist in the fpc installation. And the path to 3.2.2 in the error is the path of your fpc install, that you are using? ---------------------------------------------------------------------- Aruna · 2025-03-23 21:36 Quote from: Martin_fr on March 23, 2025, 07:51:17 pmFirst of all, clocale is FPC => so versions of FPC. Ok, good to know. I did not know this. Thank you. Quote from: Martin_fr on March 23, 2025, 07:51:17 pmThen, I take it from your anwer you did not make any copies of clocale.pas (or .pp)? Good. 'I' did not make copies but when I search using *find* ths iis what I see: 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 aruna@debian:~$ sudo find / -type f -name "*clocale.pas*" 2>/dev/nullaruna@debian:~$ sudo find / -type f -name "*clocale.pp*" 2>/dev/null/usr/local/lib/fpc/3.2.2/units/x86_64-linux/rtl- extra/clocale.ppu/usr/share/fpcsrc/3.2.2/packages/rtl- extra/src/unix/clocale.pp/usr/share/fpcsrc/3.2.2/packages/rtl- extra/src/android/clocale.pp/usr/share/fpcsrc/3.2.2/packages/rtl-extra /units/x86_64-linux/clocale.ppu/usr/lib/fpc/3.2.2/units/x86_64- linux/rtl-extra/clocale.ppu/home/aruna/FPC-Source/source/packages/rtl- extra/src/unix/clocale.pp/home/aruna/FPC-Source/source/packages/rtl- extra/src/android/clocale.pp/home/aruna/keelazide/source/packages/rtl- extra/src/unix/clocale.pp/home/aruna/keelazide/source/packages/rtl- extra/src/android/clocale.pp/home/aruna/keelazide/source/packages/rtl- extra/units/x86_64-linux/clocale.ppuaruna@debian:~$ Quote from: Martin_fr on March 23, 2025, 07:51:17 pmAre the fpc (if more than one) all installed from official installer? If they are from fpcupdeluxe, are they wrapped in the script provided by fpcupdeluxe? No only the first two were installed using the offical installer after that I started experimenting.. I stayed away from fpcupdeluxe even though many people regard it highly as some reviews had horror stories. Once I undesratnd enough about how things work under the hood I guess I may try fpcupdeluxe at this moment uh-uh. Quote from: Martin_fr on March 23, 2025, 07:51:17 pmOn Linux, having more than one fpc may require some attention, because they all want to use /etc/fpc.cfg (or the fpc.cfg somewhere in the home dir...). Using linux *find* agian I get this: 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 aruna@debian:~$ sudo find / -type f -name "fpc.cfg" 2>/dev/null/etc/fpc.cfg/home/aruna/lazarus/forum- demos/shock/test/fpc.cfgaruna@debian:~$ Quote from: Martin_fr on March 23, 2025, 07:51:17 pmSo if you installed (rpm/dep/...) a newer fpc, then the older may give errors. I use Linux Debian so they were *.deb's Quote from: Martin_fr on March 23, 2025, 07:51:17 pmThough usually that would be an error about ppu version... Strange. 'I' was doing 'strange' experiments so most probably I broke something? Or did something I am not supposed to do like change the name of a project folder while working on /that/ folder whic initially had me climbing the wall but now I fix like it is nothing. Experience is the best teacher I guess Quote from: Martin_fr on March 23, 2025, 07:51:17 pmMake sure that in your Lazarus and your project dir (and any package used by lazarus) there is no clocale.ppu anywhere. That must only exist in the fpc installation. I will check again... Quote from: Martin_fr on March 23, 2025, 07:51:17 pmAnd the path to 3.2.2 in the error is the path of your fpc install, that you are using? I cloned and built from the source the fpc so I am not dead certain. Let me check and verify then report back ? ---------------------------------------------------------------------- Martin_fr · 2025-03-23 22:04 I probably wont be able to give you a definite answer. But... It is normal that there are sources for different OS. But only one would have been build and installed as ppu. And it is ppu that matters. At that time the compiler should not have access to the sources of the rtl. => Yet strangely, in your error it says "recompiling" and does not give an error that it did not find the source. Either the error is just filtered out, or there is a further issue... If you have any setup that compiles fpc units from within the Lazarus IDE => you will have trouble (there are cases / stuff that can be done, but it needs some more understanding, so lets just say: don't compile fpc sources from lazarus) If you can  get the error with a small(er) project (e.g. maybe just "uses clocale") and you compile it with     -va If inside the IDE, the IDE will hide many messages, and you need to do "copy all". So maybe do that from outside the IDE. It will tell you every file the compiler tried to access, and if it found it or not. So, if you know - what fpc you are using, - and where that fpc should have its ppu, - and that the source files should not be found by fpc then you can go through that list, and check for what happens for clocale.* (and units right before). Its a lot of work (and I wont be able to do it for you, even if you upload the entire log / sorry limited time). You will also see what fpc.cfg it accesses, and you can check inside of them what search path are used, and if they match where that fpc should be installed. The upside, after that, you have a better understanding how all of this works. ---------------------------------------------------------------------- Aruna · 2025-03-24 00:10 Quote from: Martin_fr on March 23, 2025, 11:04:49 pmI probably wont be able to give you a definite answer. But... It is normal that there are sources for different OS. But only one would have been build and installed as ppu. And it is ppu that matters. At that time the compiler should not have access to the sources of the rtl. => Yet strangely, in your error it says "recompiling" and does not give an error that it did not find the source. Either the error is just filtered out, or there is a further issue... If you have any setup that compiles fpc units from within the Lazarus IDE => you will have trouble (there are cases / stuff that can be done, but it needs some more understanding, so lets just say: don't compile fpc sources from lazarus) If you can  get the error with a small(er) project (e.g. maybe just "uses clocale") and you compile it with     -va If inside the IDE, the IDE will hide many messages, and you need to do "copy all". So maybe do that from outside the IDE. It will tell you every file the compiler tried to access, and if it found it or not. So, if you know - what fpc you are using, - and where that fpc should have its ppu, - and that the source files should not be found by fpc then you can go through that list, and check for what happens for clocale.* (and units right before). Its a lot of work (and I wont be able to do it for you, even if you upload the entire log / sorry limited time). You will also see what fpc.cfg it accesses, and you can check inside of them what search path are used, and if they match where that fpc should be installed. The upside, after that, you have a better understanding how all of this works. @Martin_fr, I would never even think of asking you to go through my logs that is way too much work and will take a lot of time. I was trying lot's of things and under Project-->Project Options-->Compiler options I saw a button that said 'test' so I went and clicked it. The attached screenshot tell's me what my problem is? You know whoever was responsible for the initial thinking and planning of the Lazarus IDE they were most certainly not ordinary folk. I remain humbled and in awe once again. I wonder who wrote the code for that 'test' button? I thank you once again for all the guidance and help. What do you think about that screenshot? ---------------------------------------------------------------------- Aruna · 2025-04-11 01:30 Hello @paweld and @Martin_fr, I’ve got some good news to share. I finally figured out the root cause of the issue and managed to fix everything, so things are back to normal. I thought it would be helpful to document the steps here. For others, but also because I’ll probably forget what I did later! Cause: I had manually compiled FPC, and it ended up being installed under /usr/local/lib/fpc/3.2.2. That was the reason behind the “There are several Free Pascal compilers in your path” error. Solution: 1.    sudo rm -rf /usr/local/lib/fpc/3.2.2 2.    make bigide And that’s it—problem solved! All the errors are gone, Lazarus IDE now starts up perfectly without any hiccups. I had no choice but to rebuild the IDE anyway, since I needed to test a custom component. 🙂 ---------------------------------------------------------------------- paweld · 2025-04-11 04:52 Quote from: Aruna"make bigideThis build mode helps you get Lazarus up and running, but note that it does not include any additionally installed components. Next rebuilding Lazarus from Menu > Tools > Build Lazarus with Profile: ... will reattach all the components you previously installed, and you may again have problems with yours test components. ---------------------------------------------------------------------- Aruna · 2025-04-11 21:34 Quote from: paweld on April 11, 2025, 06:52:37 amQuote from: Aruna"make bigideThis build mode helps you get Lazarus up and running, but note that it does not include any additionally installed components. Next rebuilding Lazarus from Menu > Tools > Build Lazarus with Profile: ... will reattach all the components you previously installed, and you may again have problems with yours test components. Hi! Yes, you were right. I learned that the hard way! But this time, I also managed to find a fix. The fix I found was to delete or remove all the package files that might be causing issues, and then rebuild the IDE from scratch. I'm thinking, maybe when I have a bit of time, I’ll write a little how-to guide — something like “how to break the Lazarus IDE and how to fix it again”! 😄 I do have a question though: When you're adding a custom control for the first time, Lazarus lets you specify icons in 24x24, 26x36, and 48x48 sizes — and I tested this, it works great. But let’s say later on, after the component is already installed, I want to change the icon… how on earth do you do that? I’ve tried everything and so far no luck. 😅 ---------------------------------------------------------------------- TRon · 2025-04-11 21:48 Quote from: Aruna on April 11, 2025, 11:34:30 pmI'm thinking, maybe when I have a bit of time, I’ll write a little how-to guide — something like “how to break the Lazarus IDE and how to fix it again”! 😄 By far the easiest solution to 'fix' the IDE in case having installed a component that breaks things is by reverting back to the backup version of the executable (which should be generated automatically). A clean startup can be done by either removing/clearing the configuration directory (pcp) or set it to another directory (which is empty) ---------------------------------------------------------------------- Aruna · 2025-04-11 22:04 Quote from: TRon on April 11, 2025, 11:48:03 pmQuote from: Aruna on April 11, 2025, 11:34:30 pmI'm thinking, maybe when I have a bit of time, I’ll write a little how-to guide — something like “how to break the Lazarus IDE and how to fix it again”! 😄 By far the easiest solution to 'fix' the IDE in case having installed a component that breaks things is by reverting back to the backup version of the executable (which should be generated automatically). A clean startup can be done by either removing/clearing the configuration directory (pcp) or set it to another directory (which is empty) Agreed @Tron the thing is this... if 'I' went and renamed the package file and many other things one does not normally to do in the quest for knowledge is it not entirely possible another person may do exactly the same and get stuck? I just do not want them to spend months searching for a fix like 'I' did is all I am thinking of taking RC4 for a test drive so what should I do and what should I not to make each lazIDE co-exist peacefully? ---------------------------------------------------------------------- TRon · 2025-04-12 02:46 Quote from: Aruna on April 12, 2025, 12:04:20 amAgreed @Tron the thing is this... if 'I' went and renamed the package file and many other things one does not normally to do in the quest for knowledge is it not entirely possible another person may do exactly the same and get stuck? True, but if you follow those unwritten rules you should be able to fix any such issue in a jiffy. QuoteI just do not want them to spend months searching for a fix like 'I' did is all Fair enough. QuoteI am thinking of taking RC4 for a test drive so what should I do and what should I not to make each lazIDE co-exist peacefully? For Lazarus things are quite simple, do: 1. Install in user space 2. Make sure each Lazarus installation uses its own configuration directory Don't: 1. Install system wide or at the usual location that a package-manager or installer proposes by default. 2. Use a single configuration directory for all your Lazarus installations The difficult part, if you consider it as such, is correctly installing and configuring the FPC compiler (or multiple versions that peacefully life next to each other) and which can be done using different solutions (one not necessarily smarter and/or better than the other though I do have my own personal preference). FPCUpdeluxe for instance, solves the latter by providing each Lazarus installation with its own independent FPC compiler (which I personally consider a waste of space and defeats the intention of the compiler developers). If you stick by those rules you should not encounter any issues whatsoever. At least I have not encountered any of the issues that are regularly mentioned on the forums simply by sticking to those simple (unwritten) rules. And fwiw, I have every FPC compiler that works on/for Linux installed (3.2.0 and up) (*), have a couple of dozen cross-compilers (it stacks up very quickly with different compiler versions) and a handful of Lazarus IDE's). Note that this does not include platform specific issues such as libc (linux) and xcode-tools (macos) for example. (*) the same works for Windows and/or MacOS. ---------------------------------------------------------------------- Aruna · 2025-04-12 18:33 Quote from: TRon on April 12, 2025, 04:46:35 amQuote from: Aruna on April 12, 2025, 12:04:20 amAgreed @Tron the thing is this... if 'I' went and renamed the package file and many other things one does not normally to do in the quest for knowledge is it not entirely possible another person may do exactly the same and get stuck? True, but if you follow those unwritten rules you should be able to fix any such issue in a jiffy. But getting to that point takes a serious time investment, as you well know. Just built Lazarus 4.0 RC3 from source, and instead of diving in and breaking things like I usually do, I followed your advice and launched it with: 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 ./lazarus --pcp=/home/aruna/Laz4RC3/lazarus Boom-shaka-laka — it fired up perfectly, no hiccups, no complaints! I am tempted to start trying out every single lazarus IDE there ever was 1. So what I did is download the source from sourceforge 2. Unzipped/extracted to a folder under my home directory 3. Did not build a new fpc. Decided to go with what is already there. 4. Ran make bigide 5  launched using ./lazarus --pcp=/home/aruna/Laz4RC3/lazarus[/ I am still trying very hard to reason why I never used --pcp= until now? In a way it is a good thing to have gone through that kind of grief, you learn and you learn the internals. I still am going to document what I did when I was first trying to write my own custom component as I did some things that to me seemed perfectly reasonable at that time but effectively broke lazarus so may help others someday and will help keep me sane when ever I go back and read it I think I used the same name for my package and the unit and that was fun trying to figure out what went south ---------------------------------------------------------------------- Martin_fr · 2025-04-12 18:44 https://wiki.freepascal.org/Multiple_Lazarus#Using_lazarus.cfg_file ---------------------------------------------------------------------- Aruna · 2025-04-12 19:21 Quote from: Martin_fr on April 12, 2025, 08:44:30 pmhttps://wiki.freepascal.org/Multiple_Lazarus#Using_lazarus.cfg_file Thank you @Martin_fr. I just went through the history of that article and was very surprised to see that is your work? You started that..  and way back in August of 2013. Wow! 21:48, 28 August 2013‎ Martin talk contribs‎ 8,821 bytes +239‎ →‎Windows - Using the installer ---------------------------------------------------------------------- Aruna · 2025-04-12 19:23 My apologies that screenshot was attached by mistake and I do not know how to remove it? Maybe a forum admin can? ---------------------------------------------------------------------- TRon · 2025-04-12 19:29 Quote from: Martin_fr on April 12, 2025, 08:44:30 pmhttps://wiki.freepascal.org/Multiple_Lazarus#Using_lazarus.cfg_file With the small warning that I don't know with which exact version the lazarus.cfg file support was introduced so that for older versions that don't support it you have to fall-back to making either a script or a shortcut that passes the pcp option. On the other hand there are probably not that many users that use or require such an old version. It is advisable to use the latest version, if only for all the bugs that where fixed. ---------------------------------------------------------------------- TRon · 2025-04-12 20:06 Quote from: Aruna on April 12, 2025, 09:23:47 pmMy apologies that screenshot was attached by mistake and I do not know how to remove it? Maybe a forum admin can? Login, modify your post then look at the bottom at attachments section. Each individual attachment in a post can be removed by pressing a button (the same way you can add additional attachments). When done, save the post. The attachment should then be gone. ---------------------------------------------------------------------- Martin_fr · 2025-04-12 20:15 Quote from: Aruna on April 12, 2025, 09:23:47 pmMy apologies that screenshot was attached by mistake and I do not know how to remove it? Maybe a forum admin can? Done, when you edit your message, and click attachments, then the image is listed with a checkbox. Uncheck, and save. ---------------------------------------------------------------------- Martin_fr · 2025-04-12 20:19 Quote from: TRon on April 12, 2025, 09:29:36 pmWith the small warning that I don't know with which exact version the lazarus.cfg file support was introduced so that for older versions that don't support it you have to fall-back to making either a script or a shortcut that passes the pcp option. Probably (i.e. if I made no mistake looking it up) its was added for Lazarus 1.2. ---------------------------------------------------------------------- paweld · 2025-04-13 04:44 Quote from: Aruna on April 11, 2025, 11:34:30 pmI do have a question though: When you're adding a custom control for the first time, Lazarus lets you specify icons in 24x24, 26x36, and 48x48 sizes — and I tested this, it works great. But let’s say later on, after the component is already installed, I want to change the icon… how on earth do you do that? I’ve tried everything and so far no luck. 😅 I've never encountered the ability to choose the size, can you show it?