Recent

Author Topic: Fpcupdeluxe  (Read 1009183 times)

af0815

  • Hero Member
  • *****
  • Posts: 1409
Re: Fpcupdeluxe
« Reply #2265 on: June 28, 2023, 06:25:22 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  :)
fpcupdeluxe build the desktopentry with the actual --pcp option every run you buld Lazarus. This is the reason, fpcupdeluxe write to you - use only this link. This is one of the "magic" of fpcupdeluxe.
regards
Andreas

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Fpcupdeluxe
« Reply #2266 on: June 28, 2023, 02:08:48 pm »
fpcupdeluxe build the desktopentry with the actual --pcp option every run you buld Lazarus. This is the reason, fpcupdeluxe write to you - use only this link. This is one of the "magic" of fpcupdeluxe.
[/quote]
Thank you for verification of that information.
Today is tomorrow's yesterday.

ydd

  • Jr. Member
  • **
  • Posts: 82
Re: Fpcupdeluxe
« Reply #2267 on: June 28, 2023, 11:30:23 pm »
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

I processed as described and was able to install Lazarus into local folder, copy it to shared folder and run from it wo problems. But during copy I got errors. I made how WayneSherman adviced (https://forum.lazarus.freepascal.org/index.php/topic,34645.msg407786.html#msg407786) and problems were solved.

Problems:
- VM size increased in 2.7 Gb
- in order to update - I need to do reverse procedure, update and copy back again

Would be very beneficial for Fpcupdeluxe to install into Shared Folder by default
« Last Edit: June 28, 2023, 11:40:48 pm by ydd »

WayneSherman

  • Sr. Member
  • ****
  • Posts: 257
Re: Fpcupdeluxe
« Reply #2268 on: June 29, 2023, 12:25:42 am »
Quote from: ydd
...executing command "git config --global --add safe.directory /home/yd/SHARE/LinuxLazarus/230626_Stable/lazarus" fixes error
...I see "Permission denied" errors, but I do not know to which file
...But during copy I got errors.

Would be very beneficial for Fpcupdeluxe to install into Shared Folder by default

I just tested my setup which is running VirtualBox 6.1.40 on MX Linux (debian 10/buster) and Xubuntu 20.04 as a guest VM.  It works without problems using Fpcupdeluxe and building FPC and Lazarus in a VirtualBox shared folder (tested both stable/stable and trunk/trunk).

If all the folder and file permissions are set to your user as owner and group, you should not need to use git "safe.directory".  Do you still need to use "safe.directory" to avoid errors?  If so I think you still have a permissions problem.

ydd

  • Jr. Member
  • **
  • Posts: 82
Re: Fpcupdeluxe
« Reply #2269 on: June 29, 2023, 12:32:49 am »
I just tested my setup which is running VirtualBox 6.1.40 on MX Linux (debian 10/buster) and Xubuntu 20.04 as a guest VM

I run VirtualBox not on Linux, but on Windows. Do you have chance to test the same?

If all the folder and file permissions are set to your user as owner and group, you should not need to use git "safe.directory".  Do you still need to use "safe.directory" to avoid errors?  If so I think you still have a permissions problem.

I had permission related errors during install, but not related with "safe.directory".

Fact that I was able to install to local folder, then copy to shared folder and run without any type of errors - means that issues are related with installer.

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Fpcupdeluxe
« Reply #2270 on: June 29, 2023, 04:10:48 am »
I processed as described and was able to install Lazarus into local folder, copy it to shared folder and run from it wo problems.
Ah, thank you for posting your results. That is good to know that that part at least worked as intended for you.

Quote
But during copy I got errors. I made how WayneSherman adviced (https://forum.lazarus.freepascal.org/index.php/topic,34645.msg407786.html#msg407786) and problems were solved.
Also thank you for sharing that information. I'm not familiar enough with VirtualBox shared folders so I've learned something  :)

Quote
- VM size increased in 2.7 Gb
Uhm, yeah. I don't believe that VirtualBox dynamic virtual HD automatically shrinks when you remove content. As far as my knowledge goes it only frees up the occupied space so that it can be re-used.

Quote
- in order to update - I need to do reverse procedure, update and copy back again
Do realize that FPCDeluxe does a complete checkout and if necessary also downloads all necessary (missing) tools. Perhaps FPCDeluxe can be persuaded to re-use some of things that aren't really necessary to update ?

If it can not be done directly on the share (that is big /if/) then you could perhaps opt for storing the git repository on another attached HD. It saves at least a couple of tens to hundreds of MB's.

Quote
Would be very beneficial for Fpcupdeluxe to install into Shared Folder by default
Unfortunately I'm (also) (very) unfamiliar with FPCDeluxe so am afraid I can't be of assistance there (at least not in a way that is actually helpful).

Edit:
I found this relevant question on SO perhaps it might be of use ? (I am on Linux myself so can't test myself).

After reading Wayne's older post also note that both Free Pascal and Lazarus do not require any symlinks (they simply do not depend on it, it is just convenience). The "installer" (FPCDeluxe) might perhaps make use of it but it isn't really necessary (if you don't want to).
« Last Edit: June 29, 2023, 05:05:08 am by TRon »
Today is tomorrow's yesterday.

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1877
Re: Fpcupdeluxe
« Reply #2271 on: June 29, 2023, 09:02:14 am »
About size.
Fpcupdeluxe does a shallow checkout for everything that is non-changing.
Only fixes and trunk sources will be checkout with the full commit history.

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Fpcupdeluxe
« Reply #2272 on: June 29, 2023, 10:29:59 am »
Thank you DonAlfredo.l That is good to know though in that case it will not help TS pretty much as he seems to focus on trunk (if not mistaken)

@ydd:
How much memory you have on your Windows host ? I do all my builds on ramdisk and only "copy out" whatever I require. Ofc. you would have to consider the memory usage for VirtualBox and the Linux VM itself as well.
Today is tomorrow's yesterday.

ydd

  • Jr. Member
  • **
  • Posts: 82
Re: Fpcupdeluxe
« Reply #2273 on: June 29, 2023, 03:10:29 pm »
I found this relevant question on SO perhaps it might be of use ? (I am on Linux myself so can't test myself).

I read that topic. Here is screenshot how permissions are set for mapped shared folder
« Last Edit: June 29, 2023, 03:26:17 pm by ydd »

ydd

  • Jr. Member
  • **
  • Posts: 82
Re: Fpcupdeluxe
« Reply #2274 on: June 29, 2023, 03:25:47 pm »
After reading Wayne's older post also note that both Free Pascal and Lazarus do not require any symlinks (they simply do not depend on it, it is just convenience). The "installer" (FPCDeluxe) might perhaps make use of it but it isn't really necessary (if you don't want to).

here is list of all symlinks from directory were Lazarus is installed by Fpcupdeluxe (output of command: find -type l)
Quote
./fpc/units
./fpc/lib/fpc/3.3.1/lexyacc
./lazarus/lazarus.app/Contents/MacOS/lazarus
./lazarus/lazarus.app/Contents/Resources/startlazarus.app/Contents/MacOS/startlazarus
./lazarus/startlazarus.app/Contents/MacOS/startlazarus
./lazarus/components/chmhelp/lhelp/lhelp.app/Contents/MacOS/lhelp

How much memory you have on your Windows host ? I do all my builds on ramdisk and only "copy out" whatever I require. Ofc. you would have to consider the memory usage for VirtualBox and the Linux VM itself as well.

I have 128 Gb of RAM. At this time I do not need to use ramdisk. VM is configured to use 4 Gb, actual usage about 400 Mb.

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Fpcupdeluxe
« Reply #2275 on: June 29, 2023, 07:01:58 pm »
@ydd:
FPC trunk - one target platform (host), including (required) utils - 973.2 Mb
Lazarus trunk - one target (host), one widgetset (bigide GTK) - 1006.2 Mb

So, that's a bare minimum install of roughly 2 Gb, not including FPC help, not including binutils not including special builds such as debug or smart-linked or any other cross-platform related material. It does include the bare minimum FPC package and RTL sources (including FPC examples)

here is list of all symlinks from directory were Lazarus is installed by Fpcupdeluxe (output of command: find -type l)
My FPC directory has no link(s) whatsoever (you can ignore the lexyacc link unless you really make use of it but even then it could be solved differently). The Lazarus make-file however seem to have included the same MacOS symlinks on my (Linux) setup as you have shown. Beats me why ...


Quote
I have 128 Gb of RAM. At this time I do not need to use ramdisk. VM is configured to use 4 Gb, actual usage about 400 Mb.
It is not about needing.

It is about abusing it as a "physical" drive. I use it to checkout the sources, build FPC/Lazarus and install them there as well. After that is done I copy/move over what is required to run both as intended. For example there is no need to have the source for the compiler itself stored unless wanting to debug and/or modify the compiler itself. If you want to keep track of the git history then you can tarball it and untar it for the next iteration (if required). I do not update that often so I usually do a complete/full checkout for building trunk. For other version besides trunk/fixes I use the (official) released source-code or if able to find it a former tarball that I've created  :)
Today is tomorrow's yesterday.

ydd

  • Jr. Member
  • **
  • Posts: 82
Re: Fpcupdeluxe
« Reply #2276 on: June 29, 2023, 07:20:34 pm »
@ydd:
FPC trunk - one target platform (host), including (required) utils - 973.2 Mb
Lazarus trunk - one target (host), one widgetset (bigide GTK) - 1006.2 Mb

So, that's a bare minimum install of roughly 2 Gb

the problem for me here - that each VM will grow to this size. If I want to test stable & trunk - then size will be doubled.

Quote
I have 128 Gb of RAM. At this time I do not need to use ramdisk. VM is configured to use 4 Gb, actual usage about 400 Mb.
It is not about needing.

It is about abusing it as a "physical" drive. I use it to checkout the sources, build FPC/Lazarus and install them there as well. After that is done I copy/move over what is required to run both as intended. For example there is no need to have the source for the compiler itself stored unless wanting to debug and/or modify the compiler itself. If you want to keep track

we are in topic about Fpcupdeluxe - I assume that we are discussing way to install Lazarus using Fpcupdeluxe only
I believe that manual installation and manual cleaning - is other topic, not related to this one

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Fpcupdeluxe
« Reply #2277 on: June 29, 2023, 07:29:46 pm »
the problem for me here - that each VM will grow to this size. If I want to test stable & trunk - then size will be doubled.
Now you got me confused. Wasn't your whole point of storing/installing FPC and Lazarus on a shared folder to circumvent that ?

That is where the ram disk abuse comes into play. If you close the VM (where you build FPC/Lazarus) then the contents of the ramdisk is gone/emptied. You use it as an temporary storage device. Also better for your SSD  :) The size of your dynamic HD will not be touched /at all/ (that is unless fpcdeluxe installs dependencies for the host).

Quote
we are in topic about Fpcupdeluxe - I assume that we are discussing way to install Lazarus using Fpcupdeluxe only
I believe that manual installation and manual cleaning - is other topic, not related to this one
Are you saying that running FPC deluxe from a ramdrive, let it use the ramdrive as temporary storage location and installing FPC/Lazarus there as well is off-topic ? There is only one (additional) step that differs and that is after you are alll done with FPCDeluxe you copy/move over the results to your shared folder (also allowing you to ignore the symlinks if wanted)
« Last Edit: June 29, 2023, 07:32:17 pm by TRon »
Today is tomorrow's yesterday.

ydd

  • Jr. Member
  • **
  • Posts: 82
Re: Fpcupdeluxe
« Reply #2278 on: June 29, 2023, 08:10:48 pm »
the problem for me here - that each VM will grow to this size. If I want to test stable & trunk - then size will be doubled.
Now you got me confused. Wasn't your whole point of storing/installing FPC and Lazarus on a shared folder to circumvent that ?

yes, it is a problem for me - its why I started the discussion.
But I cannot install Lazarus using Fpcupdeluxe on shared folder.
Workaround solution with install to local folder/rename/move - too many problems - I need to update settings in VirtualBox and in Linux guest under root, restart virtual machine 2 times, copy files to & from. High chance to make error.
Also this will increase VM size and it will never decrease even if I delete folder where it is installed

Comparing with - start Fpcupdeluxe, press 1 button, close.

the problem for me here - that each VM will grow to this size. If I want to test stable & trunk - then size will be doubled.
That is where the ram disk abuse comes into play. If you close the VM (where you build FPC/Lazarus) then the contents of the ramdisk is gone/emptied.

do you suggest to create local folder for Lazarus installation using ram disk, in order to prevent VM to grow in size?
This is workaround to workaround.
All other problems will remain ..

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Fpcupdeluxe
« Reply #2279 on: June 29, 2023, 10:28:19 pm »
yes, it is a problem for me - its why I started the discussion.
Ok, good that you are able to clear that up for me as I thought I had perhaps misunderstood something during the discussion. Thank you for that.

Quote
But I cannot install Lazarus using Fpcupdeluxe on shared folder.
That much was also clear  :)

Do note that using FPCDeluxe on a shared folder that is created by a 3th party software is not really a concern of FPCDeluxe though I also believe that there might be a simple solution that solves your issues. As said, my knowledge on Virtual Box shared folders is next to none (I hardly ever use them) and have never heard/seen of your use-case before.

Quote
Workaround solution with install to local folder/rename/move - too many problems - I need to update settings in VirtualBox and in Linux guest under root, restart virtual machine 2 times, copy files to & from. High chance to make error.
Also this will increase VM size and it will never decrease even if I delete folder where it is installed
I am not sure why you need to take all those actions but it is also not relevant for your issue.

The dynamic growth without automatically shrinking after deletion is something I am familiar with and Virtual Box offers tools/extensions to 'resize' your virtual HD if you really want to (though I would advise against it as the risk of corruption can be very high, which in itself causes more harm than it solves). It also requires for you to take additional steps so adding more actions to try and solve 'the problem'.

Quote
Comparing with - start Fpcupdeluxe, press 1 button, close.
Give the VM you use to build FPC/Lazarus some extra memory and allocate that for a ram-disk (pretty much a standard exercise on Linux) and use that as a HD. Download FPCDeluxe to it, run FPCDeluxe with the "one button action" and take one additional step: copy the result that FPCDeluxe created to your shared folder.

Quote
do you suggest to create local folder for Lazarus installation using ram disk, in order to prevent VM to grow in size?
Not creating a local folder, mount an amount of ram as "HD" and literally use that as a HardDisk. If you want to create folders and what not then be my guest and pleasure your hearts desire but it is not needed. As written above run FPCDeluxe from it and store the result to that drive as well. FPCDeluxe let you choose/select where to want to install.

And yes because it is a disk made in ram it will not (at least should not) increase the size of your VM (with the catch that if FPCDeluxe somehow install dependencies for the OS then it will (still) grow).

Quote
This is workaround to workaround.
You are the one suggesting using a shared folder for your FPC/Lazarus installation. My only suggested workaround is to mount a ram-disk and copy the final results to your shared folder.

Quote
All other problems will remain ..
No, they will not. Not sure how I am able to convince you otherwise unless you try for yourself. Also here is a catch: if you have installed FPC/Lazarus in your shared folder using the 'old' methods, does it then work for you ? if yes then my suggested ramdisk workaround is able to provide the same.

You know what a normal use case is for Virtual Box in such situations ?

Add another VM, install something like FreeNAS and use that as a storage device. For every VM that you want to have access to FPC/Lazarus also fire up the FreeNAS Vm and (auto)mount the network shares where you have installed FPC/Lazarus.

I would even go one step further and create a build server VM that is also able to host the compiled results. Those are 'normal' use cases (not suggestion there is anything wrong with your use-case, it just sounds a bit odd for/to me).

But this topic is drifting further and further (in)to virtual Box and not FPCDeluxe.
« Last Edit: June 29, 2023, 10:41:15 pm by TRon »
Today is tomorrow's yesterday.

 

TinyPortal © 2005-2018