Recent

Author Topic: Fpcupdeluxe  (Read 1009179 times)

ydd

  • Jr. Member
  • **
  • Posts: 82
Re: Fpcupdeluxe
« Reply #2250 on: June 27, 2023, 04:42:59 pm »
When I setup shared folders in Virtualbox for building FPC and Lazarus I had to enable symlink support for shared folders in Virtualbox:
https://forum.lazarus.freepascal.org/index.php/topic,34645.msg407786.html#msg407786
In my case running Virtualbox on a Linux host with a Linux guest.

I made as you advised, but still getting errors, I attached log.

I see "Permission denied" errors, but I do not know to which file. And I see that many files are created in destination despite error (1570 folders, 22074 files, total 658 Mb) - so I assume it has write permissions.

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1877
Re: Fpcupdeluxe
« Reply #2251 on: June 27, 2023, 04:50:13 pm »
The error is clear. You have a permission error.
My advice.
Delete the whole "/home/yd/SHARE/LinuxLazarus/230626_Trunk" directory.
Create the directory again as the same user that runs fpcupdeluxe.
Run fpcupdeluxe as this user.

ydd

  • Jr. Member
  • **
  • Posts: 82
Re: Fpcupdeluxe
« Reply #2252 on: June 27, 2023, 04:57:50 pm »
The error is clear. You have a permission error.
My advice.
Delete the whole "/home/yd/SHARE/LinuxLazarus/230626_Trunk" directory.
Create the directory again as the same user that runs fpcupdeluxe.
Run fpcupdeluxe as this user.

it does not help - result is same.
But for example - fpcupdeluxe does not handle "Permission denied" error and continues to execute.

How I can see which command is causing this error and to try to fix it?

af0815

  • Hero Member
  • *****
  • Posts: 1409
Re: Fpcupdeluxe
« Reply #2253 on: June 27, 2023, 09:24:06 pm »
I think, it is not a good idea to use a shared folder for fpc/lazarus nor for projects. I see no goal for this. And if you have to enable symlink support for it, you will get troubles. This is not a normal enviroment.

A permission denied should not raise if the path are well designed. And if the other side block a part for AV checks you get also permission denied or missing files.
regards
Andreas

ydd

  • Jr. Member
  • **
  • Posts: 82
Re: Fpcupdeluxe
« Reply #2254 on: June 27, 2023, 10:55:27 pm »
I think, it is not a good idea to use a shared folder for fpc/lazarus nor for projects. I see no goal for this. And if you have to enable symlink support for it, you will get troubles. This is not a normal enviroment.
A permission denied should not raise if the path are well designed. And if the other side block a part for AV checks you get also permission denied or missing files.

goal is very obvious - I have many virtual machines and I need to work with different versions of Lazarus. One installation - uses about 1.8 Gb of space and takes many time. I will save many gigabytes of space!

I work with Virtual Box Shared Folders for the very long time - and no errors. I believe there is some special case which should be easy to fix and all will work perfectly.

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Fpcupdeluxe
« Reply #2255 on: June 28, 2023, 12:30:19 am »
Perhaps I misunderstood something with regards to your 'problem' but the following post

I use VirtualBox on Windows and virtual machine with Linux.
Some time ago I was able to install Lazarus stable into folder inside of virtual machine.
Now I want to use "Shared Folders" feature of VirtualBox and install Lazarus into folder which is shared between Windows and Linux VM. Such way I can share same Lazarus installation between virtual machines. See settings for Shared Folder in screenshot.

combined with this post

goal is very obvious - I have many virtual machines and I need to work with different versions of Lazarus. One installation - uses about 1.8 Gb of space and takes many time. I will save many gigabytes of space!

Are you aware that those two quotes are a contradictio in terminis ?

No matter how you turn/twist it, Windows need a Windows version of Lazarus and Linux the Linux version of Lazarus etc. The whole IDE needs to be compiled for both (and/or all other) platforms (and so will all your Free Pascal units).

