Recent

Author Topic: Unable to find file "datetimepicker.pas" -- SOLVED -- Sort of.  (Read 4244 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: 2534
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: 101
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: 674
  • 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: 1221
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: 2534
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: 101
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: 2534
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)  :)

 

TinyPortal © 2005-2018