Recent

Author Topic: Fpcupdeluxe  (Read 818382 times)

BosseB

  • Sr. Member
  • ****
  • Posts: 468
Re: Fpcupdeluxe
« Reply #2205 on: April 12, 2023, 03:56:20 pm »
I have found a problem I have not seen before with a Lazarus 2.2.6-32bit on Windows x64 with cross installed for arm-linux.
Lazarus works fine AFAICT including building cross for RaspberryPi.

But when I minimize the running Lazarus and later want to return to it I cannot find the Lazarus icon on the taskbar, instead a plain white document symbol.. See attached image where Lazarus is marked in red.

Note that the icon displayed on the shortcut is normal as is the icon shown in Windows Explorer when I navigate to the folder holding the Lazarus executable.

What can cause this to happen? All other fpcupdeluxe installs (2.2.6-32 and 2.3.0) and Windows installer from Sourceforge (2.0.12 and 2.2.4) display the usual Lazarus panther face icon.
« Last Edit: April 12, 2023, 03:59:22 pm by BosseB »
--
Bo Berglund
Sweden

BosseB

  • Sr. Member
  • ****
  • Posts: 468
Re: Fpcupdeluxe
« Reply #2206 on: April 13, 2023, 09:53:57 pm »
Concerning fpcupdeluxe Rpi4:
What fpcupdeluxe should be used to install FPC 3.2.2/Lazarus 2.2.6 On an RPi4B-4GB running Raspbian Buster?
I see the following candidates on the download page:
  • fpcupdeluxe-arm-linux (I am testing this now via VNC...)
  • fpcupdeluxe-arm-linux-qt5 (Is this useful on RPi4?)
  • fpcupdeluxe-armv6hf-linux (Is this the one with floating point hw  support?)


UPDATE:
I selected the arm-linux version and used it on my RPi4B to install as above.
Worked fine and I do have a working Lazarus 2.2.6 with Fpc 3.2.2 there now!
« Last Edit: April 13, 2023, 11:36:34 pm by BosseB »
--
Bo Berglund
Sweden

thierrybo

  • Full Member
  • ***
  • Posts: 143
Re: Fpcupdeluxe
« Reply #2207 on: April 14, 2023, 11:06:06 pm »
I tried the latest stable lazarus tag 2.2.6 instead of the latest fixes branch and I bump into this:

Quote
Repo tag and desired tag do not match. fpcupdeluxe: Start of compile error summary. fpcupdeluxe: ERROR: Lazarus Native Installer (CheckModule: Lazarus): The desired lazarus_2_2_6 is different from local repository-tag.

found many times here :

http://www.batterybutcher.com:8880/root/getinfohtml?ShowErrors=yes

BosseB

  • Sr. Member
  • ****
  • Posts: 468
Re: Fpcupdeluxe
« Reply #2208 on: April 15, 2023, 07:08:12 pm »
I had another RPi4 with some old Lazarus and FPC installed and I tried to get it going with fpcupdeluxe as well  to get 2.2.6 and 3.2.2 since it was a newer device and did not have the old installation overhead that which the other RPi4 had.

But I did not manage to get to the end of the install with all of my configurations etc done without Lazarus being unable to start...
It worked for a while but then after more OLPM installs it won't start, just shows the splash screen and disappears...

So in order to start from scratch I removed the SDcard and made another with the latest PiOS bullseye (the old install was buster).
Now I have a base RPi4 bullseye instead of the earlier buster but on the same hardware exactly.

So now I have actually checked the CPU and I found this to my astonishment:

Code: Text  [Select][+][-]
  1. $ uname -a
  2. Linux rpi4-dev2 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux

Since this was a different output from what I have seen before I did the same on the main RPi4 I have used so far:

Code: Text  [Select][+][-]
  1. $ uname -a
  2. Linux rpi4-gui 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l GNU/Linux

Notice that there are different CPU:s in use here! aarch64  vs. armv7l

Does this mean that I need to use  fpcupdeluxe-aarch64-linux rather than  fpcupdeluxe-arm-linux as I did on the other RPi4???


--
Bo Berglund
Sweden

rca

  • Jr. Member
  • **
  • Posts: 67
Re: Fpcupdeluxe
« Reply #2209 on: April 15, 2023, 08:09:49 pm »
...

So now I have actually checked the CPU and I found this to my astonishment:

Code: Text  [Select][+][-]
  1. $ uname -a
  2. Linux rpi4-dev2 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux

Since this was a different output from what I have seen before I did the same on the main RPi4 I have used so far:

Code: Text  [Select][+][-]
  1. $ uname -a
  2. Linux rpi4-gui 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l GNU/Linux

Notice that there are different CPU:s in use here! aarch64  vs. armv7l

Does this mean that I need to use  fpcupdeluxe-aarch64-linux rather than  fpcupdeluxe-arm-linux as I did on the other RPi4???

Raspberry Pi OS is Moving Linux Kernel to 6.1:
"Pi4 now defaults to preferring a 64-bit kernel when arm_64bit is not specified. You can use arm_64bit=0 to request the 32-bit kernel."

More details:
https://forums.raspberrypi.com/viewtopic.php?p=2088935#p2088935

RPi 4B full upgrade od 32-bit OS suddenly changes the kernel architecture to aarch64:
https://github.com/raspberrypi/linux/issues/5402

That is, since Kernel 6.1 with 32-bit OS: The system have run with a 64 bit kernel and 32 bit userspace.

Or if you want the 32 bit kernel, now you have to add inside config.tx "arm_64bit=0"

BosseB

  • Sr. Member
  • ****
  • Posts: 468
Re: Fpcupdeluxe
« Reply #2210 on: April 15, 2023, 09:00:29 pm »
Quote
Does this mean that I need to use  fpcupdeluxe-aarch64-linux rather than  fpcupdeluxe-arm-linux as I did on the other RPi4???

Raspberry Pi OS is Moving Linux Kernel to 6.1:
"Pi4 now defaults to preferring a 64-bit kernel when arm_64bit is not specified. You can use arm_64bit=0 to request the 32-bit kernel."

More details:
https://forums.raspberrypi.com/viewtopic.php?p=2088935#p2088935

RPi 4B full upgrade of 32-bit OS suddenly changes the kernel architecture to aarch64:
https://github.com/raspberrypi/linux/issues/5402

That is, since Kernel 6.1 with 32-bit OS: The system have run with a 64 bit kernel and 32 bit userspace.

Or if you want the 32 bit kernel, now you have to add inside config.txt "arm_64bit=0"
I really do not know what kernel I want, I have never needed to discuss or think about that...
What does the kernel change between 32 and 64 do?

And do you mean that I can switch the system from one to the other by adding the line above into config.txt?
I assume that there must be a reboot in between then, right?

What I did was this:
  • I updated my RaspberryPiImager to the latest version and started it
  • Then I just clicked the buttons to select the version of the PiOS installation (there was no mention of 23/64 bit here).
    I think I could choose from Lite (no GUI) and GUI style with suggested applications.. I need the GUI for my dev tools but not much more.
  • Then I got to pre-configure the new system with username, password, timezone, SSH, WiFi etc
  • Then I had to confirm the target SDcard and start the system installation onto the card.
  • Finally I moved the card to the RPi4 and started it, I was able to connect by SSH since it still had the same IP address (same MAC so the same IP was issued)

So I have absolutely no idea what kind of 32/64 bit system I now have...
How can I check?

I want to be able to build applications for all RPi units, i.e. I have to be on the 32 bit system and use 32 bit dev tools as well.

So the crucial question is:
Which version of fpcupdeluxe do I have to use?

And maybe: Am I on  the wrong OS now, if so how do I install the correct version? Erase and start over maybe, but how is it done in the imager?
--
Bo Berglund
Sweden

rca

  • Jr. Member
  • **
  • Posts: 67
Re: Fpcupdeluxe
« Reply #2211 on: April 15, 2023, 10:30:55 pm »
@BosseB

One way to know what type of architecture the Raspberry Pi OS packages are running on:

Inside the terminal, type: "dpkg --print-architecture"

If it shows "arm64", it is ARM 64 Bit. You must use "fpcupdeluxe-aarch64-linux" to install lazarus/fpc inside the RPi4.

If it shows "armhf", it is ARM 32 Bit. You must use "fpcupdeluxe-arm-linux" to install lazarus/fpc inside the RPi4.

BosseB

  • Sr. Member
  • ****
  • Posts: 468
