Recent

Author Topic: Common File Dialogs Have Been Broken for a Very Long Time (Ex: Ubuntu AARCH64)  (Read 37757 times)

TRon

  • Hero Member
  • *****
  • Posts: 4377
The announcement of 3.4 says FPC 3.2.2, so yes, that should be fine.
fwiw: I use the same approach, looking at the Lazarus release thread in order to figure out what FPC version it was shipped with.

It is always possible to deviate from that when there is need for it (but in that case results may vary). Usually there is no need, unless trunk/main is reluctant and only works with a particular hash (can be for both FPC and Lazarus. (it is better to sit that one out in case it does occur).
Today is tomorrow's yesterday.

msintle

  • Sr. Member
  • ****
  • Posts: 376
So if I am ending up with:

Code: Text  [Select][+][-]
  1. Turn off this advice by setting config variable advice.detachedHead to false
  2.  
  3. HEAD is now at 34295aa424 set fixes version to 3.4
  4. ==============================================================
  5.  
  6. Now compiling FPC, this will take some time
  7.  
  8. Cleaning up
  9. make -s all install OPT="-g -gl -gw3 -O2 -Xs -CX -XX -v0 -dFPC_ARMHF" OS_TARGET=linux CPU_TARGET=aarch64 INSTALL_PREFIX=/home/parallels/dev/fpc PP=/home/parallels/dev/bootstrap/ppca64
  10. /usr/bin/ld: /home/parallels/dev/fpc/rtl/units/aarch64-linux/cprt0.o: in function `_start':
  11. (.text+0x54): undefined reference to `__libc_csu_init'
  12. /usr/bin/ld: (.text+0x58): undefined reference to `__libc_csu_init'
  13. /usr/bin/ld: (.text+0x5c): undefined reference to `__libc_csu_fini'
  14. /usr/bin/ld: (.text+0x60): undefined reference to `__libc_csu_fini'
  15. make[2]: *** [Makefile:1719: fpmake] Error 1
  16. make[1]: *** [Makefile:2682: packages_smart] Error 2
  17. make: *** [Makefile:2837: build-stamp.aarch64-linux] Error 2
  18.  470  [===========>                                                       ]  18%
  19. Something went wrong compiling FPC. Aborting.
  20.  
That means I am out of luck here?

Edit: This is on Ubuntu aarch64 24.04.
« Last Edit: March 05, 2025, 01:55:13 pm by msintle »

rvk

  • Hero Member
  • *****
  • Posts: 6953
That means I am out of luck here?
https://forum.lazarus.freepascal.org/index.php?topic=34645.2355

Try another revision of FPC. Maybe fixes_3_2.

Why did you want Laz 3.4 ?

msintle

  • Sr. Member
  • ****
  • Posts: 376
That means I am out of luck here?
https://forum.lazarus.freepascal.org/index.php?topic=34645.2355

Try another revision of FPC. Maybe fixes_3_2.

Why did you want Laz 3.4 ?

Sure, will try that now on systems where the build fails.

Here's the output from Debian 12.6 aarch64:

Code: Text  [Select][+][-]
  1. Turn off this advice by setting config variable advice.detachedHead to false
  2.  
  3. HEAD is now at 34295aa424 set fixes version to 3.4
  4. ==============================================================
  5.  
  6. Now compiling FPC, this will take some time
  7.  
  8. Cleaning up
  9. make -s all install OPT="-g -gl -gw3 -O2 -Xs -CX -XX -v0 -dFPC_ARMHF" OS_TARGET=linux CPU_TARGET=aarch64 INSTALL_PREFIX=/home/parallels/dev/fpc PP=/home/parallels/dev/bootstrap/ppca64
  10. ./lazarus_on_linux_gtk2.sh: line 281: pv: command not found
  11. make[7]: *** [Makefile:3848: system.ppu] Broken pipe
  12. make[6]: *** [Makefile:2037: linux_all] Error 2
  13. make[5]: *** [Makefile:4470: rtl] Error 2
  14. make[4]: *** [Makefile:4330: next] Error 2
  15. make[3]: *** [Makefile:4335: ppc1] Error 2
  16. make[2]: *** [Makefile:4347: cycle] Error 2
  17. make[1]: *** [Makefile:2800: compiler_cycle] Error 2
  18. make: *** [Makefile:2832: build-stamp.aarch64-linux] Error 2
  19. Compilation of FPC failed. Aborting.
  20.  

And Fedora 41 aarch64 reports:

Code: Text  [Select][+][-]
  1. I require apt-get but it's not installed. Aborting.
  2.  
So your script doesn't work at all on the Red Hat inspired distros then, is that right?

Edit: Some components we require work best on Lazarus 3.4, and the latest trunk versions have broken our code outright in multiple places by killing functions we use (or at best, moving them from one unit to another).

Edit 2: Tried both, getting the following errors:

Code: Text  [Select][+][-]
  1. error: pathspec 'tags/fixes_3_2' did not match any file(s) known to git
  2. error: pathspec 'tags/fixes_3_2_2' did not match any file(s) known to git

Edit 3: Kali 2024.2 aarch64 worked (with fpc_3_2_2), so this problem is distribution specific? How does that happen? Please note that the installed Lazarus does not work (suffers from many instability issues as reported earlier on this thread during the initial configuration dialog).

Edit 4: Fedora 41 installed with the latest script ignored my directive for the Lazarus version in-script, and installed the latest version anyways. Any thoughts why that might have been the case?
« Last Edit: March 05, 2025, 02:26:59 pm by msintle »

rvk

  • Hero Member
  • *****
  • Posts: 6953
The script uses apt-get to install a few packages.
If apt-get isn't installed it should use dnf.

At least in the latest version. Not sure which you are using.

Look at the lines where PKG_MANAGER is assigned.
(If not present you are using an older version

Does dnf work on red hat?

You can also strip all lines with apt-get and just install the packages manually.

Latest version should have this:
Code: Bash  [Select][+][-]
  1. # ======================================================
  2. # update packages list to latest version
  3. # ======================================================
  4. echo "=============================================================="
  5. echo ""
  6. echo "Updating package list to latest version (sudo needed)"
  7. echo ""
  8.  
  9. PKG_MANAGER=""
  10. command -v dnf >&1 >/dev/null && PKG_MANAGER="dnf"
  11. command -v apt-get >&1 >/dev/null && PKG_MANAGER="apt"
  12.  
  13. # ======================================================
  14. # some other essentials
  15. # ======================================================
  16. echo "=============================================================="
  17. echo ""
  18. echo "Installing required packages (sudo used)"
  19. echo ""
  20. if [ "$PKG_MANAGER" = "apt" ]; then
  21.   sudo apt-get -y install make binutils build-essential gdb git subversion zip unzip pv
  22.   sudo apt-get -y install libx11-dev libgtk2.0-dev  # for Lazarus, includes all dependencies
  23.  
  24.   if [ "$LCL_PLATFORM" = "qt5" ]; then sudo apt-get -y install libqt5pas-dev; fi
  25.   if [ "$LCL_PLATFORM" = "qt6" ]; then sudo apt-get -y install libqt6pas-dev; fi
  26.  
  27. elif [ "$PKG_MANAGER" = "dnf" ]; then
  28.   # dnf search gtk2*
  29.   sudo dnf -y install make binutils gdb git zip unzip pv
  30.   sudo dnf -y install libX11-devel gtk2-devel gtk+-devel  # for Lazarus, includes all dependencies
  31.   sudo dnf -y install gcc gcc-c++ kernel-devel
  32.  
  33.   if [ "$LCL_PLATFORM" = "qt5" ]; then sudo dnf -y install qt5pas-devel; fi
  34.   if [ "$LCL_PLATFORM" = "qt6" ]; then sudo dnf -y install qt6pas-devel; fi
  35.  
  36. else
  37.   echo >&2 "Neither yum/dnf nor apt-get found. Aborting."; exit 1;
  38. fi
« Last Edit: March 05, 2025, 02:02:58 pm by rvk »

msintle

  • Sr. Member
  • ****
  • Posts: 376
The script uses apt-get to install a few packages.
If apt-get isn't installed it should use dnf.

At least in the latest version. Not sure which you are using.

Look at the lines where PKG_MANAGER is assigned.
(If not present you are using an older version

Does dnf work on red hat?

You can also strip all lines with apt-get and just install the packages manually.

Latest version should have this:
Code: Bash  [Select][+][-]
  1. # ======================================================
  2. # update packages list to latest version
  3. # ======================================================
  4. echo "=============================================================="
  5. echo ""
  6. echo "Updating package list to latest version (sudo needed)"
  7. echo ""
  8.  
  9. PKG_MANAGER=""
  10. command -v dnf >&1 >/dev/null && PKG_MANAGER="dnf"
  11. command -v apt-get >&1 >/dev/null && PKG_MANAGER="apt"
  12.  
  13. # ======================================================
  14. # some other essentials
  15. # ======================================================
  16. echo "=============================================================="
  17. echo ""
  18. echo "Installing required packages (sudo used)"
  19. echo ""
  20. if [ "$PKG_MANAGER" = "apt" ]; then
  21.   sudo apt-get -y install make binutils build-essential gdb git subversion zip unzip pv
  22.   sudo apt-get -y install libx11-dev libgtk2.0-dev  # for Lazarus, includes all dependencies
  23.  
  24.   if [ "$LCL_PLATFORM" = "qt5" ]; then sudo apt-get -y install libqt5pas-dev; fi
  25.   if [ "$LCL_PLATFORM" = "qt6" ]; then sudo apt-get -y install libqt6pas-dev; fi
  26.  
  27. elif [ "$PKG_MANAGER" = "dnf" ]; then
  28.   # dnf search gtk2*
  29.   sudo dnf -y install make binutils gdb git zip unzip pv
  30.   sudo dnf -y install libX11-devel gtk2-devel gtk+-devel  # for Lazarus, includes all dependencies
  31.   sudo dnf -y install gcc gcc-c++ kernel-devel
  32.  
  33.   if [ "$LCL_PLATFORM" = "qt5" ]; then sudo dnf -y install qt5pas-devel; fi
  34.   if [ "$LCL_PLATFORM" = "qt6" ]; then sudo dnf -y install qt6pas-devel; fi
  35.  
  36. else
  37.   echo >&2 "Neither yum/dnf nor apt-get found. Aborting."; exit 1;
  38. fi

Sounds like you updated your awesome script since your last post on this thread with it attached.

Would you mind attaching your newest version inside a ZIP file for me so I can download and run it sanely?

Thank you very much as ever!

rvk

  • Hero Member
  • *****
  • Posts: 6953
Would you mind attaching your newest version inside a ZIP file for me so I can download and run it sanely?
You are not using the latest in this topic.
I already provided a zip.

You say it says "I require apt-get but it's not installed. Aborting."
But the latest zip says "Neither yum/dnf nor apt-get found. Aborting."

Look at the previous few pages to see the latest .zip I attached.

Edit: I think this should be the latest:
https://forum.lazarus.freepascal.org/index.php/topic,68845.msg540286.html#msg540286

msintle

  • Sr. Member
  • ****
  • Posts: 376
Would you mind attaching your newest version inside a ZIP file for me so I can download and run it sanely?
You are not using the latest in this topic.
I already provided a zip.

You say it says "I require apt-get but it's not installed. Aborting."
But the latest zip says "Neither yum/dnf nor apt-get found. Aborting."

Look at the previous few pages to see the latest .zip I attached.

Edit: I think this should be the latest:
https://forum.lazarus.freepascal.org/index.php/topic,68845.msg540286.html#msg540286

Thanks for linking that in!

Please see my edits above BTW, I've just posted a third edit - reporting some surprising results!

rvk

  • Hero Member
  • *****
  • Posts: 6953
Please see my edits above BTW, I've just posted a third edit - reporting some surprising results!
fixes_3_2 doesn't seem to be a tag but a branche  %) (Grrr. can't seem to get use to git over svn)

You can change the following lines ( remove the tags/ before the $xxx_version in the checkout lines)
Code: Pascal  [Select][+][-]
  1.   if [ "$fpc_version" != "" ]; then
  2.     echo "Switch to fpc $fpc_version"
  3.     git -C fpc checkout $fpc_version
  4.   fi
  5.  
  6.   if [ "$laz_version" != "" ]; then
  7.     echo "Switch to lazarus $laz_version"
  8.     git -C lazarus checkout $laz_version
  9.   fi

Then for fpc you can just use fixes_3_2 and for Lazarus you need the tag tags/ before release.
That way you should be able to get every version... tag or otherwise.

Code: Pascal  [Select][+][-]
  1. fpc_version="fixes_3_2"
  2. laz_version="tags/lazarus_3_4"

You can also just try FPC trunk with Laz 3.4. Just do this:
Code: Pascal  [Select][+][-]
  1. fpc_version=""
  2. laz_version="tags/lazarus_3_4"

But I'm not sure why you needed 3.4 and if you also need to downgrade FPC version.

msintle

  • Sr. Member
  • ****
  • Posts: 376
Please see my edits above BTW, I've just posted a third edit - reporting some surprising results!
fixes_3_2 doesn't seem to be a tag but a branche  %) (Grrr. can't seem to get use to git over svn)

You can change the following lines ( remove the tags/ before the $xxx_version in the checkout lines)
Code: Pascal  [Select][+][-]
  1.   if [ "$fpc_version" != "" ]; then
  2.     echo "Switch to fpc $fpc_version"
  3.     git -C fpc checkout $fpc_version
  4.   fi
  5.  
  6.   if [ "$laz_version" != "" ]; then
  7.     echo "Switch to lazarus $laz_version"
  8.     git -C lazarus checkout $laz_version
  9.   fi

Then for fpc you can just use fixes_3_2 and for Lazarus you need the tag tags/ before release.
That way you should be able to get every version... tag or otherwise.

Code: Pascal  [Select][+][-]
  1. fpc_version="fixes_3_2"
  2. laz_version="tags/lazarus_3_4"

You can also just try FPC trunk with Laz 3.4. Just do this:
Code: Pascal  [Select][+][-]
  1. fpc_version=""
  2. laz_version="tags/lazarus_3_4"

But I'm not sure why you needed 3.4 and if you also need to downgrade FPC version.

I just added in another Edit 4, and updated Edit 3 with more (bad) results.

Regarding the changes you proposed above, I will try again and let you know what I find on a new reply this time.

msintle

  • Sr. Member
  • ****
  • Posts: 376
Debian 12.6 aarch64 (with fixes_3_2):

Code: Text  [Select][+][-]
  1. Turn off this advice by setting config variable advice.detachedHead to false
  2.  
  3. HEAD is now at 34295aa424 set fixes version to 3.4
  4. ==============================================================
  5.  
  6. Now compiling FPC, this will take some time
  7.  
  8. Cleaning up
  9. make -s all install OPT="-g -gl -gw3 -O2 -Xs -CX -XX -v0 -dFPC_ARMHF" OS_TARGET=linux CPU_TARGET=aarch64 INSTALL_PREFIX=/home/parallels/dev/fpc PP=/home/parallels/dev/bootstrap/ppca64
  10. ./lazarus_on_linux_gtk2.sh: line 281: pv: command not found
  11. make[7]: *** [Makefile:3861: system.ppu] Broken pipe
  12. make[6]: *** [Makefile:2050: linux_all] Error 2
  13. make[5]: *** [Makefile:4530: rtl] Error 2
  14. make[4]: *** [Makefile:4388: next] Error 2
  15. make[3]: *** [Makefile:4393: ppc1] Error 2
  16. make[2]: *** [Makefile:4405: cycle] Error 2
  17. make[1]: *** [Makefile:2825: compiler_cycle] Error 2
  18. make: *** [Makefile:2857: build-stamp.aarch64-linux] Error 2
  19. Compilation of FPC failed. Aborting.
  20.  

Ubuntu 24.04 aarch64 (fixes_3_2):

Code: Text  [Select][+][-]
  1. Downloading FPC sources
  2.  
  3. Cloning into 'fpc'...
  4. remote: Enumerating objects: 774018, done.
  5. remote: Counting objects: 100% (29/29), done.
  6. remote: Compressing objects: 100% (29/29), done.
  7. remote: Total 774018 (delta 6), reused 0 (delta 0), pack-reused 773989 (from 1)
  8. Receiving objects: 100% (774018/774018), 224.08 MiB | 1.42 MiB/s, done.
  9. Resolving deltas: 100% (620350/620350), done.
  10. Updating files: 100% (24872/24872), done.
  11. Now: Date:   Tue Mar 4 21:40:49 2025 +0000
  12.  
  13. Downloading Lazarus sources
  14. Cloning into 'lazarus'...
  15. remote: Enumerating objects: 598578, done.
  16. remote: Counting objects: 100% (418/418), done.
  17. remote: Compressing objects: 100% (281/281), done.
  18. error: 10345 bytes of body are still expected93 MiB | 3.48 MiB/s  
  19. fetch-pack: unexpected disconnect while reading sideband packet
  20. fatal: early EOF
  21. fatal: fetch-pack: invalid index-pack output
  22. Download of fpc failed. Aborting.
  23.  

More tests ongoing, will edit this post as they complete.

Edit 1:

Fedora 41: Seems to install, requested Lazarus/FPC version(s) are ignored entirely; Lazarus configuration window crashes in the same manner as with the preceding Kali test (seemingly random lockup during/after path selection for components).
« Last Edit: March 05, 2025, 02:53:15 pm by msintle »

TRon

  • Hero Member
  • *****
  • Posts: 4377
Debian 12.6 aarch64 (with fixes_3_2):
pv is (still) missing. Strange as it is part of Debian (should also be there on/for aarch64).

If the line "apt search pv" is executed from a terminal does that distro then list something like:
Code: [Select]
pv/stable 1.6.20-1 amd64
  Shell pipeline element to meter data passing through

ofc it should not read amd64 but something like aarch64 or arm64 instead. The rest should be similar.

Quote
Ubuntu 24.04 aarch64 (fixes_3_2):

That looks like a git related error. Worth to give it another spin as sometimes that goes wrong for whatever reason. Before you do, make sure to clean whatever was present in the working directory where the script was executed.
Today is tomorrow's yesterday.

msintle

  • Sr. Member
  • ****
  • Posts: 376
This is what the search came back with:

Code: Text  [Select][+][-]
  1. Sorting... Done
  2. Full Text Search... Done
  3. 389-ds/stable 2.3.1+dfsg1-1 all
  4.   389 Directory Server suite - metapackage
  5. ...
  6. pv/stable 1.6.20-1 arm64
  7.   Shell pipeline element to meter data passing through
  8. ...
  9. <had to truncate due to The message exceeds the maximum allowed length (20000 characters)>
  10. zmap/stable 2.1.1-2+b6 arm64
  11.   network scanner for researchers
  12.  

On Ubuntu, you're right - it did go through this time.

But again the File Open dialog is broken in this version and instantly kills Lazarus :'(

Of course, I should have thought of that earlier.

TRon

  • Hero Member
  • *****
  • Posts: 4377
This is what the search came back with:
So, it is present. rvk's script seems to install it. That means that something is amiss there (and I have no idea what).

With regards to the other findings, I don't know if the fix for that particular issue already made it to fixes branch.
Today is tomorrow's yesterday.

rvk

  • Hero Member
  • *****
  • Posts: 6953
But again the File Open dialog is broken in this version and instantly kills Lazarus :'(

Of course, I should have thought of that earlier.
Yeah... then again... (I might have read over it)... why the need for 3.4 ?

BTW. If pv doesn't install correctly you could always remove the command from the compile line. It's just that it gives some progress indication instead of flooding the screen with compile messages.
« Last Edit: March 05, 2025, 05:06:44 pm by rvk »

 

TinyPortal © 2005-2018