So when you say you want to save space, in reality your solution saved 0 bytes. I would even go beyond that and say that it will occupy even more bytes because of the different configurations that Lazarus would require you to maintain in such a case.

Even stronger, you'll introduce issues that are never meant to be solved (or are provided) by Lazarus as the use case is non-existent. Project files that get torn between different platforms and same for the IDE configuration/setup. That is not even considering the difference in file-systems.

That is why 'they' invented cross-compiling. That way you can do with a single installation of Lazarus and install cross-compilers to be able to target the other platforms. Ofc. the results can be put on a shared directory so that you can check/test/run the generated executable (directly) on your VM.

And yes, a full cross-platform installation requires several GB's (in my case for FPC alone it is several tens of GB's, then a couple of dozen GB's for Lazarus and a couple of GB's for all the binutils and system libraries that are required for cross-compiling). It is a small price to pay, especially when the price/GB is quite low.

If I've understood the thread correctly then I strongly believe you are trying to solve an issue that can not be solved the way you want to solve and even if you do will gain exactly nothing (at least not with regards to occupied disk space)
« Last Edit: June 28, 2023, 12:40:55 am by TRon »
Today is tomorrow's yesterday.

ydd

  • Jr. Member
  • **
  • Posts: 82
Re: Fpcupdeluxe
« Reply #2256 on: June 28, 2023, 12:50:26 am »
No matter how you turn/twist it, Windows need a Windows version of Lazarus and Linux the Linux version of Lazarus etc. The whole IDE needs to be compiled for both (and/or all other) platforms (and so will all your Free Pascal units).

