Recent

Author Topic: Unable to find file "datetimepicker.pas" -- SOLVED -- Sort of.  (Read 7368 times)

dormitionskete

  • Newbie
  • Posts: 1
Unable to find file "datetimepicker.pas" -- SOLVED -- Sort of.
« on: January 10, 2024, 11:45:59 pm »
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

  • New Member
  • *
  • Posts: 49
Re: Unable to find file "datetimepicker.pas" -- SOLVED -- Sort of.
« Reply #1 on: January 13, 2024, 11:32:05 am »
[using the translator]


Thank you very much, this helps me a lot
Lazarus 3.0 / LAMW 0.8.6.4 - Gradle 8.5 - Jdk 21 - Ndk 21e - Windows 11

TRon

  • Hero Member
  • *****
  • Posts: 2915
Re: Unable to find file "datetimepicker.pas" -- SOLVED -- Sort of.
« Reply #2 on: January 13, 2024, 10:48:24 pm »
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.
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)

Quote
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.
It already has been addressed.
« Last Edit: January 13, 2024, 10:53:56 pm by TRon »

msintle

  • Full Member
  • ***
  • Posts: 116
Re: Unable to find file "datetimepicker.pas" -- SOLVED -- Sort of.
« Reply #3 on: February 05, 2024, 01:57:34 pm »
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.
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)

Quote
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.
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

  • Hero Member
  • *****
  • Posts: 682
  • Tweaking4All.com
    • Tweaking4All
Re: Unable to find file "datetimepicker.pas" -- SOLVED -- Sort of.
« Reply #4 on: February 06, 2024, 01:30:24 pm »
+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

  • New Member
  • *
  • Posts: 35
Re: Unable to find file "datetimepicker.pas" -- SOLVED -- Sort of.
« Reply #5 on: March 06, 2024, 12:11:13 pm »
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

  • Hero Member
  • *****
  • Posts: 1287
Re: Unable to find file "datetimepicker.pas" -- SOLVED -- Sort of.
« Reply #6 on: March 06, 2024, 12:37:53 pm »
Therefore, 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

  • Hero Member
  • *****
  • Posts: 2915
Re: Unable to find file "datetimepicker.pas" -- SOLVED -- Sort of.
« Reply #7 on: March 06, 2024, 02:27:08 pm »
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.
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 ?
« Last Edit: March 06, 2024, 02:35:36 pm by TRon »

msintle

  • Full Member
  • ***
  • Posts: 116
Re: Unable to find file "datetimepicker.pas" -- SOLVED -- Sort of.
« Reply #8 on: March 30, 2024, 06:49:58 pm »
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

  • Hero Member
  • *****
  • Posts: 2915
Re: Unable to find file "datetimepicker.pas" -- SOLVED -- Sort of.
« Reply #9 on: March 31, 2024, 07:21:02 am »
Yes, as astounding as it is, this still does affect 3.2 release.
Bummer.

Quote
It really is terrible optics for anyone looking into Lazarus for the first time.
I do not disagree with that point of view.

Quote
FPCUPDLX 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

  • Full Member
  • ***
  • Posts: 116
Re: Unable to find file "datetimepicker.pas" -- SOLVED -- Sort of.
« Reply #10 on: June 19, 2024, 02:52:47 am »
Has anybody been able to check whether this works on the new 3.4 release "out of the box"?

msintle

  • Full Member
  • ***
  • Posts: 116
Re: Unable to find file "datetimepicker.pas" -- SOLVED -- Sort of.
« Reply #11 on: July 03, 2024, 02:10:43 am »
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

  • Sr. Member
  • ****
  • Posts: 332
  • From C# to Lazarus
Re: Unable to find file "datetimepicker.pas" -- SOLVED -- Sort of.
« Reply #12 on: July 09, 2024, 05:14:36 pm »
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->
Regards,
Dzandaa

msintle

  • Full Member
  • ***
  • Posts: 116
Re: Unable to find file "datetimepicker.pas" -- SOLVED -- Sort of.
« Reply #13 on: July 09, 2024, 07:31:08 pm »
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.
« Last Edit: July 09, 2024, 08:13:57 pm by msintle »

Dzandaa

  • Sr. Member
  • ****
  • Posts: 332
  • From C# to Lazarus
Re: Unable to find file "datetimepicker.pas" -- SOLVED -- Sort of.
« Reply #14 on: July 10, 2024, 09:47:11 am »
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)

Quote
rm -Rf .lazarus/
or
mv .lazarus lazarus.old


4) I install :

Quote
fpc-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:

Quote
sudo 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->


Regards,
Dzandaa

 

TinyPortal © 2005-2018