Unable to find file "datetimepicker.pas" -- SOLVED -- Sort of. lazarus / 3-General ---------------------------------------------------------------------- dormitionskete · 2024-01-10 22:45 Apparently, there seem to be many people who are getting the following error when you try to build Lazarus: Unable to find file "datetimepicker.pas" This appears to be a problem on both Linux and MacOS. It appears to be a file permissions problem.  When I changed the file permissions to "datetimepicker.pas", I got past that error, only to encounter another similar error.  So when I upgraded permissions to my entire Lazarus installation, it now builds. On MacOS, I did the following as root: sh-3.2# cd /Applications/Lazarus/ sh-3.2# pwd /Applications/Lazarus sh-3.2# chmod -R 777 * sh-3.2# This is obviously not the best way to fix it, but if the admin people will look into this more, this at least appears to be the problem, and a workaround for it. I hope this helps. ---------------------------------------------------------------------- marcos-ebm · 2024-01-13 10:32 [using the translator] Thank you very much, this helps me a lot ---------------------------------------------------------------------- TRon · 2024-01-13 21:48 Quote from: dormitionskete on January 10, 2024, 11:45:59 pmThis appears to be a problem on both Linux and MacOS. It appears to be a file permissions problem.  When I changed the file permissions to "datetimepicker.pas", I got past that error, only to encounter another similar error.  So when I upgraded permissions to my entire Lazarus installation, it now builds. Yes, it is a permission issue. But using chmod is indeed not the way to solve it. You have installed Lazarus/FPC into directory where you do not have enough rights to write in. Simply change the installation directory to something more suitable (and for which you do have enough rights). The way it imho should be fixed is that you create a directory for your installation, make a group that has (enough) access (rights) to that directory and assign yourself as a user to that group. Alternatively use FPCUpDeluxe and install FPC/Lazarus in your home directory. Having said that, I still don't grasp why datetimepicker should be recompiled on a Lazarus installation and when it does, that it doesn't automatically defer to the alternative location where Lazarus does have enough rights to write to (there is provision for that in Lazarus in case you install 3th party components) QuoteThis is obviously not the best way to fix it, but if the admin people will look into this more, this at least appears to be the problem, and a workaround for it. It already has been addressed. ---------------------------------------------------------------------- msintle · 2024-02-05 12:57 Quote from: TRon on January 13, 2024, 10:48:24 pmQuote from: dormitionskete on January 10, 2024, 11:45:59 pmThis appears to be a problem on both Linux and MacOS. It appears to be a file permissions problem.  When I changed the file permissions to "datetimepicker.pas", I got past that error, only to encounter another similar error.  So when I upgraded permissions to my entire Lazarus installation, it now builds. Yes, it is a permission issue. But using chmod is indeed not the way to solve it. You have installed Lazarus/FPC into directory where you do not have enough rights to write in. Simply change the installation directory to something more suitable (and for which you do have enough rights). The way it imho should be fixed is that you create a directory for your installation, make a group that has (enough) access (rights) to that directory and assign yourself as a user to that group. Alternatively use FPCUpDeluxe and install FPC/Lazarus in your home directory. Having said that, I still don't grasp why datetimepicker should be recompiled on a Lazarus installation and when it does, that it doesn't automatically defer to the alternative location where Lazarus does have enough rights to write to (there is provision for that in Lazarus in case you install 3th party components) QuoteThis is obviously not the best way to fix it, but if the admin people will look into this more, this at least appears to be the problem, and a workaround for it. It already has been addressed. Real glad to see this got noticed by more than just one person (namely, myself). The current "release" version of Lazarus as served from the project homepage is effectively useless because of this. Isn't it the responsibility of the installer to ensure that folder permissions are set correctly? To clarify, this matter wasn't even an issue until the latest 3.0 version of Lazarus. It didn't reproduce with the 2.2.6 release version, or any older versions across years, for example. ---------------------------------------------------------------------- Hansaplast · 2024-02-06 12:30 +1 seen it here as well when helping out my nephew who wanted to get started with Lazarus. I'm using trunk all the time so I had not seen this issue before. So its good to see it addressed in trunk, but isn't this a fundamental problem for those using the current release version? In other words: wouldn't it be a good idea for a new release version be uploaded so beginners do not get frustrated with Lazarus right away on their first attempt? ---------------------------------------------------------------------- Tomki · 2024-03-06 11:11 Wow thank you very much. I almost gave up on this topic. Regarding TRon's comment "You installed Lazarus/FPC into a directory where you do not have sufficient write permissions." - This is not the solution, because if you install Lazarus from the DMG file on macOS, you have no choice regarding the installation directory. It automatically ends up in the application folder. Meanwhile, I did the installation again by compiling the source code, which doesn't create a permissions issue. Therefore, it is still a miracle to me why only this one component “Datetimepicker” has this permission problem during the DMG installation?!?! Anyway, as long as dormitionskete's advice helps, that's fine with me! Thanks again! Thomas ---------------------------------------------------------------------- dseligo · 2024-03-06 11:37 Quote from: Tomki on March 06, 2024, 12:11:13 pmTherefore, it is still a miracle to me why only this one component “Datetimepicker” has this permission problem during the DMG installation?!?! I don't think it is only this component, but it is first component that gives error and stops compilation. ---------------------------------------------------------------------- TRon · 2024-03-06 13:27 Quote from: Tomki on March 06, 2024, 12:11:13 pmRegarding TRon's comment "You installed Lazarus/FPC into a directory where you do not have sufficient write permissions." - This is not the solution, because if you install Lazarus from the DMG file on macOS, you have no choice regarding the installation directory. It automatically ends up in the application folder. Yes, you are absolutely correct. The only other option to circumvent that is: do not use the dmg package of the release version to install but install Lazarus from source (again, into a location where you do have the rights to be able to create the package). So either use trunk/main or install (release version) from source. Those are currently the only two flavours that are available as an option in order to circumvent the issue. Do note afaik because I can't test/verify myself. But..is this (still) an issue that affects recent Lazarus 3.2 release ? ---------------------------------------------------------------------- msintle · 2024-03-30 17:49 Yes, as astounding as it is, this still does affect 3.2 release. It really is terrible optics for anyone looking into Lazarus for the first time. FPCUPDLX to the rescue! ---------------------------------------------------------------------- TRon · 2024-03-31 05:21 Quote from: msintle on March 30, 2024, 06:49:58 pmYes, as astounding as it is, this still does affect 3.2 release. Bummer. QuoteIt really is terrible optics for anyone looking into Lazarus for the first time. I do not disagree with that point of view. QuoteFPCUPDLX to the rescue! Or build Lazarus manually. At least then you have a chance to be Dexter instead of Dee Dee (each to its own though) ---------------------------------------------------------------------- msintle · 2024-06-19 00:52 Has anybody been able to check whether this works on the new 3.4 release "out of the box"? ---------------------------------------------------------------------- msintle · 2024-07-03 00:10 I am trying to test this, but my Lazarus is stuck on 2.2.6. I'm running macOS Apple Silicon. Uninstalled FPC, FPCSRC, and LAZ using UninstallPKG. Then downloaded latest macOS Apple Intel versions from the official site for 3.4, and reinstalled them in that order. How is it that when my Lazarus boots, it still shows 2.2.6 as its version number? That macOS setups don't have a proper uninstaller in the second half of the 21st century is mind blowing to me. But I also verified that /Applications is bereft of anything Lazarus related after cleaning with UninstallPKG. What might be going on here? ---------------------------------------------------------------------- Dzandaa · 2024-07-09 15:14 Hi, same problem with 3.4 on Mac OS My Solution: From terminal sudo chown -R youruser /Applications/Lazarus/ sudo chgrp -R staff /Applications/Lazarus/ Seems to work fine after that. B-> ---------------------------------------------------------------------- msintle · 2024-07-09 17:31 Interesting. So you do that when exactly? I did it after having installed 3.4 and it seemed to work, except now I get this error during IDE launch: Warning: file ide/version.inc not found Clicking Start IDE regardless doesn't make the error go away on the next boot, either. Edit: The loading splash now shows 3.4, but the About and the IDE menu bar still show 2.2.6. Also worth mentioning that after each uninstall I manually deleted /Applications/Lazarus. ---------------------------------------------------------------------- Dzandaa · 2024-07-10 07:47 Hi, @msintle: For a clean installation of Lazarus 3.4 on MacOS 1) I put the old Lazarus Application in the Trash and empty the trash. 2) I use the script included to remove all files related to Lazarus and FPC. (sudo) 3) Quoterm -Rf .lazarus/ or mv .lazarus lazarus.old 4) I install : Quotefpc-3.2.2.intelarm64-macosx.dmg fpc-src-3.2.2-20210709-macosx.dmg Lazarus-3.4-macosx-x86_64.pkg 5) In a terminal: Quotesudo chown -R youruser /Applications/Lazarus/ sudo chgrp -R staff /Applications/Lazarus/ Of course replace youruser by you real user (whoami) That worked with Mac OS 10.12.8 (Sierra) Good luck. B-> ---------------------------------------------------------------------- msintle · 2024-07-17 16:07 That has done it! Thank you very much. Looks like I was missing the .lazarus folder step only as of your last post. Also happy to reconfirm the datetimepicker.pas issue seems to be fully resolved! Many thanks to fpcupdlx for keeping us running in the meanwhile ---------------------------------------------------------------------- eenplus · 2024-08-28 20:14 This solution worked fine on Mac Sonoma 14.12 Thank you! /Dirk ---------------------------------------------------------------------- Photondreams · 2024-09-08 13:30 Confirmed working in 10.13.6 also. ---------------------------------------------------------------------- Cumberland · 2024-12-02 19:27 It's not solved here. I am incurring this problem with Laz 3.6 on Debian 12. Installing the Debian packages versus the Lazarus builds made no difference. I will try changing permissions and see if that helps. Edit - I also got the following message: "Warning: Recompiling DateTimePicker, checksum changed for /usr/share/lazarus/3.6.0/lcl/units/x86_64-linux/lclintf.ppu" ---------------------------------------------------------------------- Fabs_Muller · 2025-03-09 01:50 I was having problems with Laz 3.8 and Ubuntu 24. Tried to install Zeos Lib and got the unable to find datetimepicker.pas error. Done a couple of things and finally get rid of it. As some people report permission problems, I find out Laz dir in /usr/share/lazarus/3.8.0/ and confirmed it was owned by root, logically as it is under /usr/share but as I'm the sole user user of my machine I did a: sudo chown -R $USER:$USER /usr/share/lazarus/3.8.0/ and the problem is gone, installed zeoslib and recompiled Laz successfully. That's not too much safety but as I'm the sole user I will take the chances by now but as soon as I can, I'll try to migrate everything to /usr/local/share/ or to my home dir. I didn't know about this issue before, and I compiled a fresh new installation without too much attention where it was going like a default. WIll try this before I start to have many projects. ---------------------------------------------------------------------- cdbc · 2025-03-09 06:39 Hi Fabs_Muller QuoteWIll try this before I start to have many projects.You should have a look at 'FpcUpDeluxe', it does exactly what you want, namely install in your home-dir... You can find it HERE. Regards Benny