not quite right
to simplify - I want to install Linux version of Lazarus in Linux VM, but to store it outside of VM. In order to achieve this I want to use "Shared Folders" feature. So the whole folder with Lazarus installation will be store in Windows file system and mapped to Linux VM. Inside VM mapped folder behaves same as other folders. And I use such for long time already.
Such way I can share the same installation between different VMs - so I can map the same folder to all other VMs and just start Lazarus from mapped folder. No need for installation, configuration and use of 1.8 Gb of space in each VM.
If I need to upgrade Lazarus - I need to do it only once. No need to upgrade in each VM.
« Last Edit: June 28, 2023, 01:02:31 am by ydd »

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Fpcupdeluxe
« Reply #2257 on: June 28, 2023, 01:53:08 am »
not quite right
In that case, I misunderstood (though I still can not see the use case but I'll play along).

Seeing that you mention to run into access errors have you considered attaching an additional HD (virtual disk) to your VM that is able to map the same as to your final shared directory and use that to temporary install Lazarus to with FPCDeluxe ? After you are done installing you can literally copy out all the required contents from the temporary HD (just place it anywhere, perhaps zip/tar it) then remove the attached HD, setup your share and copy the Lazarus installation that you backed up to it ?

edit: actually you can do without FPCDeluxe but that would require you to manually setup Free Pascal and Lazarus (Free Pascal being the hard part there because you need to manually configure the fpc.cfg file and make sure to have FPC always use that particular fpc.cfg file). For instance FPC can run from a USB flash drive from any machine (that allows USB to be mounted) without issues provided that you have configured things correctly.

Do you run Lazarus at the different VM's with a 'global' configuration for all machines or does each machine uses it's own Lazarus configuration directory ? Same question for Free Pascal ?
« Last Edit: June 28, 2023, 02:00:33 am by TRon »
Today is tomorrow's yesterday.

WayneSherman

  • Sr. Member
  • ****
  • Posts: 257
Re: Fpcupdeluxe
« Reply #2258 on: June 28, 2023, 02:01:50 am »
The error is clear. You have a permission error.
My advice.
Delete the whole "/home/yd/SHARE/LinuxLazarus/230626_Trunk" directory.
Create the directory again as the same user that runs fpcupdeluxe.
Run fpcupdeluxe as this user.
it does not help - result is same.

In a VirtualBox Linux guest, the shared folder is mounted.  If the mount command does not setup the correct user and permissions, it can cause issues.  I had to disable automount and specifically set the mount options in /etc/fstab.  This worked for my setup:

Quote
When setting up a "Shared Folder" for the VM, do not select the automount checkbox.  Inside the VM add a mount entry to /etc/fstab

your_shared_folder_name  /home/your_user/your_shared_folder_name   vboxsf   uid=1000,gid=1000  0   0
(my user and group id are 1000, but yours may be different)

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Fpcupdeluxe
« Reply #2259 on: June 28, 2023, 02:29:44 am »
@WayneSherman:
I hadn't thought of that. That si a good suggestion. Is that something specific to VirtualBox shares (that you know of) ?
Today is tomorrow's yesterday.

ydd

  • Jr. Member
  • **
  • Posts: 82
Re: Fpcupdeluxe
« Reply #2260 on: June 28, 2023, 02:32:09 am »
Seeing that you mention to run into access errors have you considered attaching an additional HD?

I have similar idea but easier to implement - remove SHARE, create folder SHARE - install in there, rename, connect SHARE, copy from renamed folder to SHARE - haven't tried yet

Do you run Lazarus at the different VM's with a 'global' configuration for all machines or does each machine uses it's own Lazarus configuration directory ? Same question for Free Pascal ?

I will use same configuration - subfolder "config_lazarus" in Lazarus installation folder

ydd

  • Jr. Member
  • **
  • Posts: 82
Re: Fpcupdeluxe
« Reply #2261 on: June 28, 2023, 02:34:57 am »
In a VirtualBox Linux guest, the shared folder is mounted.  If the mount command does not setup the correct user and permissions, it can cause issues.  I had to disable automount and specifically set the mount options in /etc/fstab.  This worked for my setup:

I already replied you (Reply #2250) that I've tried your advice - still errors

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Fpcupdeluxe
« Reply #2262 on: June 28, 2023, 02:39:27 am »
I have similar idea but easier to implement - remove SHARE, create folder SHARE - install in there, rename, connect SHARE, copy from renamed folder to SHARE - haven't tried yet
Ah yes, not crossed my mind. Indeed even simpler.

I will use same configuration - subfolder "config_lazarus" in Lazarus installation folder
Then in theory you should not have issues with that provided that inside your VM you start Lazarus with the pcp option pointing to that (correct) configuration directory. Martin_fr mentioned that there is a config file in which you can set that by default (if I remember correctly in the Lazarus directory). I haven't switched to that myself yet as that possibility did not exist yet when i installed multiple versions of Lazarus so I always invoke with --pcp)

edit: found the reference at https://wiki.lazarus.freepascal.org/Multiple_Lazarus#Using_lazarus.cfg_file
« Last Edit: June 28, 2023, 02:42:24 am by TRon »
Today is tomorrow's yesterday.

ydd

  • Jr. Member
  • **
  • Posts: 82
Re: Fpcupdeluxe
« Reply #2263 on: June 28, 2023, 02:43:27 am »
Then in theory you should not have issues with that provided that inside your VM you start Lazarus with the pcp option pointing to that (correct) configuration directory. Martin_fr mentioned that there is a config file in which you can set that by default (if I remember correctly in the Lazarus directory). I haven't switched to that myself yet as that possibility did not exist yet when i installed multiple versions of Lazarus so I always invoke with --pcp)

when you install Lazarus using Fpcupdeluxe - in the end it creates shortcut on Desktop to start installed Lazarus instance - I always use this shortcut.

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Fpcupdeluxe
« Reply #2264 on: June 28, 2023, 02:47:36 am »
when you install Lazarus using Fpcupdeluxe - in the end it creates shortcut on Desktop to start installed Lazarus instance - I always use this shortcut.
I build everything manually so have no idea if FPCDeluxe automatically adds the --pcp option to either the lazarus.cfg file or the shortcut. Just make sure it does one of these  :)
Today is tomorrow's yesterday.

 

TinyPortal © 2005-2018