Re: Fpcupdeluxe
« Reply #2212 on: April 16, 2023, 12:34:12 am »
@BosseB
One way to know what type of architecture the Raspberry Pi OS packages are running on:
Inside the terminal, type: "dpkg --print-architecture"
If it shows "arm64", it is ARM 64 Bit. You must use "fpcupdeluxe-aarch64-linux" to install lazarus/fpc inside the RPi4.
If it shows "armhf", it is ARM 32 Bit. You must use "fpcupdeluxe-arm-linux" to install lazarus/fpc inside the RPi4.
Thanks, this means I should use the arm-linux one...
So on this newly created PiOS bullseye RPi4 I started the fpcupdeluxe-arm-linux program just downloaded from github.
I specified FPC 3.2.2 and Lazarus 2.2.6 then clicked the Install FPC+Laz button and went for my evening tea.
When I got back after an hour or so it had failed...  >:(

Turns out that I had not installed the prerequisites which are mentioned in the read-me on the GitHub site for fpcupdeluxe...
After I had done that I could restart the installation and it completed successfully.

One suggestion for improvement:
It would be nice in the modules list if I could click to select multiple packages so as to not have to recompile Lazarus after each and every extra package!
As it is now I have to install OnLinePackageManager (big button for this!) and do all the extra packages in one go inside Lazarus itself afterwards...

--
Bo Berglund
Sweden

LacaK

  • Hero Member
  • *****
  • Posts: 691
Re: Fpcupdeluxe
« Reply #2213 on: April 20, 2023, 02:30:54 pm »
Does there is some kind of problem to cross-compile from recent version of FPCUpDeluxe to ARMHF (Raspberry Pi 4) target?
I am using fpcupdeluxe-i386-win32.exe to cross compile to arm/linux with cross options: -CpARMV7 -CfVFPV4 -OoFASTMATH and "ARM target"="armhf"
I am able to build Lazarus (2.2.6+FPC 3.2.2) and from that build cross compile my application.
But compiled application does not run on target Raspberry Pi4 device (runs on another Raspberry Pi3 device)
While cross-compiling I see in Lazarus in message window: "Verbose: Target OS: Linux for ARMEL"
So I guess that it is not okay and there should be ARMHF instead? But how to set ARMHF?

Note: with FPCUpDeluxe 2.2.0j and Cross build options: -CpARMV7 -CfVFPV4 -OoFASTMATH -CaEABIHF it works as expected.
« Last Edit: April 20, 2023, 03:29:26 pm by LacaK »

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: Fpcupdeluxe
« Reply #2214 on: April 20, 2023, 05:47:50 pm »
Quote
Verbose: Target OS: Linux for ARMEL
That is definitely not correct.
While building the arm-linux cross-compiler, fpcupdeluxe sets the FPCOPT to -dFPC_ARMHF. That will build an ARMHF compiler.
So, I do not understand why this setting is not working.

LacaK

  • Hero Member
  • *****
  • Posts: 691
Re: Fpcupdeluxe
« Reply #2215 on: April 21, 2023, 07:46:25 am »
I got it. There must be set both options:
- "ARM target"="armhf" (which sets OPT: -dFPC_ARMHF)
- and "-CaEABIHF" must be in CROSSOPT (my full line is "-CpARMV7 -CfVFPV4 -OoFASTMATH -CaEABIHF")
(my intuitive expectation was, that when I set ARM target=armhf that it is sufficient)

Small problem is that once I install cross compiler without -CaEABIHF, and later I add it I get "Error: Illegal parameter: -CaEABIHF". Also when I remove/install cross compiler error is still there.
I had to "Install/update FPC+Lazarus" again and then install cross compiler.
Now it works (FPCUpDeluxe 2.2.0q).
« Last Edit: April 21, 2023, 07:51:20 am by LacaK »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9904
  • Debugger - SynEdit - and more
    • wiki
Re: Fpcupdeluxe
« Reply #2216 on: April 22, 2023, 05:12:46 pm »
Ok, here is an idea / feature request.

currently, fpcupdeluxe creates a git clone (and checkout) for each fpc build.

However, I usually have several builds of the same fpc version (debug dwarf 2/3, optimized, ...). There is no need to duplicate the source for each build.

My usual folder structure is like this
Code: Text  [Select][+][-]
  1. fpc_3.2.2/
  2.    source/
  3.    64/
  4.       gw2/   ###  64 bit and cross 32 bit compiler
  5.       gw3/
  6.       O2/
  7.       O4/
  8.    32/
  9.       gw2/   ###  32 bit and cross 64 bit compiler
  10.       gw3/
  11.       O2/
  12.       O4/
  13. fpc_3.2.3/
  14.    .......

Each version requires the source just once.

I haven't yet spent to much time to try and set up the above with lots of individual config files (if possible at all). Mainly because that would mean to create dozens of configs.

Ideally I have on config for each fpc version, and then could manage all the builds within that one config.
Then updating all the fixes 3.2.3 builds could be a single click.

Maybe something like installing cross compilers. Adding each build-config => and then being able to update them all.




The above is only one step in reducing sources and git clones.

I actually have a single git clone.
And then I use the following to export the source for a particular commit
(requires a not too old version of git)

Code: Bash  [Select][+][-]
  1. git switch -d -f origin/fixes_3_2
  2. git -C  /home/m/fpc/git/fpc-source --work-tree=/home/m/fpc_3.2.3/source restore .

This isn't actually fully optimized, because the "switch" also creates a checkout of the files in the fpc-source dir.

Not tested, but it should probably be
Code: Bash  [Select][+][-]
  1. git -C  /home/m/fpc/git/fpc-source --work-tree=/home/m/fpc_3.2.3/source restore --source=origin/fixes_3_2 .

For this, it would be good if fpcupdeluxe had the option to specify an "git dir" (that may or may not exist) outside of the "fpcupdeluxe work dir". And then use the above git command to create the source for the build(s).

Instead of using the "export" trick for git, the source could also be a "git worktree". But that breaks easily if folders are renamed / moved.





Quick observation on the "cross" tab for install/uninstall.

I can select any radio button, both the "install" and "uninstall" button are active. Never mind if that particular target is installed or not.

TRon

  • Hero Member
  • *****
  • Posts: 2538
Re: Fpcupdeluxe
« Reply #2217 on: April 22, 2023, 05:33:36 pm »
Ok, here is an idea / feature request.

currently, fpcupdeluxe creates a git clone (and checkout) for each fpc build.
Although I normally do not use fpcdeluxe (only in rare occasions) I agree that it is wasting bandwidth (and time). So I would welcome any improvement on that (supporting your request and in case possible to implement without too much hassle for Don Alfredo).

With the risk of going too much off-topic
Quote
I haven't yet spent to much time to try and set up the above with lots of individual config files (if possible at all). Mainly because that would mean to create dozens of configs.

Ideally I have on config for each fpc version, and then could manage all the builds within that one config.
Is there an advantage over using multiple configurations instead of just using one for all your installations ? In case it becomes too cumbersome due to the many ifdefs you could also opt for having particular changes in an include (based on version, compile options or whatever is better suited for your needs/setup).

I ask because right now I have just one fpc.cfg file that does everything for every (installed) FPC build and wonder if things could be improved/optimized.

In case too off-topic, please ignore.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9904
  • Debugger - SynEdit - and more
    • wiki
Re: Fpcupdeluxe
« Reply #2218 on: April 22, 2023, 06:01:44 pm »
Is there an advantage over using multiple configurations instead of just using one for all your installations ?

I must admit, I haven't explored it to deeply either.

On my main PC, I have my own scripts. They are old, but the fall under "don't touch a working system".

However, I have various VM with all kind of OS/version for testing. And adjusting my scripts can sometimes be cumbersome. So on some of them I have done installation with FpcUpDeluxe.
But because I used it as an easy replacement, I only did one or two fpc installs (per VM), and skipped all the rest.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9904
  • Debugger - SynEdit - and more
    • wiki
Re: Fpcupdeluxe
« Reply #2219 on: April 22, 2023, 06:10:04 pm »
Shortcut to lazarus.

I probably will keep building my Lazarus(es) myself. But I just did a test (on Win / Linux is still todo).

FpcUpDeluxe creates a shortcut to lazarus.  It contains the following invocation
Code: Text  [Select][+][-]
  1. C:\testdir\lazarus\lazarus.exe --pcp="C:\testdir\config_lazarus"

Instead it is possible (though I have to check the minimum Laz version / but it is some Laz 1.x) to create a file
    C:\testdir\lazarus\lazarus.cfg
with the content:
Code: Text  [Select][+][-]
  1. --pcp="C:\testdir\config_lazarus"

https://wiki.freepascal.org/Multiple_Lazarus#Using_lazarus.cfg_file

 

TinyPortal © 2005-2018