Common File Dialogs Have Been Broken for a Very Long Time (Ex: Ubuntu AARCH64) lazarus / 32-Linux ---------------------------------------------------------------------- msintle · 2024-10-09 09:23 I have observed this issue for 2+ years and counting, it seems to affect Linux distributions primarily. Run a Lazarus built app that uses common file dialogs, and the app crashes/freezes when you try to open/save a file, etc. The same thing happens with Lazarus itself, so it is near impossible to try and manually create a reproducing project on affected systems. I have been observing this phenomenon on Ubuntu Linux's countless versions, most recently 24.x, and before that, 22.x, running under the aarch64 CPU architecture. I can't imagine I'm the only one seeing this, but the issue has not been resolved despite years of progress (literally), so thought I'd finally make a dedicated post for it. Again, it is really hard to actually provide a reproducing project, since Lazarus itself cannot successfully run on the affected platforms. How do we start triage for this issue? ---------------------------------------------------------------------- dsiders · 2024-10-09 17:03 Quote from: msintle on October 09, 2024, 11:23:53 amI have observed this issue for 2+ years and counting, it seems to affect Linux distributions primarily. Run a Lazarus built app that uses common file dialogs, and the app crashes/freezes when you try to open/save a file, etc. The same thing happens with Lazarus itself, so it is near impossible to try and manually create a reproducing project on affected systems. I have been observing this phenomenon on Ubuntu Linux's countless versions, most recently 24.x, and before that, 22.x, running under the aarch64 CPU architecture. I can't imagine I'm the only one seeing this, but the issue has not been resolved despite years of progress (literally), so thought I'd finally make a dedicated post for it. Again, it is really hard to actually provide a reproducing project, since Lazarus itself cannot successfully run on the affected platforms. How do we start triage for this issue? Which dialog routine specifically? Do you have a small example that demonstrates? Without specifics, everyone will just be guessing. ---------------------------------------------------------------------- Laksen · 2024-10-09 17:22 Is that with custom themes? ---------------------------------------------------------------------- msintle · 2024-10-09 19:58 Quote from: Laksen on October 09, 2024, 07:22:59 pmIs that with custom themes? All standard themes. ---------------------------------------------------------------------- msintle · 2024-10-09 19:59 Quote from: dsiders on October 09, 2024, 07:03:21 pmWhich dialog routine specifically? Do you have a small example that demonstrates? Without specifics, everyone will just be guessing. Standard TOpenDialog.Execute, for example, will reproduce the issue instantly. All standard file dialogs are broken on affected Linux'es. ---------------------------------------------------------------------- Bart · 2024-10-09 20:05 Broken as in ...? Bart ---------------------------------------------------------------------- dsiders · 2024-10-09 20:41 Quote from: msintle on October 09, 2024, 09:59:22 pmQuote from: dsiders on October 09, 2024, 07:03:21 pmWhich dialog routine specifically? Do you have a small example that demonstrates? Without specifics, everyone will just be guessing. Standard TOpenDialog.Execute, for example, will reproduce the issue instantly. All standard file dialogs are broken on affected Linux'es. I am using both 3.6 and main on Linux (OpenSuse) x86-64. No problems there. ---------------------------------------------------------------------- wp · 2024-10-09 20:50 Quote from: msintle on October 09, 2024, 11:23:53 amRun a Lazarus built app that uses common file dialogs, and the app crashes/freezes when you try to open/save a file, etc. The same thing happens with Lazarus itself, so it is near impossible to try and manually create a reproducing project on affected systems. Are these applications running standalone, or inside Lazarus, i.e. inside the debugger? In the latter case: which debugger are you using? gdb? Switch to fpdebug. ---------------------------------------------------------------------- msintle · 2024-10-09 22:05 Quote from: dsiders on October 09, 2024, 10:41:08 pmQuote from: msintle on October 09, 2024, 09:59:22 pmQuote from: dsiders on October 09, 2024, 07:03:21 pmWhich dialog routine specifically? Do you have a small example that demonstrates? Without specifics, everyone will just be guessing. Standard TOpenDialog.Execute, for example, will reproduce the issue instantly. All standard file dialogs are broken on affected Linux'es. I am using both 3.6 and main on Linux (OpenSuse) x86-64. No problems there. As mentioned above and in the title, the failures occur on aarch64. ---------------------------------------------------------------------- msintle · 2024-10-09 22:05 Quote from: wp on October 09, 2024, 10:50:24 pmQuote from: msintle on October 09, 2024, 11:23:53 amRun a Lazarus built app that uses common file dialogs, and the app crashes/freezes when you try to open/save a file, etc. The same thing happens with Lazarus itself, so it is near impossible to try and manually create a reproducing project on affected systems. Are these applications running standalone, or inside Lazarus, i.e. inside the debugger? In the latter case: which debugger are you using? gdb? Switch to fpdebug. Again as aforementioned, you can't run inside Lazarus either, because Lazarus's open dialogs also fail - so you can't even install your packages, load your project, etc. on affected systems. ---------------------------------------------------------------------- dsiders · 2024-10-09 22:23 Quote from: msintle on October 10, 2024, 12:05:18 amQuote from: dsiders on October 09, 2024, 10:41:08 pmQuote from: msintle on October 09, 2024, 09:59:22 pmQuote from: dsiders on October 09, 2024, 07:03:21 pmWhich dialog routine specifically? Do you have a small example that demonstrates? Without specifics, everyone will just be guessing. Standard TOpenDialog.Execute, for example, will reproduce the issue instantly. All standard file dialogs are broken on affected Linux'es. I am using both 3.6 and main on Linux (OpenSuse) x86-64. No problems there. As mentioned above and in the title, the failures occur on aarch64. You implied is was a problem on Linux's in general. I'm confirming that it's not a problem on other CPU architectures. Rather than dribble info out, post your Help > About content and identify where your install came from. Ubuntu provided Deb packages are broken in general. Is it installed in a /home directory? ---------------------------------------------------------------------- msintle · 2024-10-09 22:42 Quote from: dsiders on October 10, 2024, 12:23:14 amYou implied is was a problem on Linux's in general. I'm confirming that it's not a problem on other CPU architectures. Rather than dribble info out, post your Help > About content and identify where your install came from. Ubuntu provided Deb packages are broken in general. Is it installed in a /home directory? Here's a reproducing project, including binaries for both GTK2 and Qt5 on aarch64. I created the sample on aarch64 Qt5 Kali 2022 with Lazarus 2.3, where the dialog is shown normally, and Lazarus works, somewhat normally (unlike in the demo app, it takes nearly 30 seconds for the Lazarus standard file dialogs to display on screen). I then compiled this sample on aarch64 GTK2 Debian 11 with Lazarus 3.99 installed by FPCUPDLX, where the dialog is again shown normally, and Lazarus works, entirely normally. Now trying the GTK2 binary on Ubuntu 24.01, 22.04, etc. reproduces the issue instantly. The Qt5 sample doesn't run at all on Ubuntu, of course. I do hope this helps. If you dig deeper, you may find more widgets/OS's that don't work with the standard file dialogs in this way; but at least we have a starting point here. Thanks! Edit: Since the ZIP file size is too big for the forum due to the compiled binaries, I've uploaded it here instead (the transfer expires in 3 days, so if somebody has a more permanent solution, please help with a permanent link): https://we.tl/t-ADOx4no1gM ---------------------------------------------------------------------- dbannon · 2024-10-09 22:59 Quote from: msintle on October 09, 2024, 11:23:53 am.... How do we start triage for this issue? Strange, I thought I posted an answer to this yesterday. Anyway, msintle, I am guessing that you are using a Raspberry Pi ?  You don't mention but "linux" and "AARCH64" ... In case you are, firstly, I suggest a memcheck.  Secondly, consider your power supply.  Unfortunately, Raspberry PI no longer works on "any old phone charger", you need need a 5v 3Amp supply and that is a lot of current through a small cable and connector.  Most devices that use substantial power use the USB protocols that can up the voltage and drop the current. What you describe does sound to me like a power issues (on a raspberry pi). I routinely test my app on 64bit Raspberry Pi, no problems. Both gtk2 and Qt5 Davo ---------------------------------------------------------------------- msintle · 2024-10-09 23:25 Quote from: dbannon on October 10, 2024, 12:59:34 amStrange, I thought I posted an answer to this yesterday. Anyway, msintle, I am guessing that you are using a Raspberry Pi ?  You don't mention but "linux" and "AARCH64" ... In case you are, firstly, I suggest a memcheck.  Secondly, consider your power supply.  Unfortunately, Raspberry PI no longer works on "any old phone charger", you need need a 5v 3Amp supply and that is a lot of current through a small cable and connector.  Most devices that use substantial power use the USB protocols that can up the voltage and drop the current. What you describe does sound to me like a power issues (on a raspberry pi). I routinely test my app on 64bit Raspberry Pi, no problems. Both gtk2 and Qt5 Davo Nope, not even close. VMs running on Parallels on an M3 Submax. The issue(s) are real, please take the reports seriously - thank you very much. ---------------------------------------------------------------------- mas steindorff · 2024-10-10 00:37 we were seeing something similar when we built our exe with Lazarus 2.4 with 32 bit target and ran on a 64 bit windows OS.  In our case, the OpenFileDialog would take 20 to 30 seconds. I used this as the main excuse to update to 3.4 where the same code compiled for either 32 bit or 64 bit opens the dialog within 2 seconds. ---------------------------------------------------------------------- dbannon · 2024-10-10 09:33 Quote from: mas steindorff on October 10, 2024, 02:37:01 amwe were seeing something similar when we built our exe with Lazarus 2.4 with 32 bit target and ran on a 64 bit windows OS.  In our case, the OpenFileDialog would take 20 to 30 seconds. I used this as the main excuse to update to 3.4 where the same code compiled for either 32 bit or 64 bit opens the dialog within 2 seconds. There was definitely an issue with FileOpen Dialog using Qt5, that was fixed, from memory about the time Lazarus 3.0 was released. It was 20second or a bit more freeze that related to dbus communications, "manageable" with the right dbus add-ons installed. Its not there now. Certain combinations of native widgets, all a blur in my memory now. msintle's experience is a crash. From memory, some people reported that problem caused caused a crash, I never saw it. But it does not appear in any current Lazarus now. But msintle's use of Ubuntu 22.04 would be the right timing to show that problem. It was only with Qt5, never a problem with gtk2.  Don't think Qt6 was a thing then ... Look though the Qt branch of the forum, couple of years back. msintle, you see it on both GTK2 and Qt5 ?   (How about Qt6?)  And using the Lazarus in U24.04 (from memory Laz_3.2) ? If so, not the issue above. Maybe unique to "VMs running on Parallels on an M3 Submax." ?   Hmm, I wonder what that means ? Davo ---------------------------------------------------------------------- msintle · 2024-10-10 10:10 Quote from: dbannon on October 10, 2024, 11:33:10 amQuote from: mas steindorff on October 10, 2024, 02:37:01 amwe were seeing something similar when we built our exe with Lazarus 2.4 with 32 bit target and ran on a 64 bit windows OS.  In our case, the OpenFileDialog would take 20 to 30 seconds. I used this as the main excuse to update to 3.4 where the same code compiled for either 32 bit or 64 bit opens the dialog within 2 seconds. There was definitely an issue with FileOpen Dialog using Qt5, that was fixed, from memory about the time Lazarus 3.0 was released. It was 20second or a bit more freeze that related to dbus communications, "manageable" with the right dbus add-ons installed. Its not there now. Certain combinations of native widgets, all a blur in my memory now. msintle's experience is a crash. From memory, some people reported that problem caused caused a crash, I never saw it. But it does not appear in any current Lazarus now. But msintle's use of Ubuntu 22.04 would be the right timing to show that problem. It was only with Qt5, never a problem with gtk2.  Don't think Qt6 was a thing then ... Look though the Qt branch of the forum, couple of years back. msintle, you see it on both GTK2 and Qt5 ?   (How about Qt6?)  And using the Lazarus in U24.04 (from memory Laz_3.2) ? If so, not the issue above. Maybe unique to "VMs running on Parallels on an M3 Submax." ?   Hmm, I wonder what that means ? Davo Seems like I must clarify a couple things: o What I see on Ubuntu is a freeze, and when I click around the application in desperation, Ubuntu says the app has stalled and offers to terminate it. So not a crash proper, but a freeze and the resulting termination; giving the ultimate user the impression of a crash (of sorts). o I see this on GTK2 on Ubuntu currently. I haven't seen it on Qt5, at least not with the reproducing app or my own apps (but I do see a lengthy stall with Lazarus itself as described earlier). o Would everyone please kindly stop suggesting the issue must somehow be unique to my environment, voltage, etc. This is extremely counter- productive. o Ubuntu being the widely adopted Linux OS that it is, this issue only hurts the prospects of Lazarus, and all apps built with Lazarus, for as long as it remains unfixed. o I am testing inside a clean machine installation of Ubuntu hosted as a guest operating system using Parallels running on an Apple Silicon Mac with the M3 Max processor, 30 GPU cores (hence, the Submax designation as the top-of-the-line M3 Max has 40 GPU cores). ---------------------------------------------------------------------- dbannon · 2024-10-10 10:20 OK, you want me out of the discussion, I'm out ! Davo ---------------------------------------------------------------------- tetrastes · 2024-10-10 11:11 Quote from: msintle on October 10, 2024, 12:10:50 pmo I am testing inside a clean machine installation of Ubuntu hosted as a guest operating system using Parallels running on an Apple Silicon Mac with the M3 Max processor, 30 GPU cores (hence, the Submax designation as the top-of-the-line M3 Max has 40 GPU cores). Did you test with other virtualization software than Parallels? I don't know if you can install Ubuntu on this Mac, but on x86, when problems under VM, I would test on directly installed OS, before saying that it is a global problem. ---------------------------------------------------------------------- msintle · 2024-10-10 13:25 Quote from: tetrastes on October 10, 2024, 01:11:53 pmQuote from: msintle on October 10, 2024, 12:10:50 pmo I am testing inside a clean machine installation of Ubuntu hosted as a guest operating system using Parallels running on an Apple Silicon Mac with the M3 Max processor, 30 GPU cores (hence, the Submax designation as the top-of- the-line M3 Max has 40 GPU cores). Did you test with other virtualization software than Parallels? I don't know if you can install Ubuntu on this Mac, but on x86, when problems under VM, I would test on directly installed OS, before saying that it is a global problem. As requested earlier, if you're thinking "it must be a bug in Parallels", please don't bother to post on this thread. ---------------------------------------------------------------------- tetrastes · 2024-10-10 15:31 Quote from: msintle on October 09, 2024, 11:23:53 amHow do we start triage for this issue? Indeed, how do you start triage with such aplomb? Quote from: msintle on October 10, 2024, 03:25:50 pmAs requested earlier, if you're thinking "it must be a bug in Parallels", please don't bother to post on this thread. Now I'm thinking this is a bug in your head. ---------------------------------------------------------------------- msintle · 2024-10-10 16:15 Quote from: tetrastes on October 10, 2024, 05:31:41 pmQuote from: msintle on October 09, 2024, 11:23:53 amHow do we start triage for this issue? Indeed, how do you start triage with such aplomb? I've already provided a reproducing project in ready to run binary form. If anybody would actually bother to run it on aarch64 Ubuntu, instead of speculating about bugs in third party hardware, software, and/or electric wiring; that'd be a great start. I do get people sometimes are stuck in denial though. Quote from: tetrastes on October 10, 2024, 05:31:41 pmQuote from: msintle on October 10, 2024, 03:25:50 pmAs requested earlier, if you're thinking "it must be a bug in Parallels", please don't bother to post on this thread. Now I'm thinking this is a bug in your head. No, you are a bug in my head. ---------------------------------------------------------------------- msintle · 2024-10-14 15:05 For the benefit of all lounging forum lizards: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/41188 ---------------------------------------------------------------------- msintle · 2024-11-04 22:23 So looks like this problem is only getting worse. It reproduces on the latest Debian 12.6, Ubuntu 24.04, Kali 2024.2, all fresh clean installs (all aarch64 GTK2). ---------------------------------------------------------------------- dbannon · 2024-11-04 22:30 Quote from: msintle on November 04, 2024, 11:23:08 pmSo looks like this problem is only getting worse. But, apparently, only for you. I just tested my app on 11 different distributions prior to a release. Don't see anything like you describe. But I am using VirtualBox for virtualization. Oh, sorry, you 'asked' me not to respond didn't you ? LoungeLizard ---------------------------------------------------------------------- msintle · 2024-11-05 00:21 Hey LoungeLizard, Great to hear from you! Can you confirm which distributions you tested, and whether they are aarch64 or x64? It seems VB recently added aarch64 support, so I thought I'd check to be sure. ---------------------------------------------------------------------- dbannon · 2024-11-05 07:25 No, I am running Linux on x86_64.  I also test on RasPi aarch64 but that is not, IMHO, relevant. But we do need to recognize the fact that you may well be the first person to run Lazarus on an Ubuntu box running under Parallels on a Mac. I bet none of the FPC/Lazarus developers even thought to test such a combination. With such lofty expectations needs to come some tolerance. What is relevant is a bug that existed in the Lazarus you would have been using if you used the U22.04 repo to install Lazarus. That was the bug I was discussing when you got all uptight. But its not present in the 24.04 repo and only affected Qt5 apps. So, we can safely dismiss it ? So, what do we know ? Firstly, no one else has experienced this problem. FPC/Lazarus users are vocal lot, they would have spoken up if they did. There was huge discussions about that similar but more isolated bug I mentioned above. (for the record, maybe 2000 downloads from my unofficial libqtxpas site, only 60 or so for aarch64). Secondly, apparently, no one else here, in FPC/Lazarus land is using Parallels. Again. people would speak up. We do that here. What we can speculate about - Ubuntu does not mention the word 'Apple' on its downloads page but DDG does think it did. Is that because Apple threatened them with legal action or they found technical problems ?  They mention ARM only in the context of Raspberry Pi and "Certified Ubuntu Compatible" CPUs. Given Apple's fondness for cross platform, that seems unlikely. What does Apple present Parallels capable of ?  (I assume Parallels is an Apple product.) I would go ahead and try VirtualBox for aarch64 if you can. Its sure not a bug free product on platforms its been in use on for years however I depend on it heavily .... Davo ---------------------------------------------------------------------- msintle · 2024-11-05 10:08 Thanks again for hijacking the thread, but I'm reporting an issue related to aarch64 and you're reporting failure to reproduce on x86_64, which is completely unrelated. I myself am not seeing an issue on x86_64. When people read this thread they are 100% confused by your tireless interjections - the point I am making is trivially simple, but you are for reasons unknown choosing to deflect and bury it. ---------------------------------------------------------------------- dseligo · 2024-11-05 10:31 This is classic example of PEBKAC. TS is P, I mean. ---------------------------------------------------------------------- robert rozee · 2024-11-05 10:34 Quote from: msintle on November 04, 2024, 11:23:08 pmIt reproduces on the latest Debian 12.6, Ubuntu 24.04, Kali 2024.2, all fresh clean installs (all aarch64 GTK2)... Quote from: msintle on October 10, 2024, 01:25:03 amVMs running on Parallels on an M3 Submax. msintle,     have you ever observed these problems when not running within a VM? if not, are you able to test without a VM? the reason i ask, is that it may be that the 'Common File Dialogs' contain a defect that is only revealed when runnning within a VM. that does not make the defect in said dialogs any less real, but it does mean that it can only be diagnosed back to the root cause by someone running within a VM - possibly even requiring the specific version of Parallels you are using, and on the specific aarch64 implementation that the M3 contains. cheers, rob   :-) ---------------------------------------------------------------------- msintle · 2024-11-05 10:44 Quote from: robert rozee on November 05, 2024, 11:34:09 ammsintle,     have you ever observed these problems when not running within a VM? if not, are you able to test without a VM? the reason i ask, is that it may be that the 'Common File Dialogs' contain a defect that is only revealed when runnning within a VM. that does not make the defect in said dialogs any less real, but it does mean that it can only be diagnosed back to the root cause by someone running within a VM - possibly even requiring the specific version of Parallels you are using, and on the specific aarch64 implementation that the M3 contains. I'm not even sorry to have to say that if that's your line of thinking, you're absolutely unqualified to be posting here on this topic. ---------------------------------------------------------------------- robert rozee · 2024-11-05 11:12 i am trying to help you diagnose the very real problem you have discovered with the Common File Dialogs. the first step to doing this is to arrive at what are the essential elements required for others to reproduce the behaviour. to date, am i right in saying that to observe the problems one needs: Ubuntu 24.04 for aarch64, recent release of FPC and Lazarus for aarch64, M3 Submax, recent OSX, and Parallels VM software. cheers, rob   :-) ---------------------------------------------------------------------- hansotten · 2024-11-05 11:53 Quote from: msintle on November 05, 2024, 11:44:08 amtion that the M3 contains. I'm not even sorry to have to say that if that's your line of thinking, you're absolutely unqualified to be posting here on this topic. [/quote] I hope you understand that with your way of expressing yourself in this thread you are not getting much help. Please behave yourself in this forum. ---------------------------------------------------------------------- rvk · 2024-11-05 11:53 Quote from: msintle on November 04, 2024, 11:23:08 pmIt reproduces on the latest Debian 12.6, Ubuntu 24.04, Kali 2024.2, all fresh clean installs (all aarch64 GTK2). I can NOT confirm. Works fine for me. Debian GNU/Linux 12 (bookworm) Lazarus 4.99 (rev main_4_99-471-gaef3e62e80) FPC 3.3.1 aarch64-linux- gtk2 ---------------------------------------------------------------------- msintle · 2024-11-05 12:46 Quote from: robert rozee on November 05, 2024, 12:12:40 pmi am trying to help you diagnose the very real problem you have discovered with the Common File Dialogs. the first step to doing this is to arrive at what are the essential elements required for others to reproduce the behaviour. to date, am i right in saying that to observe the problems one needs: Ubuntu 24.04 for aarch64, recent release of FPC and Lazarus for aarch64, M3 Submax, recent OSX, and Parallels VM software. cheers, rob   :-) I believe that recaps what I have stated, although I'd be very surprised if the issue didn't reproduce on aarch64 Linux'es running natively, or on another hypervisor. IOW the M3 Submax/OSX/Parallels stuff ought hardly be necessary. ---------------------------------------------------------------------- msintle · 2024-11-05 12:47 Quote from: hansotten on November 05, 2024, 12:53:40 pmQuote from: msintle on November 05, 2024, 11:44:08 amtion that the M3 contains. I'm not even sorry to have to say that if that's your line of thinking, you're absolutely unqualified to be posting here on this topic. I hope you understand that with your way of expressing yourself in this thread you are not getting much help. Please behave yourself in this forum. [/quote] You behave yourself please. Why is it OK with people to hijack the thread with absolutely unrelated tests which they claim discredit my report and not OK for me to call them out for it? ---------------------------------------------------------------------- msintle · 2024-11-05 12:48 Quote from: rvk on November 05, 2024, 12:53:57 pmQuote from: msintle on November 04, 2024, 11:23:08 pmIt reproduces on the latest Debian 12.6, Ubuntu 24.04, Kali 2024.2, all fresh clean installs (all aarch64 GTK2). I can NOT confirm. Works fine for me. Debian GNU/Linux 12 (bookworm) Lazarus 4.99 (rev main_4_99-471-gaef3e62e80) FPC 3.3.1 aarch64-linux- gtk2 As stated in my bug report, my Lazarus version is: Lazarus/FPC Version:  Lazarus 3.99 (rev main_3_99-693-gacd0c99f86) FPC 3.3.1 aarch64-linux-gtk2 Are you able to reproduce this issue with the latest 3.99 branch? ---------------------------------------------------------------------- rvk · 2024-11-05 14:26 Quote from: msintle on November 05, 2024, 01:48:50 pmAre you able to reproduce this issue with the latest 3.99 branch? 4.99 IS the latest trunk version in main. I downloaded and compiled the latest trunk for this test. Main is called 4.99 now, not 3.99. There is no 3.99 branche. But there is the older tag main_3_99. Did you mean that one? ---------------------------------------------------------------------- msintle · 2024-11-05 16:03 Quote from: rvk on November 05, 2024, 03:26:14 pmQuote from: msintle on November 05, 2024, 01:48:50 pmAre you able to reproduce this issue with the latest 3.99 branch? 4.99 IS the latest trunk version in main. I downloaded and compiled the latest trunk for this test. Main is called 4.99 now, not 3.99. There is no 3.99 branche. But there is the older tag main_3_99. Did you mean that one? Great question, I believe when I had last installed Lazarus, 4.99 wasn't out yet. I'll reinstall and see what I find. ---------------------------------------------------------------------- marcov · 2024-11-05 16:46 Quote from: mas steindorff on October 10, 2024, 02:37:01 amwe were seeing something similar when we built our exe with Lazarus 2.4 with 32 bit target and ran on a 64 bit windows OS.  In our case, the OpenFileDialog would take 20 to 30 seconds. I used this as the main excuse to update to 3.4 where the same code compiled for either 32 bit or 64 bit opens the dialog within 2 seconds. Note that FPC going from FPC 3.0.4 to 3.2.0+ might be the what resolved this, not lazarus. On Windows the file dialog can be hampered by file explorer plugins bleeding exceptions, that didn't work well with older FPC "SJLJ" kind of exceptions..  Since FPC 3.2.0, FPC also uses standard windows SEH exception processing. So this observation is probably not relevant for *nix ---------------------------------------------------------------------- msintle · 2024-11-05 16:46 Sadly, doesn't work. Please see attached screenshot. This is a 100% clean VM which has only the bare minimum dependencies required to install Lazarus, as shown in the FPCUPDLX requirements text (plus GDB). I also tested on an older Debian (non-12.6) and that failed too, but it does have all the latest updates, so not sure if that'd make a distinct test case, all things considered. Can you repeat your test in a clean environment - if you don't believe in VMs, format a disposable device and run bare metal on it - it is very possible that missing dependencies could be the culprit (which is a primary advantage of VM testing). Edit: My build environment is Debian 11.3 aarch64, and the file dialogs work there just fine. Also: Even Lazarus can't show any file dialogs on Debian 12.x, for example. ---------------------------------------------------------------------- msintle · 2024-11-05 17:06 For the continuing speculative bemusement of the forum lizards, please see the attached screenshot. Inside gtk2proc.inc: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   gtk_window_present(GtkWindow);  Is where it blows up! ---------------------------------------------------------------------- rvk · 2024-11-05 17:10 Quote from: msintle on November 05, 2024, 05:46:50 pmCan you repeat your test in a clean environment - if you don't believe in VMs, format a disposable device and run bare metal on it - it is very possible that missing dependencies could be the culprit (which is a primary advantage of VM testing). I am on a clean environment on bare metal (rpi 4, also aarch64 and debian ). Retesting wouldn't make a difference. If it's working on a system it might not be possible to make it fail. That's why the others are saying it might be an issue on specific hardware, and not a generic problem on aarch64. Maybe someone with paralels can test this. I believe you that you have a problem (others do too). But if nobody can reproduce it (especially developers) it's hard to pinpoint the exact culprit. Can you test a standard distribution of Lazarus (or use a different install script)? (I never used fpcdeluxe but use my own script.) ---------------------------------------------------------------------- marcov · 2024-11-05 17:12 The SIGFPE sounds like exception mask troubles ( https://wiki.freepascal.org/SetExceptionMask and https://wiki.freepasc al.org/Multiplatform_Programming_Guide#Gtk2_and_masking_FPU_exceptions ) ---------------------------------------------------------------------- rvk · 2024-11-05 17:17 Quote from: msintle on November 05, 2024, 06:06:13 pmIs where it blows up! SIGFPE QuoteThe SIGFPE signal reports a fatal arithmetic error. Although the name is derived from “floating-point exception”, this signal actually covers all arithmetic errors, including division by zero and overflow. If a program stores integer data in a location which is then used in a floating-point operation, this often causes an “invalid operation” exception, because the processor cannot recognize the data as a floating-point number. Just to make sure.... This error also occurs if you run the compiled program outside the IDE (and thus debugger)? ---------------------------------------------------------------------- msintle · 2024-11-05 19:11 Quote from: rvk on November 05, 2024, 06:17:05 pmQuote from: msintle on November 05, 2024, 06:06:13 pmIs where it blows up! SIGFPE QuoteThe SIGFPE signal reports a fatal arithmetic error. Although the name is derived from “floating-point exception”, this signal actually covers all arithmetic errors, including division by zero and overflow. If a program stores integer data in a location which is then used in a floating-point operation, this often causes an “invalid operation” exception, because the processor cannot recognize the data as a floating-point number. Just to make sure.... This error also occurs if you run the compiled program outside the IDE (and thus debugger)? Yes ---------------------------------------------------------------------- msintle · 2024-11-05 19:15 Quote from: rvk on November 05, 2024, 06:10:21 pmQuote from: msintle on November 05, 2024, 05:46:50 pmCan you repeat your test in a clean environment - if you don't believe in VMs, format a disposable device and run bare metal on it - it is very possible that missing dependencies could be the culprit (which is a primary advantage of VM testing). I am on a clean environment on bare metal (rpi 4, also aarch64 and debian ). Retesting wouldn't make a difference. If it's working on a system it might not be possible to make it fail. That's why the others are saying it might be an issue on specific hardware, and not a generic problem on aarch64. Maybe someone with paralels can test this. I believe you that you have a problem (others do too). But if nobody can reproduce it (especially developers) it's hard to pinpoint the exact culprit. Can you test a standard distribution of Lazarus (or use a different install script)? (I never used fpcdeluxe but use my own script.) So how did you install Lazarus on your pi? Maybe your installation added some shared objects mine didn't? ---------------------------------------------------------------------- rvk · 2024-11-05 19:31 Quote from: msintle on November 05, 2024, 08:15:57 pmSo how did you install Lazarus on your pi? Maybe your installation added some shared objects mine didn't? Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i sudo apt- get -y install make binutils build-essential gdb git zip unzipsudo apt-get -y install libx11-dev libgtk2.0-dev  # for Lazarus, includes all dependencies This will automatically install some other dependencies too. So I didn't install these but they get installed with above lines. Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i # sudo apt- get -y install libx11-dev libgdk-pixbuf2.0-dev libcairo2-dev lpango-1.0 libpangox-1.0-dev xorg-dev libatk1.0-dev libgtk2.0-dev# libgtk2.0-dev libcairo2-dev libpango1.0-dev libgdk-pixbuf2.0-dev libatk1.0-dev libghc-x11-dev# or# xorg-dev libssl-dev libx11-dev libgdk-pixbuf2.0-dev # libcairo2-dev lpango-1.0 libpangox-1.0-dev libatk1.0-dev libgtk2.0-dev But my understanding was that fpcupdeluxe also checks for these. ---------------------------------------------------------------------- msintle · 2024-11-05 19:43 I installed 4.0 RC1 from the deb packages, same result. I reset the VM to a clean slate, ran your dependency installs first, then again the DEBs; again the same result. Maybe I can try your Lazarus install scripts next? Edit: Is your pi using this install image? https://cdimage.debian.org/debian-cd/current/arm64/iso-dvd/ ---------------------------------------------------------------------- rvk · 2024-11-05 19:54 Quote from: msintle on November 05, 2024, 08:43:46 pmMaybe I can try your Lazarus install scripts next? Currently looks like this. Creates ~/dev directory and puts everything under it. Works for several architectures and systems. Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i #!/bin/bash# ======================================================# by rvk (v.1.8, 2023-09-01)# ====================================================== echo ""echo "=============================================================="echo "Running on: $(sed 's/\x0/ /' /sys/firmware/devicetree/base/model 2>/dev/null || cat /sys/devices/virtual/dmi/id/product_name 2>/dev/null || echo Unknown)" # ======================================================# setup versions, download and compile# ====================================== ================ #fpc_version="release_3_2_0"#laz_version="lazarus_2_0 _12" #fastzip=0 # repositoryfpc_git=1laz_git=1 # compilefpc_compile=1laz_compile=1 # ======================================================# check if we are running in bash instead of shps $$ 2>&1 | grep bash > /dev/null 2>&1 && echo "Running in bash. continuing..." || { echo "Not running in bash. Aborting..."; exit 1; } # ======================================================# optional use zram as swapfile# ======================================================# not done yet # ======================================================# minimal swap space needed is 1024MB# ======================================================while true; do   FREESWAP=$(free | grep -i swap | awk '{print $2}')  if [ $FREESWAP -lt 900000 ]; then     echo "=============================================================="    echo "Current swapsize is $FREESWAP"    echo "Swapsize is really small. Recomended size is 1024MB (1GB).";    echo "=============================================================="     read -n1 -p "Do you want to increase it to 1024MB (1GB) or continue without swap? [y/n/c] " yn    echo ""    case $yn in      [Cc]* ) break;;      [Yy]* ) ;;      [Nn]* ) echo >&2 "Please increase the swap space manually. Aborting..."; exit 1;;      [Qq]* ) exit 1;;    * ) echo "Please answer yes or no."; echo ""; continue;;    esac     # we can increase this if /etc/dphys-swapfile exists    [ -f /etc/dphys- swapfile ] && {      echo "=============================================================="      echo "Setting in /etc/dphys-swapfile $(cat /etc/dphys-swapfile | grep CONF_SWAPSIZE)"      echo "Increasing value and restarting swap"      sudo sed -i 's/CONF_SWAPSIZE=[0-9]*$/CONF_SWAPSIZE=1024/g' /etc/dphys- swapfile      sudo /etc/init.d/dphys-swapfile stop      sudo /etc/init.d/dphys-swapfile restart      echo "=============================================================="    } || {      echo "=============================================================="      echo "Setting up /swapfile"      DATE=$(date +%s)      sudo fallocate -l 1G "/swapfile.$DATE" \      && sudo chmod 600 "/swapfile.$DATE" \    && sudo mkswap "/swapfile.$DATE" \      && sudo swapon "/swapfile.$DATE" \      && sudo swapon --show \      && echo "Created and turned on /swapfile.$DATE" \      && echo "Note: This is not permanent."      echo "=============================================================="    }   else    echo "Current swapsize is $FREESWAP. Ok"    break;  fi done # ======================================================begin=$(date +%s) # ======================================================# update packages list to latest version# ======================================================echo "=============================================================="echo ""echo "Updating package list to latest version (sudo needed)"echo ""apt-get --version >/dev/null 2>&1 || { echo >&2 "I require apt-get but it's not installed. Aborting."; exit 1; }sudo apt-get update >/dev/null || { echo >&2 "apt-get update cannot be run. Aborting."; exit 1; } # ======================================================# some other essentials# ======================================================echo "=============================================================="echo ""echo "Installing required packages (sudo used)"echo ""sudo apt-get -y install make binutils build-essential gdb git zip unzip pvsudo apt- get -y install libx11-dev libgtk2.0-dev  # for Lazarus, includes all dependencies # sudo apt-get -y install libx11-dev libgdk-pixbuf2.0-dev libcairo2-dev lpango-1.0 libpangox-1.0-dev xorg-dev libatk1.0-dev libgtk2.0-dev# libgtk2.0-dev libcairo2-dev libpango1.0-dev libgdk- pixbuf2.0-dev libatk1.0-dev libghc-x11-dev# or# xorg-dev libssl-dev libx11-dev libgdk-pixbuf2.0-dev # libcairo2-dev lpango-1.0 libpangox-1.0-dev libatk1.0-dev libgtk2.0-dev git --version >/dev/null 2>&1 || { echo >&2 "I require git but it's not installed. Aborting."; exit 1; } # ======================================================## = =====================================================BASE=$HOME/devmkd ir -p $BASEcd $BASE # ======================================================# We need a bootstrap compiler fpc 3.2.2# There is NONE AVAILABLE so we need to download complete# fpc-3.2.2.arm-linux-raspberry1wq.tar# in virtualbox Rasbian stretch we need i386# ====================================================== echo "=============================================================="echo ""CPU=$(uname -m)                  # aarch64, armv7l # note L not 1CPU=$(dpkg --print-architecture) # arm64, armhfif [ "$CPU" = "armhf" ]; then # note L not 1  echo "Compiling for ARMv7 Processor (Pi2 and higher only)"  OPTIONS_FPC="-g -gl -gw3 -O2 -Xs -CX -XX -v0 -dFPC_ARMHF"  OPTIONS_LAZ="-g -gl -gw3 -v0"  OS_TARGET="linux"  CPU_TARGET="arm"  COMP3_DOWNLOAD="fp-compiler" # distribution version  COMP3_DOWNLOAD="https://downloads.freepascal.org/fpc/dist/3.2.2/arm- linux/fpc-3.2.2.arm-linux.tar" # complete version  COMP=ppcarmelif [ "$CPU" = "arm64" ]; then  echo "Compiling for ARM64 Processor (Pi2 and higher only)"  OPTIONS_FPC="-g -gl -gw3 -O2 -Xs -CX -XX -v0 -dFPC_ARMHF"  OPTIONS_LAZ="-g -gl -gw3 -v0"  OS_TARGET="linux"  CPU_TARGET="aarch64"  COMP3_DOWNLOAD="fp-compiler" # distribution version  COMP3_DOWNLOAD="https://downloads.freepascal.org/fpc/dist/3.2 .2/aarch64-linux/fpc-3.2.2.aarch64-linux.tar" # complete version  COMP=ppca64elif [ "$CPU" = "amd64" ]; then  echo "Compiling for x64 Processor"  OPTIONS_FPC="-g -gl -gw3 -O2 -Xs -CX -XX -v0"  OPTIONS_LAZ="-g -gl -gw3 -v0"  OS_TARGET="linux"  CPU_TARGET="x86_64"  COMP3_DOWNLOAD="https://downloads.freepascal.org/fpc/dist/3.2.2/x86_64 -linux/fpc-3.2.2.x86_64-linux.tar" # complete version  #COMP3_DOWNLOAD ="https://downloads.freepascal.org/fpc/dist/3.2.0/x86_64-linux/fpc- 3.2.0-x86_64-linux.tar" # complete version  COMP=ppcx64elif [ "$CPU" = "i686" ]; then  echo "Compiling for i686 Processor"  OPTIONS_FPC="-g -gl -gw3 -O2 -Xs -CX -XX -v0 -dFPC_I386"  OPTIONS_LAZ="-g -gl -gw3 -v0"  OS_TARGET="linux"  CPU_TARGET="i386"  COMP3_DOWNLOAD="https://do wnloads.freepascal.org/fpc/dist/3.2.2/i386-linux/fpc-3.2.2.i386- linux.tar" # complete version  COMP=ppc386else  echo >&2 "$CPU is not supported as processor (needed armv7l/x86_64/i686). Aborting."; exit 1;fi # ------------------------------------------------------ echo "=============================================================="if [ ! -x ./bootstrap/$COMP ]; then   if echo "$COMP3_DOWNLOAD" | grep -q "fp-compiler"; then     echo "Downloading package fp-compiler-3.2.2"  echo ""    mkdir -p ./bootstrap    apt-get download fp- compiler-3.2.2    dpkg-deb --fsys-tarfile fp-compiler*.deb | tar -x ./usr/lib/arm-linux-gnueabihf/fpc/3.2.2/ppcarm --strip-components 6  mv ppcarm ./bootstrap    rm ./fp-compiler*.deb   else     echo "Downloading compiler 3.2.2"    echo ""    wget --continue --quiet --show-progress -O- $COMP3_DOWNLOAD |\    tar -O -xf- --wildcards --no-anchored "binary*-linux.tar" --strip=1 |\    tar -O -xf- --wildcards --no-anchored "base.*-linux.tar.gz" |\    tar -xzf- --wildcards --no-anchored "lib/fpc/*/ppc*" --transform "s|lib/fpc/.*/ppc|./bootstrap/ppc|"   fi  fi[ -x ./bootstrap/$COMP ] || { echo >&2 "Bootstrap $BASE/bootstrap/$COMP compiler not found. Aborting."; exit 1; } echo "Using bootstrap $BASE/bootstrap/$COMP compiler"echo "" # ======================================================# downloading fpc and lazarus# ======================================================if [ "$zip" = "1" ]; then   sudo wget -O /usr/bin/zram.sh https://raw.githubusercontent.com/novaspirit/rpi_zram/master/zram.sh   wget --continue --quiet --show-progress -O fpc.zip "https://gitlab.com/freepascal.org/fpc/source/-/archive/main/source- main.zip"  wget --continue --quiet --show-progress -O laz.zip "https:/ /gitlab.com/freepascal.org/lazarus/lazarus/-/archive/main/lazarus- main.zip"  unzip fpc.zip  unzip laz.zip  mv lazarus-main lazarus  mv source-main fpc else   if [ "$fpc_git" = "1" ]; then     echo "=============================================================="    echo ""    echo "Downloading FPC sources $(git -C fpc log -1 2>&1 | grep Date)"    echo ""    [ -d ./fpc ] && { git -C fpc reset --hard && git -C fpc pull -q; } || { git clone https://gitlab.com/freepascal.org/fpc/source.git fpc; }    [ -f ./fpc/Makefile ] || { echo >&2 "Download of fpc failed. Aborting."; exit 1; }    echo "Now: $(git -C fpc log -1 | grep Date 2>&1)"    echo ""   fi   if [ "$laz_git" = "1" ]; then     echo "Downloading Lazarus sources $(git -C lazarus log -1 2>&1 | grep Date)"    [ -d ./lazarus ] && { git -C lazarus reset --hard && git -C lazarus pull -q; } || { git clone https://gitlab.com/freepascal.org/lazarus/lazarus.git lazarus; }    [ -f ./lazarus/Makefile ] || { echo >&2 "Download of fpc failed. Aborting."; exit 1; }    echo "Now: $(git -C lazarus log -1 | grep Date 2>&1)"    echo ""   fi   if [ "$fpc_version" != "" ]; then    echo "Switch to fpc $fpc_version"    git -C fpc checkout tags/$fpc_version  fi   if [ "$laz_version" != "" ]; then    echo "Switch to lazarus $laz_version"    git -C lazarus checkout tags/$laz_version  fi fi # ======================================================# compiling fpc# ======================================================if [ "$fpc_compile" = "1" ]; then echo "=============================================================="echo ""echo "Now compiling FPC, this will take some time"echo ""cd $BASE/fpc echo "Cleaning up"# find . -name "*.ppu" -type f -delete# find . -name "*.o" -type f -delete# make clean distclean cleanall > /dev/null 2>&1git clean -xdf > /dev/null 2>&1    # will clean untracked files and directories echo "make -s all install OPT=\"$OPTIONS_FPC\" OS_TARGET=$OS_TARGET CPU_TARGET=$CPU_TARGET INSTALL_PREFIX=$BASE/fpc PP=$BASE/bootstrap/$COMP" make -s all install OPT="$OPTIONS_FPC" OS_TARGET=$OS_TARGET CPU_TARGET=$CPU_TARGET INSTALL_PREFIX=$BASE/fpc PP=$BASE/bootstrap/$COMP \  | pv -l -bp -s2500 >$BASE/fpc.log \  || { echo >&2 "Compilation of FPC failed. Aborting."; exit 1; }cd $BASE[ -x ./fpc/bin/fpc ] || { echo >&2 "Something went wrong compiling FPC. Aborting."; exit 1; } echo ""echo "Doing some extra configuration" # remove old config[ -f $HOME/.fpc.cfg ] && rm $HOME/.fpc.cfgln -sf $(find $BASE/fpc/lib -name $COMP    ) $BASE/fpc/bin/$COMPln -sf $(find $BASE/fpc/lib -name samplecfg) $BASE/fpc/bin/samplecfg# ln -sf $BASE/fpc/lib/fpc/3.3.1/$COMP $BASE/fpc/bin/$COMP# ln -sf $BASE/fpc/lib/fpc/3.3.1/samplecfg $BASE/fpc/bin/samplecfg$BASE/fpc/bin/fpcmkcfg -d basepath=$BASE/fpc -o $HOME/.fpc.cfg # sudo find / -name crtbegin.o# This library needs to be added to the fpc.cfg file. cat << EOF >> $HOME/.fpc.cfg- Fu$BASE/fpc/lib/fpc/\$fpcversion/units/\$fpctarget-Fu$BASE/fpc/lib/fpc /\$fpcversion/units/\$fpctarget/*- Fu$BASE/fpc/lib/fpc/\$fpcversion/units/\$fpctarget/rtl-Fl$(find / -name crtbegin.o -printf '%h\n' 2>/dev/null | head -n 1)-FD$BASE/fpc/binEOF echo ""echo "Doing some extra configuration"echo "" # set path withhout old fpcPATH=$(echo $PATH | sed "s|$BASE/fpc/bin\:||g") # strip previous $BASE from .profilesed -i '/# FPC PATH/,/fi/d' $HOME/.profile cat << EOF >> $HOME/.profile # FPC PATHif [ -d $BASE/fpc/bin ] ; then    PATH="$BASE/fpc/bin:\$PATH"fiEOF # replace all double empty lines with onesed -i '/^$/N;/^\n$/D' $HOME/.profile echo "" fi # ======================================================# compiling lazarus# ======================================================if [ "$laz_compile" = "1" ]; then echo "=============================================================="echo ""echo "Now compiling Lazarus, this will take some time"echo ""cd $BASE/lazarus echo "Cleaning up"# find . -name "*.ppu" -type f -delete# find . -name "*.o" -type f -delete# make clean distclean cleanall > /dev/null 2>&1git clean -xdf > /dev/null 2>&1    # will clean untracked files and directories echo "make -s bigide OS_TARGET=$OS_TARGET CPU_TARGET=$CPU_TARGET OPT=\"$OPTIONS_LAZ\" PP=$BASE/fpc/bin/fpc" make -s bigide OS_TARGET=$OS_TARGET CPU_TARGET=$CPU_TARGET OPT="$OPTIONS_LAZ" PP=$BASE/fpc/bin/fpc \  | pv -l -bp >$BASE/laz.log \  || { echo >&2 "Compilation of Lazarus failed. Aborting."; exit 1; }cd $BASE[ -f ./lazarus/lazarus ] || { echo >&2 "Something went wrong compiling Lazarus. Aborting."; exit 1; } echo ""echo "Creating desktop icon"echo "" cat << EOF > $HOME/Desktop/Lazarus.desktop[Desktop Entry]Name=LazarusComment=Lazaru sIcon=$BASE/lazarus/images/ide_icon48x48.pngExec=$BASE/lazarus/startla zarusPath=$BASE/lazarusType=ApplicationEncoding=UTF- 8Terminal=falseCategories=None;EOF fi end=$(date +%s)echo "=============================================================="echo ""echo "$((($end-$begin) / 60)) minutes and $((($end-$begin) % 60)) seconds elapsed."echo ""echo "We are done. Please logout and back in before starting Lazarus"echo "Otherwise you need to supply the fpc location on 1st start"echo ""echo "=============================================================="echo "" ---------------------------------------------------------------------- msintle · 2024-11-05 20:48 No joy, exactly the same outcome sadly. Here's the execution output in the terminal (what happens when I click the file open button on the Lazarus toolbar): Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i TApplication.HandleException: EAccessViolationAccess violation  Stack trace:  $0000FFFFA963B7CC  $0000FFFFA96418DC  $0000FFFFA9641AF0  $0000FFFFA962B568  $0000FFFFA962E7A8  $0000FFFFA9AC1638  $0000000000522420  EnableWindow,  line 2850 of gtk2winapi.inc  $00000000005931C0  EnableWindow,  line 235 of include/winapi.inc  $00000000004A5B14  EnableForms,  line 453 of include/screen.inc  $000000000059BE1C  Execute,  line 44 of include/commondialog.inc  $00000000004CBF80  mnuOpenClicked,  line 3319 of main.pp  $0000000000A39B04  DoOnClick,  line 1715 of idecommands.pas  $0000000000A39B34  DoOnClick,  line 1720 of idecommands.pas  $0000000000D0308C  Click,  line 681 of toolbarintf.pas  $0000000000637724  MouseUp,  line 176 of include/toolbutton.inc  $00000000005CE6E4  DoMouseUp,  line 2364 of include/control.inc  $00000000005CF4A4  WMLButtonUp,  line 2846 of include/control.inc ---------------------------------------------------------------------- rvk · 2024-11-05 21:30 Longshot and I'm almost sure it doesn't help... but... Can you set the initial directory to something hardcoded. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i OpenDialog1.InitialDir := 'myDefault_Path';OpenDialog1.Execute;(myDefault_Path beeing something you are sure to have access to) (We're just guessing here but without being able to reproduce this it's all just a guessing game ) Maybe you can also try setting that exceptionmask. Not sure if this is the correct way (I don't know much about that setexceptionmask). Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   FPUExceptionMask := GetExceptionMask;  SetExceptionMask( [exInvalidOp, exOverflow, exPrecision, exZeroDivide] );  try    Opendialog1.Execute;  finally    SetExceptionMask(FPUExceptionMask);  end; ---------------------------------------------------------------------- marcov · 2024-11-05 21:40 Just remove most of those ex* in the setexceptionmask for testing. If that changes anything, then bring them back one by one till you know which one. ---------------------------------------------------------------------- msintle · 2024-11-05 23:35 Holy cow - that worked, folks! However, strap in your seatbelts - it gets trippy. I tested all of these masks: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i exInvalidOp ,exDenormalized,exZeroDivide,exOverflow,exUnderflow,exPrecision Hoping to report the problematic item. The exact code I used: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i SetExceptionMask( [exInvalidOp, exOverflow, exPrecision, exZeroDivide, exUnderflow, exDenormalized] ); It *still* worked! BUT, if I comment that line out, the crash happens again. Does that make any sense? Forum lizards, please don't hold back on my account! Edit: The default exception mask is NOT equivalent to all of the defined masks above. The debugger trims the exact enumeration and a memory dump shows "32". Falling 10 short of the meaning of life, I'm afraid. Ah, but it's hex; of course. The all inclusive mask is "3F". So is the issue then that the original mask is too narrow? ---------------------------------------------------------------------- msintle · 2024-11-05 23:53 BTW for completeness sake I also installed Debian 12.7 inside VMware from that download URL I referenced above and reproduced the same crash inside it as well. So the mystery to me is why it works on Pi, but oh well. Happy to leave that unresolved and thanking you folks very much for your generous workaround. ---------------------------------------------------------------------- rvk · 2024-11-06 00:22 Quote from: msintle on November 06, 2024, 12:35:46 amCode: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i SetExceptionMask( [exInvalidOp, exOverflow, exPrecision, exZeroDivide, exUnderflow, exDenormalized] ); It *still* worked! BUT, if I comment that line out, the crash happens again. You are suppressing any such exception from the framework (I think that's how it works). So it's logical that it works then. Try Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i SetExceptionMask( [] );and then adding them one by one until the error happens again. Glad it works but we still need to know why this is because it can mask an underlying problem. I'll try the same lines tomorrow on my pi to see if that can reproduce the error somehow. ---------------------------------------------------------------------- TRon · 2024-11-06 00:28 Quote from: rvk on November 06, 2024, 01:22:45 amYou are suppressing any such exception from the framework (I think that's how it works). So it's logical that it works then. That is correct. The function disables the corresponding exceptions. ---------------------------------------------------------------------- msintle · 2024-11-06 00:32 Quote from: TRon on November 06, 2024, 01:28:19 amQuote from: rvk on November 06, 2024, 01:22:45 amYou are suppressing any such exception from the framework (I think that's how it works). So it's logical that it works then. That is correct. The function disables the corresponding exceptions. Oh. So I tried all of them individually, that failed. Setting a completely empty mask also failed. I can see this getting tricky as we'll be having quite a few combinations to test (6^6?) Suggestions on how to approach this programmatically? ---------------------------------------------------------------------- TRon · 2024-11-06 00:34 See also this entry in the wiki (note the link to forum discussion as well). ---------------------------------------------------------------------- msintle · 2024-11-06 00:35 Heuristically, I've determined these to be the minimum required masks: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i SetExceptionMask( [exInvalidOp, exPrecision, exZeroDivide] ); Removing anything above reproduces the crash immediately. ---------------------------------------------------------------------- rvk · 2024-11-06 00:37 What's the default of this snippet? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i uses  ..., math,... {...} var  FPUException: TFPUException;  FPUExceptionMask: TFPUExceptionMask;begin  FPUExceptionMask := GetExceptionMask;  for FPUException := Low(TFPUException) to High(TFPUException) do begin    write(FPUException, ' - ');    if not (FPUException in FPUExceptionMask) then      write('not ');     writeln('masked!');  end;  readln;end. For me it's QuoteexInvalidOp - not masked! exDenormalized - masked! exZeroDivide - not masked! exOverflow - not masked! exUnderflow - masked! exPrecision - masked! ---------------------------------------------------------------------- TRon · 2024-11-06 01:06 btw: Nice catch rvk. laz 3.6 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TGtk2WidgetSet.AppInit(var ScreenInfo: TScreenInfo);begin  {$if defined(cpui386) or defined(cpux86_64)}  // needed otherwise some gtk theme engines crash with division by zero  {$IFNDEF DisableGtkDivZeroFix}    SetExceptionMask(GetExceptionMask + [exOverflow,exZeroDivide,exInvalidOp]);  {$ENDIF}  {$ifend}...end; ---------------------------------------------------------------------- rvk · 2024-11-06 09:17 I can do anything with SetExceptionMask. No combination will fail for me. That makes me believe the problem is in the specific gtk2 framework or its interaction and combination with parallels. That is the one that generates a SIGFPE. For the gtk2 framework this is suppressed in FPC/Lazarus on intel architecture ( to not show any exception inside the GUI) because FPC/Lazarus can't fix this. So it's just a programmer problem in the GUI. Seeing the {$if defined(cpui386) or defined(cpux86_64)} in that TGtk2WidgetSet.AppInit... I guess they forgot aarch64  @msintle Does adding this line work? In that case the if defined line can just be expanded to include the arm-platform. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i SetExceptionMask(GetExceptionMask + [exOverflow,exZeroDivide,exInvalidOp]); BUT... I wonder if this is the correct way... I haven't tested this but doesn't the above line also prevent your own division by zero etc.???? Is that wanted behavior? Shouldn't the SetExceptionMask not ONLY be done when calling a certain widget-set call, and reset it directly after, so errors in your own program get catched by your own exception handling? ---------------------------------------------------------------------- rvk · 2024-11-06 09:51 Apparently for gtk3 and the qt5 etc. the SetExceptionMask is always done on all exceptions. No define for intel there. For gtk2 it's only done for cpui386 and cpux86_64. gtk3object.inc Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i constructor TGtk3WidgetSet.Create;var  AValue: TGValue;  i: Integer;begin  SetExceptionMask([exInvalidOp, exDenormalized, exZeroDivide, exOverflow, exUnderflow, exPrecision]);  inherited Create; qt5.pas Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i initializat ion//...SetExceptionMask([exDenormalized,exInvalidOp,exOverflow,exPrec ision,exUnderflow,exZeroDivide]);end. ---------------------------------------------------------------------- Thaddy · 2024-11-06 09:57 Rik, what is exInvalidOp doing there? Does not make sense at all. That is a bug and not related to this. For AARCH64 just the underflow and overflow need to be masked, possibly only underflow but I need to test that. The ratio behind this remark is that masking exceptions should not be the rule, but the exception. AARCH64 has some known issues over all implementations of the hardware, not fpc: the M series behaves just as bad as the Raspberry pi's. ---------------------------------------------------------------------- rvk · 2024-11-06 10:01 Quote from: Thaddy on November 06, 2024, 10:57:52 amRik, what is exInvalidOp doing there? Does not make sense at all. That is a bug and not related to this. Apparently the EInvalidOp gets raised when zero is divided by zero. If the framework does something like that internally (no idea why it should but it seems to happen) you need to mask that exception. I think that's the reason it was put in by the core-developers. QuoteNormally, dividing non-zero value by zero raises EZeroDivide exception and dividing zero by zero raises EInvalidOp. https://wiki.fr eepascal.org/Multiplatform_Programming_Guide#Gtk2_and_masking_FPU_exce ptions ---------------------------------------------------------------------- Thaddy · 2024-11-06 10:04 The latter IS a bug in fpc, because it should raise EDivisionByZero. I will try and test it. But do not mask out everything unless you know what you are masking. I believe Jonas made a similar remark a couple of years ago. ---------------------------------------------------------------------- rvk · 2024-11-06 10:12 Quote from: Thaddy on November 06, 2024, 11:04:39 amThe latter IS a bug in fpc, because it should raise EDivisionByZero. I will try and test it. But do not mask out everything unless you know what you are masking. I believe Jonas made a similar remark a couple of years ago. On Delphi 0 / 0 also generates a 'Floating point invalid operation' (EInvalidOP). Any other number divided by 0 will give a 'Floating point divide by 0' (EDivisionByZero). So changing that would deviate from Delphi. I agree that masking such exception isn't a particular good idea. But I guess this is done because of some problems in the gtk2 and qt5 frameworks. Like this topic shows a SIGFPE is generated by gtk2. Masking that will fix it. Maybe in some situation the framework also generates EInvalidOP etc at random points. There is nothing in FPC you can do about it other than masking it. But you can go ahead and discus this with the core developers to change it. ---------------------------------------------------------------------- msintle · 2024-11-06 10:15 Quote from: rvk on November 06, 2024, 10:17:17 amThat makes me believe the problem is in the specific gtk2 framework or its interaction and combination with parallels. Please trust me on this, it has nothing to do with Parallels. I already ran a test for you guys with VMware, and the issue reproduced there perfectly as well. ---------------------------------------------------------------------- msintle · 2024-11-06 10:17 Quote from: TRon on November 06, 2024, 02:06:32 ambtw: Nice catch rvk. laz 3.6 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TGtk2WidgetSet.AppInit(var ScreenInfo: TScreenInfo);begin  {$if defined(cpui386) or defined(cpux86_64)}  // needed otherwise some gtk theme engines crash with division by zero  {$IFNDEF DisableGtkDivZeroFix}    SetExceptionMask(GetExceptionMask + [exOverflow,exZeroDivide,exInvalidOp]);  {$ENDIF}  {$ifend}...end;  Thank you all for finally resolving this issue! This fits in consistently with all of my findings - that the issue happens only on aarch64, that it has nothing to do with virtualization, that it has been there for ever, etc. ---------------------------------------------------------------------- TRon · 2024-11-06 10:19 Still, at the same time I do not seem to have any issue with running on and with gtk2 on a Pi. I have tried to delve deeper into the subject parallels and discovered that some games refuse to run and produce a "invalid FPU mode", depending on parallels settings (hybrid vs strict execution and with/without admin rights) though this seems (emulating) windows related. I do not know parallels so perhaps worth a shot (can only become a misfire :-) ). The setexpceptionmask workaround seems easier. @msintle: You're welcome but actually it is rvk that provided the (most) important clue. ---------------------------------------------------------------------- Thaddy · 2024-11-06 10:33 Quote from: rvk on November 06, 2024, 11:12:23 amOn Delphi 0 / 0 also generates a 'Floating point invalid operation' (EInvalidOP). No, Delphi reports it as NaN and at runtime. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program Project1;{$APPTYPE CONSOLE}begin  writeln (0/0);  readln;end. Tested D7 and 12.2. ---------------------------------------------------------------------- rvk · 2024-11-06 10:38 Quote from: Thaddy on November 06, 2024, 11:33:29 amCode: [Select][quote author=rvk link=topic=68845.msg537079#msg537079 date=1730887943] On Delphi 0 / 0 also generates a 'Floating point invalid operation' (EInvalidOP). [/quote]  No, Delphi reports it as NaN and at runtime. [coode=pascal]program Project1; {$APPTYPE CONSOLE} begin   writeln (0/0);   readln; end. Tested D7 and 12.2. Try this example on Delphi. I'm sure it will generate a EInvalidOp: QuoteProject Project1.exe raised exception class EInvalidOp with message 'Invalid floating point operation at address 0040C10E'. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program Project1;{$APPTYPE CONSOLE}var  I: Integer;  F: Double;begin  I := 0;  F := I / I;  writeln (F);  readln;end. ---------------------------------------------------------------------- msintle · 2024-11-06 11:54 Do we know yet why this report never reproduced on pi? ---------------------------------------------------------------------- rvk · 2024-11-06 12:02 Quote from: msintle on November 06, 2024, 12:54:41 pmDo we know yet why this report never reproduced on pi? That's deep in gtk2 (where the SIGFPE occurs). This could be due to a lot of (internal) factors. My current version is debian version for pi is 12.2 but I should be able to trash that pi soon (and can experiment on it). ---------------------------------------------------------------------- msintle · 2024-11-06 12:16 Anyways, thanks to everyone for their help in nailing this one down. We've made Lazarus all the better for it, I believe it was quite an embarrassment for it to not have working common file/folder dialogs on all aarch64 Linux platforms! ---------------------------------------------------------------------- rvk · 2024-11-06 16:34 Quote from: msintle on October 10, 2024, 12:42:57 amNow trying the GTK2 binary on Ubuntu 24.01, 22.04, etc. reproduces the issue instantly. The Qt5 sample doesn't run at all on Ubuntu, of course. Why wouldn't the sample for Qt5 not run on Ubuntu? Of course you need to install some qt5 dependencies but it should be possible. (We already figured out it was only on gtk2 but I thought I mention it ) O, and just FYI. I just installed Ubuntu 24.10 on bare metal Raspberry pi 4 2GB (before I repurpose that pi). The problem still doesn't occur there Lots of fun... when an error only happens in certain circumstances ---------------------------------------------------------------------- marcov · 2024-11-06 16:48 Quote from: Thaddy on November 06, 2024, 11:04:39 amThe latter IS a bug in fpc, because it should raise EDivisionByZero. I will try and test it. But do not mask out everything unless you know what you are masking. I believe Jonas made a similar remark a couple of years ago. (it also depends on how much context/information the signal handler gets to derive the exact kind of SIGFPE. I can remember that with the initial FreeBSD implementation that was quite a journey, since not much was documented) ---------------------------------------------------------------------- msintle · 2024-11-06 20:17 Quote from: rvk on November 06, 2024, 05:34:14 pmQuote from: msintle on October 10, 2024, 12:42:57 amNow trying the GTK2 binary on Ubuntu 24.01, 22.04, etc. reproduces the issue instantly. The Qt5 sample doesn't run at all on Ubuntu, of course. Why wouldn't the sample for Qt5 not run on Ubuntu? Of course you need to install some qt5 dependencies but it should be possible. (We already figured out it was only on gtk2 but I thought I mention it ) O, and just FYI. I just installed Ubuntu 24.10 on bare metal Raspberry pi 4 2GB (before I repurpose that pi). The problem still doesn't occur there Lots of fun... when an error only happens in certain circumstances for cute five, I use Kali and Fedora - no issues with either, regarding the common dialogs (they already have all the dependencies installed out of the box [I see that either GTK2 or Qt5 builds work on 95% of distributions]). I honestly have no clue why your pi is such an exception, I bet if you virtualized Linux there, you'd be able to reproduce the problem. ---------------------------------------------------------------------- rvk · 2024-11-07 13:34 Quote from: msintle on November 06, 2024, 09:17:55 pmI honestly have no clue why your pi is such an exception, I bet if you virtualized Linux there, you'd be able to reproduce the problem. You lost that bet  I also installed Ubuntu 20.04 in a virtual machine (on Proxmox 8 on Rasbian lite). Still no problem. BTW. Is VMWare free now? I couldn't find VMware ESXi to install on the pi (whole flings.vmware.com seems to be down). I also couldn't find Ubuntu Desktop for ARM. (RPI has a Ubuntu Desktop image in its own Raspberry pi imager but I couldn't find a normal clean download for ARM) So I now installed Ubuntu Server (which can be found easily) and converted it to ubuntu-desktop (which didn't reproduce the problems). (my script said: Running on: KVM Virtual Machine under proxmox so it is virtualized.) ---------------------------------------------------------------------- msintle · 2024-11-07 13:43 Quote from: rvk on November 07, 2024, 02:34:18 pmQuote from: msintle on November 06, 2024, 09:17:55 pmI honestly have no clue why your pi is such an exception, I bet if you virtualized Linux there, you'd be able to reproduce the problem. You lost that bet  I also installed Ubuntu 20.04 in a virtual machine (on Proxmox 8 on Rasbian lite). Still no problem. BTW. Is VMWare free now? I couldn't find VMware ESXi to install on the pi (whole flings.vmware.com seems to be down). I also couldn't find Ubuntu Desktop for ARM. (RPI has a Ubuntu Desktop image in its own Raspberry pi imager but I couldn't find a normal clean download for ARM) So I now installed Ubuntu Server (which can be found easily) and converted it to ubuntu-desktop (which didn't reproduce the problems). (my script said: Running on: KVM Virtual Machine under proxmox so it is virtualized.) Wouldn't be the first bet I've lost, for sure; but - I'd try with the latest Ubuntu versions (24.x) just for good measure. Martin also mentioned several scenarios he's seen with Lazarus behaving differently under virtualization - so I'm more than happy to stand corrected, as ever. VMware is free on macOS (it's called VMware Fusion), probably because the product is subpar quality compared to Parallels. I've always used the Parallels automated download process for Ubuntu desktop releases so never really had to dig manually. I tried the manual digging approach now and, joy, it's hell. Couldn't figure it out! Maybe just try with Debian aarch64 instead, which also reproduces for me? 12.6. ---------------------------------------------------------------------- rvk · 2024-11-07 18:30 Quote from: msintle on November 07, 2024, 02:43:39 pmWouldn't be the first bet I've lost, for sure; but - I'd try with the latest Ubuntu versions (24.x) just for good measure.24.04 is the latest LTS. And I don't really think 24.10 would make any difference (and you said you could also reproduce it on 22.04). Quote from: msintle on November 07, 2024, 02:43:39 pmVMware is free on macOS (it's called VMware Fusion), probably because the product is subpar quality compared to Parallels.I can't download VMWare anywhere. Also not VMWare ESXi (broken links and pages) and I don't think VMWare Fusion can run on a pi. Quote from: msintle on November 07, 2024, 02:43:39 pmMaybe just try with Debian aarch64 instead, which also reproduces for me? 12.6. I just fired up a version of Debian 12.7 (latest) in proxmox. Also works  So I guess I'm out of ideas and this can't be reproduced here on aarch64 (virtual or bare metal). ---------------------------------------------------------------------- msintle · 2024-11-07 19:38 Quote from: rvk on November 07, 2024, 07:30:18 pmSo I guess I'm out of ideas and this can't be reproduced here on aarch64 (virtual or bare metal). I believe now is when we throw in the proverbial towel. ---------------------------------------------------------------------- Martin_fr · 2024-11-07 20:04 Ok, most likely this is not a match to the issue here. I throw it in anyway. Just in case.... There is an issue (apparently mainly) with modal forms: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/41041 File dialogs are modal. Depending on the Windowmanager, and the exact versions of whatever libraries are involved => its possible that its triggering this. My - frankly extremely limited - understanding is, that in most cases the routines in gtk recognize the wrong data, and give some error and think work out. But, that isn't guaranteed. Another approach might be: valgrind. (if that is avail for arch) If by any chance any data is freed or uninitialized, then valgrind may identify that, even if the access to it happens deep in gtk. But, you also will get a lot of noise, as in most cases gtk itself triggers warnings. ---------------------------------------------------------------------- TRon · 2024-11-07 20:46 Quote from: rvk on November 07, 2024, 07:30:18 pmI can't download VMWare anywhere. Also not VMWare ESXi (broken links and pages) and I don't think VMWare Fusion can run on a pi. Probably to do with the fact that vmware was acquired by broadcom. Their clients are dropped in favour of some open source kvm software now. I did not manage to store all details on that topic into my brain ---------------------------------------------------------------------- rvk · 2024-11-07 21:16 Yeah, that's why I used Proxmox to test it on the pi. Proxmox uses QEMU/KVM under the hood for full virtualization. You could use QEMU on Windows x64 to emulate aarch64 but then you would really have emulation, not virtualization. I wonder how slow that will be ---------------------------------------------------------------------- msintle · 2024-11-14 10:45 Quote from: Martin_fr on November 07, 2024, 09:04:19 pmOk, most likely this is not a match to the issue here. I throw it in anyway. Just in case.... There is an issue (apparently mainly) with modal forms: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/41041 File dialogs are modal. Depending on the Windowmanager, and the exact versions of whatever libraries are involved => its possible that its triggering this. My - frankly extremely limited - understanding is, that in most cases the routines in gtk recognize the wrong data, and give some error and think work out. But, that isn't guaranteed. Another approach might be: valgrind. (if that is avail for arch) If by any chance any data is freed or uninitialized, then valgrind may identify that, even if the access to it happens deep in gtk. But, you also will get a lot of noise, as in most cases gtk itself triggers warnings. I'm afraid you may be correct. Our QA ran additional tests on x86_64 Linux platforms with GTK2 and Qt5, and we ran into similar issues, lockups, freezes across some choice variants: aarch64 GTK2 Ubuntu & Kali: Random freezes, which happen when you, for example, cancel out of some modal dialogs (not even common file dialogs) we show on  our own; but don't happen when you take other actions (completing the modal dialog actions) without cancelling them. x86_64 Qt5 Centos, Fedora: Random crashes after a common file dialog is shown successfully - whereby the entire app immediately terminates. To be fair, the workaround code above was only implemented for the aarch64 platform, so it may have prevented these issues as well. We're doing further testing to clarify. At any rate, running Lazarus itself on affected platforms consistently reproduces the issues, sooner or later (ex: you can just delve into the Lazarus settings dialog, and/or use its standard file dialog boxes, to easily reproduce the crashes as mentioned earlier). The problems also tend to reproduce with more complex projects, and can be somehow far more elusive in simpler projects. I realize all of this is anecdotal evidence so please by all means feel free to treat it as such, I am primarily just confirming Martin_fr's suspicions here. ---------------------------------------------------------------------- msintle · 2024-11-14 10:48 Quote from: TRon on November 07, 2024, 09:46:24 pmQuote from: rvk on November 07, 2024, 07:30:18 pmI can't download VMWare anywhere. Also not VMWare ESXi (broken links and pages) and I don't think VMWare Fusion can run on a pi. Probably to do with the fact that vmware was acquired by broadcom. Their clients are dropped in favour of some open source kvm software now. I did not manage to store all details on that topic into my brain  News today is that Broadcom, probably to manage their spiraling PR scandal, has made VMware Workstation 100% free (as Fusion already was), together with the promise of regular updates. You get this sign-in page: https://access.broadcom.com/default/ui/v1/signin/ After which apparently products are available for download for all platforms. VMware's still my #1 choice on Windows, as I find Hyper-V absolutely insufferable. ---------------------------------------------------------------------- msintle · 2024-11-14 10:49 Quote from: rvk on November 07, 2024, 10:16:41 pmYeah, that's why I used Proxmox to test it on the pi. Proxmox uses QEMU/KVM under the hood for full virtualization. You could use QEMU on Windows x64 to emulate aarch64 but then you would really have emulation, not virtualization. I wonder how slow that will be Is QEMU actually a hypervisor now, I thought it was always emulating everything? That could certainly explain why you're seeing (partially at least) different behavior, but I've been out of the QEMU loop so it may have well become its own hypervisor. ---------------------------------------------------------------------- Martin_fr · 2024-11-14 11:33 Run it from a console, so you can see if any warnings a printed. Also there is a (I think) --sync option, and then if a stacktrace is printed it should be useful (assuming you also have debug info, and can resolve it). For all else, and even the results of above debug stuff, I need to leave that to those with more Linux experience than me. ---------------------------------------------------------------------- rvk · 2024-11-14 12:04 Quote from: msintle on November 14, 2024, 11:49:51 amIs QEMU actually a hypervisor now, I thought it was always emulating everything?It does under different architecture. But on the same it will virtualize. Quote from: msintle on November 14, 2024, 11:49:51 amThat could certainly explain why you're seeing (partially at least) different behavior, but I've been out of the QEMU loop so it may have well become its own hypervisor. No, because running on bare metal rpi I also don't have this behavior. ---------------------------------------------------------------------- TRon · 2024-11-14 12:09 Quote from: rvk on November 14, 2024, 01:04:11 pmNo, because running on bare metal rpi I also don't have this behavior. +1 and the more reason to 'blame' it on the virtualization software  (and not on the odd one out situation for rvk as no one has ever complained and it also works for me tm ). Have you @msintle actually ever ran compiled code on such architecture natively ? Does it then produce these error(s) in a similar manner ? ---------------------------------------------------------------------- robert rozee · 2024-11-14 13:47 my 2 cents worth: i'm reasonably happy that what msintle is seeing is quite real, and don't really think that it matters too much if the problem is related to virtualization causing misbehavior or real hardware masking it. running in a VM is perfectly legitimate - indeed, it may become even more common on desktops in future - and any misbehavior, no matter what exposes it, warrants an investigation into locating the root cause. my feeling is that somewhere deep within GTK2 and Qt5 lies a bug that is causing the behavior that msintle has encountered, and that as both GTK2 and Qt5 are free open-source software, it is quite conceivable that both projects have borrowed large chunks of source code from the other; said bug will almost certainly be located in a block of such shared code. as an aside, for years i have randomly observed GTK throw various error messages when a GUI application is run from the console (including, but not exclusive to, applications created with FPC/Lazarus), but the big difference is that throwing these error messages is a well known behavior, and the solution, i've been informed by numerous folks, is to just ignore them. the GUI application will still work fine, and who runs a GUI application from the console anyway? might i suggest a possible way forward: given that the chances of any of us being able to 'fix' GTK2 or Qt5 are at best slim, has anyone thought of simply writing replacement dialogs? surely these dialogs are not rocket science, and definitely not high-performance. how hard could it be to write a handful of replacements that could be slotted in place of the ones provided by GTK2/Qt5? and remember, we have at least one person amongst us who is able to generate a list of problematic dialogs that are in need of replacement! cheers, rob   :-) ---------------------------------------------------------------------- rvk · 2024-11-14 13:53 Quote from: robert rozee on November 14, 2024, 02:47:47 pmmy 2 cents worth: i'm reasonably happy that what msintle is seeing is quite real, and don't really think that it matters too much if the problem is related to virtualization causing misbehavior or real hardware masking it. running in a VM is perfectly legitimate - indeed, it may become even more common on desktops in future - and any misbehavior, no matter what exposes it, warrants an investigation into locating the root cause.I completely agree (and we never doubted that it crashes) only nobody could reproduce it. But the solution could be as simple as to adjust the earlier segment: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TGtk2WidgetSet.AppInit(var ScreenInfo: TScreenInfo);begin  {$if defined(cpui386) or defined(cpux86_64)}  // needed otherwise some gtk theme engines crash with division by zero  {$IFNDEF DisableGtkDivZeroFix}    SetExceptionMask(GetExceptionMask + [exOverflow,exZeroDivide,exInvalidOp]);  {$ENDIF}  {$ifend}...end; To this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TGtk2WidgetSet.AppInit(var ScreenInfo: TScreenInfo);begin  {$if defined(cpui386) or defined(cpux86_64) or defined(aarch64)}  // needed otherwise some gtk theme engines crash with division by zero  {$IFNDEF DisableGtkDivZeroFix}    SetExceptionMask(GetExceptionMask + [exOverflow,exZeroDivide,exInvalidOp]);  {$ENDIF}  {$ifend}...end;  Although it would be useful to know if this would also happen on arm 32 bit. In that case defined(arm) should also be added. But the only way to know if this is a correct fix is for msintle to do this and compile a trunk version of Lazarus and test this with the Lazarus IDE itself. ---------------------------------------------------------------------- TRon · 2024-11-14 14:08 Quote from: robert rozee on November 14, 2024, 02:47:47 pmmy 2 cents worth: .. I do not disagree with that assessment (*) Alas, it currently is as rvk wrote. A possible solution (bug/oversight ?) is already suggested and it is not possible (at least for me) to recreate the issues that msintle seem to experience (issues which I do not dispute either). In order to approach the issue some fundamental testing needs to be done first otherwise it just becomes a goose-chase with as possible outcome a wrong fix. That the suggested workaround seems to work is not a guarantee it is the actual cause for the issues as experienced (though at first glance it sure does look like the VM software or the OS is resetting the flags). edit: (*) would be interesting to know how you would classify the host shares issues with VirtualBox (because their driver sucks and causes all sort of issues because of that) ---------------------------------------------------------------------- robert rozee · 2024-11-14 14:51 Quote from: rvk on November 14, 2024, 02:53:34 pmBut the solution could be as simple as to adjust the earlier segment [...] To this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TGtk2WidgetSet.AppInit(var ScreenInfo: TScreenInfo);begin  {$if defined(cpui386) or defined(cpux86_64) or defined(aarch64)}  // needed otherwise some gtk theme engines crash with division by zero  {$IFNDEF DisableGtkDivZeroFix}    SetExceptionMask(GetExceptionMask + [exOverflow,exZeroDivide,exInvalidOp]);  {$ENDIF}  {$ifend}...end; while it does seem to be the 'accepted' solution (for i386 and x86_64), such an approach does give me the heebie-jeebies! question: when you set up the exception mask at the point of application initialization, can you then guarantee that the mask will not be changed later on? intuitively, i'd have thought a much safer approach would be to set up the mask before making each call into GTK code and restore it after the return from each call - as rvk suggest back in Reply #51. what happens if your program makes use of a library that changes the mask? and is the exception mask similarly adjusted in the application initialization code when using Qt5? if not, would doing so help? cheers, rob   :-) ---------------------------------------------------------------------- rvk · 2024-11-14 15:10 Quote from: robert rozee on November 14, 2024, 03:51:49 pmwhile it does seem to be the 'accepted' solution (for i386 and x86_64), such an approach does give me the heebie-jeebies!The current exclusion of those exception for cpui386 and cpux86_64 also give me the heebie- jeebies  Why was this added to gtk2 anyway? Masking exception is something you would do as a last resort. I'm not sure if the reason for adding these for the intel architecture on gtk2 is documented and even still needed. Maybe they can be fixed another way or maybe they were added just because of a similar problem like is now surfacing on aarch64. If so, adding aarch64 would be fine, but I agree, it would be better to not something like this (hiding exceptions thrown by the OS). Quote from: robert rozee on November 14, 2024, 03:51:49 pmquestion: when you set up the exception mask at the point of application initialization, can you then guarantee that the mask will not be changed later on? intuitively, i'd have thought a much safer approach would be to set up the mask before making each call into GTK code and restore it after the return from each call - as rvk suggest back in Reply #51. what happens if your program makes use of a library that changes the mask?Yes, for something like a dialog this would be perfectly fine. But for something like a Gtk2.Draw funtion, this could give a huge performance hit. So it's better we first know WHY the masking of these exceptions where included to begin with. Quote from: robert rozee on November 14, 2024, 03:51:49 pmand is the exception mask similarly adjusted in the application initialization code when using Qt5? if not, would doing so help?I thought from TS that there was no problem under Qt5 ? ---------------------------------------------------------------------- TRon · 2024-11-14 15:15 heebie-jeebies already discussed: https://wiki.freepascal.org/Multipla tform_Programming_Guide#Gtk2_and_masking_FPU_exceptions ---------------------------------------------------------------------- rvk · 2024-11-14 15:41 Quote from: TRon on November 14, 2024, 04:15:53 pmheebie-jeebies already discussed: https://wiki.freepascal.org/Multiplatform_Programmi ng_Guide#Gtk2_and_masking_FPU_exceptions  QuoteIf the Gtk2 widgetset adds this masking it is most likely because it was necessary, because someone in the past had trouble without this code. Gtk2 is a C library and depending on its version and compilation (or maybe always?), C libraries might crash if we throw exceptions to zero divizions. So in general, I doubt that simply removing the code that does this will be a safe solution. Well... isn't that exactly what's happening here (someone getting an exception in the OS, i.e. dialog). QuoteGTK2 cannot be run with exceptions enabled because the C code assumes that exceptions are turned off. Windows gui libs does not make this assumption so exceptions can be left turned on. There is not much which can be done about this: so either use another gui library or turn on/off exceptions as your code needs them while not calling gui related stuff.So... GTK2 expects exceptions to be turned off. It doesn't say this is only for intel. So why couldn't this also be true for arm (like we see in this topic)? If masking those exceptions for the intel systems wasn't that bad of a solution, adding it for the aarch64 shouldn't be either. True... it needs to be tested... but why have these masking only for intel and not other architectures? Also true... I would have liked to see some more people having the same problems before actually adding those masking of exceptions. ---------------------------------------------------------------------- TRon · 2024-11-14 15:54 Quote from: rvk on November 14, 2024, 04:41:46 pmIf masking those exceptions for the intel systems wasn't that bad of a solution, adding it for the aarch64 shouldn't be either. True... it needs to be tested... but why have these masking only for intel and not other architectures? The patch/workaround existed before aarch64 was born ? QuoteAlso true... I would have liked to see some more people having the same problems before actually adding those masking of exceptions. Especially since this behaviour does not seem to apply for/to our aarch64 configurations  Note that there is more code in the FPC tree that sets the exceptionmask before making a library call (I seem to remember some xml stuff). For all we know we both have something running (or was invoked) that set the exception mask as expected for FPC but the same does not happen for msintle (for whatever reason that we currently don't know about). For me the workaround is acceptable but that little voice keep telling there's no other proof besides this one report (with VM which needs to be excluded from the equation). So yeah, if someone does run FPC natively on one of those new machines then please do test. ---------------------------------------------------------------------- msintle · 2024-11-15 11:14 Thanks for all the thoughts. Instead of replying individually I'll just consolidate everything here: - Thanks for acknowledging my reports as valid, I do very much appreciate that. - I don't have a physical Linux installation to test this on. I'm not about to wipe out macOS on my M3 Submax to do that, given how straitjacket Apple is with ostensibly my security and everything. I do have an aarch64 PC I could sacrifice, and Microsoft have just released a publicly downloadable AARCH64 ISO for Windows 11 for the first time, but that'd be still scary due to mostly lack of imaging tooling for aarch64 platform even on the Microsoft side (at least last time I checked, but it's been a couple years at least). I could also easily test on x86_64 PCs with a physical Linux installation, but I am really disinclined to do so, because: - Through our QA we know the contagion has "spread" to x86_64, where they've reported random crashes after closing file dialogs on those platforms with Centos 9 and Fedora on Qt5 (architecture and widgetset previously thought immune). Again, this is VM testing - so you should be able to easily reproduce this with - now free VMware Workstation - or Parallels, still, running on Intel or AMD CPUs, macOS or Windows hosts (I myself have only tested on a macOS host thus far, but at least this should make it much easier for other folks to reproduce). Just a note for the above point, our x86_64 code does NOT yet incorporate the bugfix on this thread. That test is still pending at QA. - And as mentioned earlier the issue happens with both Parallels and VMware virtual machines on aarch64, at least on Apple Silicon (so not one but two competitor hypervisor stacks [although I don't know if they just now use Apple's hypervisor on aarch64 so don't have much of a difference left]) - so it would be infinitely more cost and time effective for folks here to reproduce it either on x86_64 or aarch64 through virtualization, instead of me flattening physical devices and then trying to rebuild them (really the only sensible way for me to undertake that would be if I had a spare M2 SSD lying around which I could use for the exercise instead). - To reconfirm, the issue did go away when the bugfix on this thread was incorporated into our aarch64 code. So it is effective and my hunch is to agree that since aarch64 is a newer platform, it just wasn't defined in, in error. - Sadly, again, I must echo Martin_fr's sentiments that something else might be going on, since we're still having random problems on GTK2 with aarch64 - random freezes here and there, which reproduce when the end-user cancels out of particular dialogs but does not reproduce when the end-user okays out of the same dialogs (just doesn't make sense) as I described in my immediately preceding post on this thread. But these bugs might be entirely unrelated to the bug that we may well have fixed on this thread, too. - I respectfully disagree with the suggestion to get rid of platform native file dialogs, this is avoiding the issue which would come back to bite us sooner or later, to say nothing of the fact that trying to clone platform native file dialogs is always a losing war, with the platform vendor potentially upending you anytime they've released an OS upgrade, and downgrading the perceived quality of your applications consequently. I believe the right approach to solve this issue is by having others reproduce it at this point, lest I become a chokepoint, all your sympathies notwithstanding. And hey, I mean earnestly, if still nobody else can reproduce the problem; perhaps I really should start looking for another line of work if only MY VM tests somehow reproduce the issue in what ought to be a fully portable, reproducible situation for everyone. That would really shake my worldview, and I really wouldn't want to find myself waking up from the matrix to find myself an old man living in my mother's basement or something :O ---------------------------------------------------------------------- rvk · 2024-11-15 13:06 I just installed a new trunk on Linux. Now I see this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TGtk2WidgetSet.AppInit(var ScreenInfo: TScreenInfo);begin  // needed otherwise some gtk theme engines crash with division by zero  {$IFNDEF DisableGtkDivZeroFix}    SetExceptionMask(GetExceptionMask + [exOverflow,exZeroDivide,exInvalidOp]);  {$ENDIF} So I guess that define for cpui386 and cpux86_64 is now removed and the masking of the exception is now implemented for all platforms. @msintle Can you test a new trunk version of Lazarus? Revision: 604c8de01610a4044d0a5d6cfc57bf9b9e3ae907 Author: Maxim Ganetsky Date: 06-11-2024 14:23:17 Message: LCL-Gtk2: Call SetExceptionMask for all CPUs, not only for x86 (thus unify it with other widgetsets). Fixes crashes on AArch64, issue #41188. QuoteRevision: 7cfcb81528b10f3ccaad566f7b12d23b38303368 Author: Maxim Ganetsky Date: 06-11-2024 13:35:08 Message: LCL-Gtk2: Call SetExceptionMask for all CPUs, not only for x86 (thus unify it with other widgetsets). Fixes crashes on AArch64, issue #41188. ---- Modified: lcl/interfaces/gtk2/gtk2widgetset.inc /edit/ BTW. Removing the masking of exception on cpux86_64 and recompiling Lazarus and starting it from a terminal hangs the Open dialog with the following on the terminal: QuoteTApplication.HandleException: EAccessViolation Access violation   Stack trace:   $00007F1843EB20D4 (It doesn't show an exception dialog but certainly crashes/hangs silently without masking the exception) ---------------------------------------------------------------------- msintle · 2024-11-15 19:37 Oh, right. The exception was already being masked on x86_64. Our QA also reported (kindly before the end of the week) that they found no different results when we explicitly added remasking, so that makes sense. They tested x86_64 with Qt5 and the immediate application crashes upon cancelling out of a common file dialog reproduced readily on Centos and Fedora. This is different from the aarch64 GTK2 freeze upon showing a common file dialog. It can be very challenging to install Lazarus on Linux from trunk with FPCUPDLX. I'll definitely let you know what I find as soon as I get around to it. Which widgetset and bitness did you want me to look at in particular? ---------------------------------------------------------------------- rvk · 2024-11-15 19:54 Quote from: msintle on November 15, 2024, 08:37:13 pmIt can be very challenging to install Lazarus on Linux from trunk with FPCUPDLX. That's why I use my own script. I posted this script recently in this topic. https://forum.lazarus.freepascal.org/index.php/topic,68845.msg537003.h tml#msg537003 I use this script on Raspberry pi (arm32 and aarch64) and on Linux virtual and bare metal machines (Ubuntu, Debian, etc) on Intel. ---------------------------------------------------------------------- msintle · 2024-11-20 12:56 Quote from: rvk on November 15, 2024, 08:54:53 pmQuote from: msintle on November 15, 2024, 08:37:13 pmIt can be very challenging to install Lazarus on Linux from trunk with FPCUPDLX. That's why I use my own script. I posted this script recently in this topic. https://forum.lazarus.freepascal.org/index.php/topic,68845.msg537003.h tml#msg537003 I use this script on Raspberry pi (arm32 and aarch64) and on Linux virtual and bare metal machines (Ubuntu, Debian, etc) on Intel. Would be really great if somebody could port that script into InstallAware Multi Platform. Would your script also run on macOS (and Windows, if the commands were updated)? If anyone is interested, please PM me for a very nice development bounty! This could produce the first single-source cross-platform setup for Lazarus itself, which would be exciting. ---------------------------------------------------------------------- TRon · 2024-11-20 13:30 Quote from: msintle on November 20, 2024, 01:56:46 pmWould your script also run on macOS (and Windows, if the commands were updated)? Requires more work. especially regarding the bootstrap compiler. QuoteThis could produce the first single-source cross-platform setup for Lazarus itself, which would be exciting. Unless I am completely misunderstand something or used a wrong interpretation of what was written: it is named fpcup, later evolved into fpcupdeluxe (*). fwiw: Building Lazarus itself is peanuts. (*) edit: sorry as I just noticed you addressed fpcupdeluxe as being challenging. Could you elaborate on what difficulties you encountered ? Reason to ask is that documentation can always be improved but be advised that setting up f.e. a cross-compiler is something far more complicated than a 'simple' Lazarus or FPC install (and FPCUpDeluxe tries to support all and then some). ---------------------------------------------------------------------- rvk · 2024-11-20 13:49 That script only works for Linux variants on different OSes. It's my personal script where I only do the things I need to do each time. For more flexibility you have the fpcupdeluxe. But because you didn't know the problem was due to the compilation by fpcupdeluxe or something else, I shared my script here (where it worked fine). So if you take fpcupdeluxe and choose the latest trunk, after compiling, the resulting program should work fine (under Linux VM on Mac and on Mac itself). ---------------------------------------------------------------------- msintle · 2024-11-20 15:55 Quote from: TRon on November 20, 2024, 02:30:09 pmQuote from: msintle on November 20, 2024, 01:56:46 pmWould your script also run on macOS (and Windows, if the commands were updated)? Requires more work. especially regarding the bootstrap compiler. QuoteThis could produce the first single-source cross-platform setup for Lazarus itself, which would be exciting. Unless I am completely misunderstand something or used a wrong interpretation of what was written: it is named fpcup, later evolved into fpcupdeluxe (*). fwiw: Building Lazarus itself is peanuts. (*) edit: sorry as I just noticed you addressed fpcupdeluxe as being challenging. Could you elaborate on what difficulties you encountered ? Reason to ask is that documentation can always be improved but be advised that setting up f.e. a cross-compiler is something far more complicated than a 'simple' Lazarus or FPC install (and FPCUpDeluxe tries to support all and then some). Never looking into cross compilation, but just a reliable method to install Lazarus itself (together with its dependencies - no matter which widgetset is selected for development [Qt5, GTK2]). FPCUPDLX typically errors out with number 512 for me, but sometimes, there's other errors. This is after the dependencies it prints out as being missing are successfully installed. In general it is a lifesaver, and the only way I know how to get the latest trunk fixes. ---------------------------------------------------------------------- TRon · 2024-11-20 21:27 Quote from: msintle on November 20, 2024, 04:55:42 pmFPCUPDLX typically errors out with number 512 for me, but sometimes, there's other errors. This is after the dependencies it prints out as being missing are successfully installed. Ah, that sounds familiar. Sequoia, I presume ? Should not happen but it does. Have you (also) tried with the pre-release of FPCUpDeluxe and does it act in a similar manner ? Is there a detailed (error) log somewhere to be able to have a look at ? ---------------------------------------------------------------------- msintle · 2024-11-21 13:41 Quote from: TRon on November 20, 2024, 10:27:47 pmQuote from: msintle on November 20, 2024, 04:55:42 pmFPCUPDLX typically errors out with number 512 for me, but sometimes, there's other errors. This is after the dependencies it prints out as being missing are successfully installed. Ah, that sounds familiar. Sequoia, I presume ? Should not happen but it does. Have you (also) tried with the pre-release of FPCUpDeluxe and does it act in a similar manner ? Is there a detailed (error) log somewhere to be able to have a look at ? I've probably never seen it fail on macOS, but it consistently fails on the Linux'es I've tried it on. Here's a few logs for you, based on the latest pre-release version (and 4 GB VM RAM, as Alf had determined 2 GB RAM would itself break the process). All OS's below are aarch64. Debian 12.6: After running "sudo apt-get install libx11-dev libgtk2.0-dev libcairo2-dev libpango1.0-dev libxtst-dev libgdk-pixbuf2.0-dev libatk1.0-dev libghc-x11-dev make binutils git gdb" successfully, we get: Edit: It worked! Seems like a recent fix. Ubuntu 24.04: fpcupdlx itself doesn't run. Qt5 doesn't launch at all, GTK2 causes a floating point error upon launch and fails shortly thereafter. Got to say, Ubuntu aarch64 really seems to have a thing out for Lazarus compiled apps! Edit: I'll be trying more OS's later, it seems Qt5 Pascal library installations might be required for Qt5 scenario testing, too (so fpcupdlx launches properly). Would also be helpful to refresh tests on x86_64, too. ---------------------------------------------------------------------- rvk · 2024-11-21 13:48 Quote from: msintle on November 21, 2024, 02:41:57 pmUbuntu 24.04: fpcupdlx itself doesn't run. Qt5 doesn't launch at all, GTK2 causes a floating point error upon launch and fails shortly thereafter. Yikes. That's a catch 22. The chicken and the egg  The fpcupdlx binary also needs to be first compiled with this fix otherwise it will give the same errors you are trying to avoid  But for Linux you can use my script. ---------------------------------------------------------------------- TRon · 2024-11-21 20:58 Thank you very much for the testing and extensive report @msintl. I need a bit more time to delve deeper into this but as remarked by rvk that is indeed a nice catch 22  I personally have never encountered anything like you seem to experience, either native or using virtualization software. I do not know Don Alfredo's schedule and/or release cycle (I for one wouldn't dare tamper with it either) so it might be that it could take a while. There are alternatives such as using fpcup (note the absence of Deluxe) instead or indeed use something like a script as provided by rvk. In basics all that you need is a working FPC compiler. The build of Lazarus is more or less a 3-liner. Usually what I do when Lazarus isn't able to build is to manually patch (well, my script does it for me but that patch needs to be crafted and added) the Lazarus sources before building. But in this case you're building straight from trunk. ---------------------------------------------------------------------- msintle · 2024-11-22 00:32 Running the installation script (on Ubuntu), I get a lot of encouraging output until: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ...Compiling for ARM64 Processor (Pi2 and higher only)================ ==============================================Using bootstrap /home/parallels/dev/bootstrap/ppca64 compiler ======================== ====================================== Downloading FPC sources Date: Thu Nov 21 22:01:29 2024 +0100 HEAD is now at 09f3600cc4   * patch by Lipinast Lekrisov: fix building ffi.pp on macOS, resolves #41035Now: Date:   Thu Nov 21 22:01:29 2024 +0100 Downloading Lazarus sources Date:   Thu Nov 21 19:52:47 2024 +0100HEAD is now at ea838aa496 Gtk2: fixed bitmap creation when ratio DataSize/MaskSize have remainder. issue #41070Now: Date:   Thu Nov 21 19:52:47 2024 +0100 ./l.sh: line 387: warning: here-document at line 300 delimited by end-of-file (wanted `EOF')./l.sh: line 388: syntax error: unexpected end of file Any thoughts what the issue might be here? I tried both pasting into pico (nano) first, and then the default text editor that ships with Ubuntu. ---------------------------------------------------------------------- TRon · 2024-11-22 00:45 Quote from: msintle on November 22, 2024, 01:32:38 amRunning the installation script (on Ubuntu), I get a lot of encouraging output until: Is that /all/ the output from running rvk's script ? (afaik (quick glance only) there should be more) QuoteCode: [Select]./l.sh: line 387: warning: here-document at line 300 delimited by end-of-file (wanted `EOF') ./l.sh: line 388: syntax error: unexpected end of file Any thoughts what the issue might be here? The heredoc seem to have failed. No idea why but it is practically at the end of the script, only responsible for creating a desktop shortcut (so can be ignored). Can you detect whether the lazarus and startlazarus executables are present ? PS: In order to catch and watch the output at the same time on linux something like this can be used: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ./scriptname.sh 2>&1 | tee name_of_log_file.txt  In case of a re-run of the script always make sure to remove everything that the script downloaded, extracted and/or created so that the start conditions are always the same (normally scripters like myself f.i. are lazy in automating that). ---------------------------------------------------------------------- rvk · 2024-11-22 04:49 Quote from: msintle on November 22, 2024, 01:32:38 amI tried both pasting into pico (nano) first, and then the default text editor that ships with Ubuntu. This is a bash script (notice the first line). So don't run it with sh. sh isn't bash. Edit: I check for this in the script so it must be running under bash  I normally have this script on my internal server and run it via this. Quotebash <(wget -q -o /dev/null -O - https://internal- server/lazarus_on_linux.sh) So this should work too Quotebash ./lazarus_on_linux.sh Otherwise note that the lines 300-306 are correctly EOF'ed This method of creating a file with cat EOF is die multiple times. You could change the EOF to something else but for me this works. Does line 306 contain only EOF? ---------------------------------------------------------------------- msintle · 2024-11-22 10:34 You're absolutely correct, running bash made no difference. I have no way of knowing about the end-of markers. Everything looks good in both pico and the OS default GUI text editor. I literally just pasted your script from Firefox (on Ubuntu itself) to pico and the text editor. ---------------------------------------------------------------------- TRon · 2024-11-22 10:39 Quote from: rvk on November 22, 2024, 05:49:16 amDoes line 306 contain only EOF? Doing exactly the same as described by msintle then the answer to that question would be yes (just checked). The only odd thing I noticed is the semicolon as last character in the line above (but no idea if that influences the heredoc parsing. I usually do not work heredoc because it messes with the formatting). ---------------------------------------------------------------------- rvk · 2024-11-22 10:55 It's this part: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i cat << EOF >> $HOME/.fpc.cfg-Fu$BASE/fpc/lib/fpc/\$fpcversion/units/\$fpctarget-F u$BASE/fpc/lib/fpc/\$fpcversion/units/\$fpctarget/*- Fu$BASE/fpc/lib/fpc/\$fpcversion/units/\$fpctarget/rtl-Fl$(find / -name crtbegin.o -printf '%h\n' 2>/dev/null | head -n 1)-FD$BASE/fpc/binEOF You could change the EOF to anything else Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i cat << EOFFF >> $HOME/.fpc.cfg- Fu$BASE/fpc/lib/fpc/\$fpcversion/units/\$fpctarget-Fu$BASE/fpc/lib/fpc /\$fpcversion/units/\$fpctarget/*- Fu$BASE/fpc/lib/fpc/\$fpcversion/units/\$fpctarget/rtl-Fl$(find / -name crtbegin.o -printf '%h\n' 2>/dev/null | head -n 1)-FD$BASE/fpc/binEOFFF But the EOF as part to end a cat is used multiple times in the script. Only thing I can think of is that copy/paste has done something to the lines (or end-of-line). ---------------------------------------------------------------------- msintle · 2024-11-22 11:08 Just tried that, no effect. There's also several other EOF literals in the file. ---------------------------------------------------------------------- rvk · 2024-11-22 14:54 Quote from: msintle on November 22, 2024, 12:08:37 pmJust tried that, no effect. There's also several other EOF literals in the file. Yes, and normally this is not a problem. You might want to post your version (if not a 1:1 copy). I took my post, pressed [Select], right clicked and pressed copy. The in a terminal I did nano l.sh pasted the clipboard ctrl+x and enter. Then bash l.sh and everything went fine. ---------------------------------------------------------------------- msintle · 2024-11-22 16:48 It really does feel like the matrix is glitching out for me, doesn't it? I give up - the matrix wins Edit: If you want to attach your script here, happy to give it one more go. If you want, I can attach mine too. ---------------------------------------------------------------------- rvk · 2024-11-22 17:09 Quote from: msintle on November 22, 2024, 05:48:06 pmEdit: If you want to attach your script here, happy to give it one more go. If you want, I can attach mine too. Attached. Wonder if that works better. (oops. needed to zip that. forum doesn't support .sh) I also put it on a git gist. https://gist.githubusercontent.com/rvk01/542c008b41ded26817737dba597e9 298/raw/714f3b3e49e21482c7e05da0f3e3f87d52a70482/lazarus_on_linux.sh With wget you can get in into your directory: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i wget https: //gist.githubusercontent.com/rvk01/542c008b41ded26817737dba597e9298/ra w/714f3b3e49e21482c7e05da0f3e3f87d52a70482/lazarus_on_linux.sh ---------------------------------------------------------------------- msintle · 2024-11-22 17:53 Guess what, it's working with your ZIP file. diff'ing both files on the command line produced a ton of output. Loading both in text editor I can see the version I copied from the forum has some extra whitespace at the start of each line. Really picky Linux, what can I say. I'll let you know what happens to the actual build, thanks. ---------------------------------------------------------------------- TRon · 2024-11-22 17:57 Quote from: msintle on November 22, 2024, 06:53:09 pmLoading both in text editor I can see the version I copied from the forum has some extra whitespace at the start of each line. Really picky Linux, what can I say. That explains why the heredoc failed. Not really linux related rrather how heredoc works. ---------------------------------------------------------------------- rvk · 2024-11-22 17:58 Quote from: msintle on November 22, 2024, 06:53:09 pmLoading both in text editor I can see the version I copied from the forum has some extra whitespace at the start of each line.I saw that too. The forum adds a space for empty lines. But I tested this and it still works for me. More likely would be the linebreaks. These need to be LF only in Linux. Windows is CR+LF. And Mac is CR. So if you copy from Mac or Windows you get wrong linebreaks. ---------------------------------------------------------------------- msintle · 2024-11-22 18:03 My Parallels downgraded from v20 to v18 and its Parallels Tools integration failed at that point (since the VM's had earlier been upgraded to v20), so actually I wasn't able to copy anything over from macOS, but launched Firefox inside the Ubuntu VM directly, and copied from there. I'm sure there's a reason why it failed, but at this level of "complexity" and failure frequency, the device is surely imitating some kind of malicious Skynet entity! Anyways, now launching Lazarus (which required two modifications to the .desktop file - first to make it executable, then to allow launching it [oddly enough that latter step is new to me]), it insists it cannot find FPC sources. I had logged off before trying, and I did reboot after the first launch refusal just for good measure. ---------------------------------------------------------------------- msintle · 2024-11-22 18:07 Ingoring the FPC source pleading, I can see all file dialogs - and setting dialogs - work properly in Lazarus now; that's a first for aarch64 ubuntu indeed. Notwithstanding the fact that I was incapable of running a darn shell script properly, thus setting a very low bar on my future prospects; would anyone understand why the workaround code doesn't succeed 100% when called during one of the startup unit's initialization routine, but does succeed when called from the proper widget initialization place? Please consider it a rhetorical question of sorts at least Thanks again, everyone. ---------------------------------------------------------------------- rvk · 2024-11-22 18:08 Quote from: msintle on November 22, 2024, 07:03:28 pmAnyways, now launching Lazarus (which required two modifications to the .desktop file - first to make it executable, then to allow launching it [oddly enough that latter step is new to me]), it insists it cannot find FPC sources.Last time I tried it was enhough for me to just right click and choose make it launchable (or something). Not finding the source could be that you need to loggoff before starting the program. But yes... That part isn't perfected. I often need to choose fpc executable and the fpc directory to get therl config correct. Luckily a one time thing (if you don't reinstall each day ). ---------------------------------------------------------------------- msintle · 2024-11-22 18:22 You know what the default FPC source installation folder is? ---------------------------------------------------------------------- msintle · 2024-11-22 18:25 BTW package installations work fine, so somehow it can find some sources, apparently. Even the glitches in the matrix are themselves glitchy, it seems like. ---------------------------------------------------------------------- rvk · 2024-11-22 18:25 Quote from: msintle on November 22, 2024, 07:22:05 pmYou know what the default FPC source installation folder is? You need the one that's just installed/copied. So the one in the home directory subfolder dev/fpc. ---------------------------------------------------------------------- msintle · 2024-11-22 18:29 Cool, will add that in. I just compiled my app with this latest Lazarus version, and it no longer freaks out (read: instantly crashes) when I cancel out of certain dialogs. What does this tell us about our overall research here? ---------------------------------------------------------------------- rvk · 2024-11-22 18:32 Quote from: msintle on November 22, 2024, 07:29:46 pmCool, will add that in.I normally need to provide the fpc executable and the path to fpc. I do that with the browse button. Quote from: msintle on November 22, 2024, 07:29:46 pmWhat does this tell us about our overall research here? It tells is that the fix from last week in trunk is working ---------------------------------------------------------------------- msintle · 2024-11-22 19:11 Quote from: rvk on November 22, 2024, 07:32:48 pmQuote from: msintle on November 22, 2024, 07:29:46 pmWhat does this tell us about our overall research here? It tells is that the fix from last week in trunk is working Right, but how come just calling the same fix code had no effect when I called it in the initialization of one of my core units? This had fixed the common file dialog bugs successfully. ---------------------------------------------------------------------- rvk · 2024-11-22 19:18 Quote from: msintle on November 22, 2024, 08:11:10 pmRight, but how come just calling the same fix code had no effect when I called it in the initialization of one of my core units? This had fixed the common file dialog bugs successfully. You mean it did work in the initialization or it didn't work? The code for masking the exception already existed for intel machines. It just wasn't present on aarch64 (because nobody ever got a problem there). ---------------------------------------------------------------------- msintle · 2024-11-22 19:26 So it worked to fix the common file dialog issues when I had it in my initialization. But it did not work to fix random crashes on Ubuntu which happened when, for example, I'd cancel out of one of my own dialogs (but not, when I, for example, OK'd out of the same dialog [ditto with Lazarus, its settings dialog in particular]). Is this because of the random flag overwrite issue when calling the widget APIs, and I suppose the proper fix place already accounts for that and has therefore accommodated that issue, too? ---------------------------------------------------------------------- msintle · 2024-11-22 21:22 BTW we're not out of the woods yet. QA had reported an issue with Qt5 on x86_64 (not aarch64) where after closing common file dialogs, a crash occurs. Since amd64 never really had mask issues to begin with...any thoughts where to start looking for this one next? ---------------------------------------------------------------------- zeljko · 2024-11-22 22:28 I don't have any crash so far on linux x86_64, lcl-qt5 after closing common file dialogs. Open issue and attach simple example project and write howto provoke crash. ---------------------------------------------------------------------- msintle · 2024-11-22 22:50 Which Linux distributions does it work for you under? Have you previously installed any Qt5 libraries explicitly on them? ---------------------------------------------------------------------- TRon · 2024-11-22 23:56 Beats me why you would ask that at one of the qt developers. ---------------------------------------------------------------------- msintle · 2024-11-23 10:18 I didn't realize he was one of the Qt5 head honchos, of course. Thanks for letting me know, and no offense intended either way. Just trying to establish a baseline environment for myself to build from. ---------------------------------------------------------------------- zeljko · 2024-11-23 11:46 Quote from: msintle on November 22, 2024, 11:50:33 pmWhich Linux distributions does it work for you under? Any,haven't found one that does not work or crashes. Quote from: msintle on November 22, 2024, 11:50:33 pmHave you previously installed any Qt5 libraries explicitly on them? Yes, even multiple qt5 libs (own build) for testing purposes. zeljko ---------------------------------------------------------------------- msintle · 2024-11-23 17:01 Quote from: zeljko on November 23, 2024, 12:46:27 pmQuote from: msintle on November 22, 2024, 11:50:33 pmHave you previously installed any Qt5 libraries explicitly on them? Yes, even multiple qt5 libs (own build) for testing purposes. zeljko I meant to ask about the Qt5 Pascal bridges in particular - libQt5Pas was it? Do you have a recommended best practice to get that stuff onto a Qt5 system? ---------------------------------------------------------------------- cdbc · 2024-11-23 17:14 Hi QuotelibQt5Pas was it? Do you have a recommended best practice to get that stuff onto a Qt5 system?Compile it yourself, the files are in .../lazarus/lcl/interfaces/qt5/cbindings/ Regards Benny ---------------------------------------------------------------------- TRon · 2024-11-23 17:17 @mseintl: No offense intended from my side either (I was a bit busy). Not specifically a bigshot but someone with a passion for bugs (or actually fixing them)  libqt5pas comes with lazarus or from your repository... or in case that is too old (or your chicken egg problem),  a project maintained by dbannon here. Note the instructions and date of the library (if your distro's repository has the same version then don't bother with a manual install). ---------------------------------------------------------------------- zeljko · 2024-11-23 17:33 Quote from: msintle on November 23, 2024, 06:01:43 pmI meant to ask about the Qt5 Pascal bridges in particular - libQt5Pas was it? Do you have a recommended best practice to get that stuff onto a Qt5 system? For windows you have dll in binaries, but you can build your own, for linux usually distro package is needed (qt5pas or libqt5pas, name depends on distro), but also you can build it on linux on your own. For Mac, you have to build it by yourself. ---------------------------------------------------------------------- msintle · 2024-11-23 20:46 Quote from: TRon on November 23, 2024, 06:17:14 pmlibqt5pas comes with lazarus or from your repository... or in case that is too old (or your chicken egg problem),  a project maintained by dbannon here. Yeah that was the repo I'd found earlier, glad to hear I'm not that far off that one, at least. Just wondering if my issues reproduce because of that project and whether any distributions might have newer bindings somehow? ---------------------------------------------------------------------- msintle · 2024-11-23 20:47 Quote from: cdbc on November 23, 2024, 06:14:45 pmHi QuotelibQt5Pas was it? Do you have a recommended best practice to get that stuff onto a Qt5 system?Compile it yourself, the files are in .../lazarus/lcl/interfaces/qt5/cbindings/ Regards Benny Intriguing, how would I do that compilation myself? ---------------------------------------------------------------------- cdbc · 2024-11-23 21:19 Hi This is from the 'CBindings' - README.TXT in the path I gave you above:Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Compile Pascal Qt Interface from source:======================================== * Download and unpack the sources  * cd into the resulting unpacked directory * This directory contains amongs other things a Qt Project File Qt5Pas.pro * run qmake -query to inspect your Qt installation * qmake (creates Makefile based upon Qt5Pas.pro) * make (compiles) * make install (obtain super user rights with sudo or su) * make clean (cleans directory, do this when switching Qt versions) Linux Note:-----------To use a different Qt then the system wide Qt,use /PathToOtherQt/bin/qmake and learn about LD_LIBRARY_PATH(export LD_LIBRARY_PATH=/PathToOtherQt/lib)  Mac OsX Note: -------------qmake may create a xcode project instead of a g++ Makefile use xcodebuild to compile to create a g++ Makefile:QMAKESPEC=macx-g++ qmake The qmake project is configured to create a framework instead of a plain library  Windows Note:-------------Verify the QTDIR,QMAKESPEC environment variables.e.g. QMAKESPEC=win32-g++ and that make -vand gcc -v produce the expected result.Be sure that mingw32 shipped with Qt5 is in PATH,so bindings are built with correct mingw32 version.eg. for Qt-5.6.1 you can set all paths in cmd and build bindings. set PATH=C:\ Qt5Directory\Tools\mingw492_32\bin;C:\Qt5Directory\5.6\mingw49_32\bin; %PATH%qmake -queryqmakemingw32-make   Installation============When compiling from source,you can use make install. When using the binary packages,see below.  If preferred, first stripthe libraries before installation. Linux Binary Installation-------------------------The libraries should be copiedto the distribution specific system library directorye.g. /usr/lib. Ensure the symlinks are correct.The .so.OneDigit link is used when running a program.(google soname)The .so link is used when linking during development Windows Binary Installation---------------------------The dll can be copied to e.g. the Qt bin directory, as this directory is already in the PATH environment variable. Mac OsX Binary Installation ---------------------------The provided package installsto /Library/Frameworks  Note: On my system, the 'qmake' has a sibling named 'qmake-qt5', where the latter is the one to use. (the 'qmake' creates qt4). Ofc. you need to SU to become root, to install the library & symlinks. Note2: When you start compiling C/C++ ...YOU REALLY COME TO APPRECIATE THE SPEED OF FPC  I.e: Get your coffe-maker going, it takes a while... Regards Benny ---------------------------------------------------------------------- msintle · 2024-11-23 22:03 Quote from: cdbc on November 23, 2024, 10:19:44 pmHi Note2: When you start compiling C/C++ ...YOU REALLY COME TO APPRECIATE THE SPEED OF FPC  I.e: Get your coffe-maker going, it takes a while... Regards Benny Thanks, Benny! Re: Speed, oh yeah! Does that mean Free Pascal is still a single pass compiler while the C-C++ stuff is still double pass? I wonder what happened with LLVM and all the others on Windows, for example, and Delphi - and whether they are still single pass compilers. At risk of hijacking my own thread, in the past it was all about Pascal vs C(++) - now look where we're at with all these languages popping up like shrooms! ---------------------------------------------------------------------- msintle · 2024-11-24 14:40 OK, so next issue. I was able to reproduce some of the random crashes I've been reported by QA - even after our infamous fix here - and they turn out to be something utterly unrelated, of course. This code crashes on Ubuntu aarch64 Lazarus latest trunk with the fix herein: TStringList(ListBox1.Items).Sorted := True; Whereas this code works properly: ListBox1.Sorted := True; Is that the expected behavior? I suspect this might also have to do with the Qt5 Intel random crashes/bugs on Linux, but that is TBD. ---------------------------------------------------------------------- marcov · 2024-11-24 15:32 Quote from: msintle on November 24, 2024, 03:40:27 pmIs that the expected behavior? Yes.  tListbox.items is a TStrings derivative, but not necessarily TStringList. ---------------------------------------------------------------------- msintle · 2024-11-24 15:41 Quote from: marcov on November 24, 2024, 04:32:35 pmQuote from: msintle on November 24, 2024, 03:40:27 pmIs that the expected behavior? Yes.  tListbox.items is a TStrings derivative, but not necessarily TStringList. I believe this behavior is divergent from Delphi and inconsistent even amongst versions/operating systems of Lazarus editions. ---------------------------------------------------------------------- TRon · 2024-11-24 16:15 Quote from: msintle on November 24, 2024, 04:41:41 pmI believe this behavior is divergent from Delphi and inconsistent even amongst versions/operating systems of Lazarus editions. Delphi only had to worry about a single target while Lazarus supports many. How the widgetset implements a particular feature/behaviour depends on the interface that it relies on. see also architecture scheme at the right. Also in Delphi days the cast is/was considered bad coding style. ---------------------------------------------------------------------- marcov · 2024-11-24 18:02 Quote from: msintle on November 24, 2024, 04:41:41 pmI believe this behavior is divergent from Delphi and inconsistent even amongst versions/operating systems of Lazarus editions. No it isn't. Delphi doesn't specify anything else either: https://docw iki.embarcadero.com/Libraries/Sydney/en/Vcl.StdCtrls.TCustomListBox.It ems So if it happened to work in your older code, that is an undetected bug and a classic example that working code is not necessarily correct. It might just be that the memory layout doesn't get corrupted in some sensitive way by the typecast. I don't know if Delphi has an equivalent to -CR, but if it had, I would use it on that code   I actually debugged many old Delphi unit tests with FPC checks on maximum to find such cases. ---------------------------------------------------------------------- msintle · 2024-11-24 21:23 Quote from: TRon on November 24, 2024, 05:15:54 pmQuote from: msintle on November 24, 2024, 04:41:41 pmI believe this behavior is divergent from Delphi and inconsistent even amongst versions/operating systems of Lazarus editions. Delphi only had to worry about a single target while Lazarus supports many. How the widgetset implements a particular feature/behaviour depends on the interface that it relies on. see also architecture scheme at the right. Also in Delphi days the cast is/was considered bad coding style. Fair, but I guess then the question is what underlying storage would be used instead of TStringList for such a control, ex: in the real world with Lazarus and GTK2, what type of string storage is the control possibly using on aarch64? ---------------------------------------------------------------------- marcov · 2024-11-24 21:33 Quote from: msintle on November 24, 2024, 10:23:01 pmFair, but I guess then the question is what underlying storage would be used instead of TStringList for such a control, ex: in the real world with Lazarus and GTK2, what type of string storage is the control possibly using on aarch64? TStrings is abstract and could use e.g. items stored in the widget.  As for aarch64, as it is faulty code, it might simply that the architecture has a slightly different memory layout that brings the bug to the surface. ---------------------------------------------------------------------- msintle · 2024-11-25 15:34 OK, get ready for the next inanity. When I compile with Lazarus trunk on Debian 12.6 hosted by aarch64, and then run strip on the affected file; it explodes in the TListBox.Sorted := True statement. However, this does not happen if I don't strip the file. Does this make any sense whatsoever? Edit: That wasn't it. Right now on Debian 12.6 hosted by aarch64 (having to fall back here due to other problems with the customary Ubuntu VM above), running the non-stripped binary from the console gives this error: Gtk-CRITICAL **: 20:39:27.480: IA__gtk_tree_model_iter_nth_child: assertion 'n >= 0' failed But running it from the Lazarus IDE inside the debugger causes no problems. ---------------------------------------------------------------------- msintle · 2024-11-25 18:08 Got Ubuntu back up and running, and there's the call stack and the line which errors out. Does that mean anything? Edit: I was able to trace the code line by line and it has nothing to do with TListBox.Sorted. After the dialog stars showing the issue happens very intermittently. If I keep tracing the execution, the application message loop seems processing normally. The moment I hit F9, it may or may not work properly. When it crashes, the crash location is the same as in the screenshot. ---------------------------------------------------------------------- msintle · 2024-11-26 18:56 To work around this issue, I went back to my original build environment for aarch64 Linux, which is a Debian 11. The binaries produced by that Lazarus version work fine only on Debian aarch64 (with the .sorted fix and the initialization widgetset fix), but fail on Ubuntu aarch64 (since the proper widgetset fix is available only with trunk, and trunk causes other problems as described in the immediately preceding posts). Being fully stuck with the current state of affairs, and yet still being unable to let this go much to my detriment (and yours since you're reading this), I figured I'd install Lazarus trunk on another "randomly freezing" aarch64 Linux, namely, Kali 2024.2. The installation went by without a hitch - thanks to that great installation script. When configuring the Lazarus IDE though, the IDE itself bombs right when I'm typing the full path to my fpc executable. By bomb, I mean it freezes and stops responding. Running Lazarus from console, we see some kind of output (attached) that may be meaningful towards a resolution? Either that, or I really need to find the strength somewhere, somehow, to let this line of inquiry go? ---------------------------------------------------------------------- msintle · 2024-11-26 19:11 Got through that by pasting the entire path using the right-click menu. Now when I'm building my app, the build process craps out with this error: Error: /usr/x86_64-w64-mingw32/lib/crtbegin.o: file not recognized: file format not recognized Fortunately, this reproduces with a blank LCL project too, instantly. ---------------------------------------------------------------------- rvk · 2024-11-27 13:40 Quote from: msintle on November 26, 2024, 08:11:51 pmNow when I'm building my app, the build process craps out with this error: Error: /usr/x86_64-w64-mingw32/lib/crtbegin.o: file not recognized: file format not recognized x86_64-w64-mingw32 ?? On Debian (or Kali) ?? I can't keep up with what you are trying to do. Are you trying to cross-compile to win64/32 target? If not... you might want to check your fpc.cfg and remove the -Fl/usr/x86_64-w64-mingw32/lib line. Or actually you should check the correct location of a correct crtbegin.o file. Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i find / -name crtbegin.o -printf '%h\n' 2>/dev/null if there are multiple folders found, and /usr/x86_64-w64-mingw32/lib is the first, then that's probably the wrong one and you need to manually adjust it to the correct one. ---------------------------------------------------------------------- msintle · 2024-11-27 22:44 Quote from: rvk on November 27, 2024, 02:40:47 pmQuote from: msintle on November 26, 2024, 08:11:51 pmNow when I'm building my app, the build process craps out with this error: Error: /usr/x86_64-w64-mingw32/lib/crtbegin.o: file not recognized: file format not recognized x86_64-w64-mingw32 ?? On Debian (or Kali) ?? I can't keep up with what you are trying to do. I don't blame you. I'm trying to iron out all Linux bugs - random freezes, crashes, etc. It has been extremely challenging. Quote from: rvk on November 27, 2024, 02:40:47 pmAre you trying to cross-compile to win64/32 target? If not... you might want to check your fpc.cfg and remove the -Fl/usr/x86_64-w64-mingw32/lib line. Not at all. I am trying to compile a Linux GTK2 aarch64 Lazarus LCL binary on Kali 2024.2 and have it run without freezing and/or other odd lockup issues. Quote from: rvk on November 27, 2024, 02:40:47 pmOr actually you should check the correct location of a correct crtbegin.o file. Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i find / -name crtbegin.o -printf '%h\n' 2>/dev/null Thank you for that. So that returns: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ┌──(parallels㉿kali-linux-2024-2)-[~]└─$ find / -name crtbegin.o -printf '%h\n' 2>/dev/null/usr/x86_64-w64-mingw32/lib/usr/i686-w64- mingw32/lib/usr/lib/gcc/x86_64-w64-mingw32/13- win32/usr/lib/gcc/aarch64-linux-gnu/14/usr/lib/gcc/aarch64-linux- gnu/13/usr/lib/gcc/i686-w64-mingw32/13-win32 Quote from: rvk on November 27, 2024, 02:40:47 pmif there are multiple folders found, and /usr/x86_64-w64-mingw32/lib is the first, then that's probably the wrong one and you need to manually adjust it to the correct one. How do I do that? There were no fpc.cfg files found, does this mean the Free Pascal Compiler failed to install properly? ---------------------------------------------------------------------- rvk · 2024-11-27 23:34 Quote from: msintle on November 27, 2024, 11:44:16 pmThank you for that. So that returns: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ┌──(parallels㉿kali-linux-2024-2)-[~]└─$ find / -name crtbegin.o -printf '%h\n' 2>/dev/null/usr/x86_64-w64-mingw32/lib/usr/i686-w64- mingw32/lib/usr/lib/gcc/x86_64-w64-mingw32/13- win32/usr/lib/gcc/aarch64-linux-gnu/14/usr/lib/gcc/aarch64-linux- gnu/13/usr/lib/gcc/i686-w64-mingw32/13-win32Ha, did you install that with my script? On that particular OS you have mingw installed with multiple crtbegin.o versions. My script just expected a clean OS with one version. You probably want this one /usr/lib/gcc/aarch64-linux-gnu/14 (And not the one from mingw) Quote from: msintle on November 27, 2024, 11:44:16 pm Quote from: rvk on November 27, 2024, 02:40:47 pmif there are multiple folders found, and /usr/x86_64-w64-mingw32/lib is the first, then that's probably the wrong one and you need to manually adjust it to the correct one. How do I do that? There were no fpc.cfg files found, does this mean the Free Pascal Compiler failed to install properly? The config file for fpc is saved to the home directory of the user in .fpc.cfg (Note the dot in front so it's a hidden file) Do this and it will open. nano ~/.fpc.cfg Now search at the bottom for that mingw directory and change the directory to the one above. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  -Fl/usr/lib/gcc/aarch64-linux-gnu/14 I need to change the script to always search for the crtbegin.o in the correct architecture and not take the first one it finds ---------------------------------------------------------------------- rvk · 2024-11-28 08:07 BTW. Can you check if this gives the same directory? (I could use this in the script instead of find) Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i dirname $(gcc --print-file-name=crtbegin.o) /edit/ Ok, I changed this in my script and it seems to take the correct gcc lib directory. Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i cat << EOF >> $HOME/.fpc.cfg-Fu$BASE/fpc/lib/fpc/\$fpcversion/units/\$fpctarget-F u$BASE/fpc/lib/fpc/\$fpcversion/units/\$fpctarget/*- Fu$BASE/fpc/lib/fpc/\$fpcversion/units/\$fpctarget/rtl-Fl$(dirname $(gcc --print-file-name=crtbegin.o))-FD$BASE/fpc/binEOF ---------------------------------------------------------------------- msintle · 2024-11-28 10:36 Wow yes, that's absolutely your script, as FPCUPDLX simply results in error 512 on the majority of the Linux'es I try it on - even after I've installed all the dependencies it asks for - so your script has been a lifesaver, on top of the already-life-saving FPCUPDLX. So running that command you requested returned this: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ┌──(parallels㉿kali-linux-2024-2)-[~/Downloads]└─$ dirname $(gcc --print-file-name=crtbegin.o)/usr/lib/gcc/aarch64-linux-gnu/14 Definitely seems like the right one, then. And yes, adding the dot helped me locate the Free Pascal Compiler configuration file, too. Now I can get back to the actual torture of researching the random Linux hangs. Sadly, now pasting the full compiler path into the configuration window doesn't seem to finish Lazarus configuration. I've managed to obtain a stack trace, and the full screenshot is attached, so you know I'm not fabricating difficulty upon difficulty: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ┌──(parallels㉿kali-linux-2024-2)-[~]└─$ /home/parallels/dev/lazarus/startlazarusInfo: (startlazarus) [TLazarusManager.Run] starting /home/parallels/dev/lazarus/lazarus ...Info: (startlazarus) [TLazarusManager.Run] exe=/home/parallels/dev/lazarus/lazarus Params=[--started-by- startlazarus--no-splash-screen--force-new-instance]Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="/home/parallels/.lazarus"Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="/etc/lazarus"AddDefaultRecentProjects: Adding default projectsNOTE: editor options config file not found - using defaultsLooking for code tools config file:  "/home/parallels/.lazarus/codetoolsoptions.xml"NOTE: codetools config file not found - using defaultsWarning: (lazarus) incompatible Lazarus directory: /home/parallels/SearchLazarusDirectoryCandidates Value=. File=/home/parallels/.lazarusSearchLazarusDirectoryCandidates Value=/home/parallels/dev/lazarus File=/home/parallels/dev/lazarusSearchLazarusDirectoryCandidates Value=/usr/share/lazarus File=/usr/share/lazarusSearchLazarusDirectoryCandidates Value=/usr/local/share/lazarus File=/usr/local/share/lazarusSearchLazarusDirectoryCandidates Value=/usr/local/lib/lazarus File=/usr/local/lib/lazarusSearchLazarusDirectoryCandidates Value=/usr/local/lazarus File=/usr/local/lazarusSearchLazarusDirectoryCandidates Value=/usr/lib/lazarus File=/usr/lib/lazarusSearchLazarusDirectoryCandidates Value=/usr/lib/lazarus/4.99 File=/usr/lib/lazarus/4.99SearchLazarusDirectoryCandidates Value=~/pascal/lazarus File=/home/parallels/pascal/lazarusSearchLazarusDirectoryCandidates Value=~/lazarus File=/home/parallels/lazarusSearchCompilerCandidates Value=fpc File=SearchCompilerCandidates Value=ppcaarch64 File=SearchCompilerCandidates Value=$(LazarusDir)/fpc/3.3.1/bin/aarch64-linux/fpc File=/home/paralle ls/dev/lazarus/fpc/3.3.1/bin/aarch64-linux/fpcSearchCompilerCandidates Value=$(LazarusDir)/fpc/bin/aarch64-linux/fpc File=/home/parallels/dev /lazarus/fpc/bin/aarch64-linux/fpcSearchCompilerCandidates Value=/usr/local/bin/fpc File=/usr/local/bin/fpcSearchCompilerCandidates Value=/usr/bin/fpc File=/usr/bin/fpcSearchCompilerCandidates Value=/opt/fpc/fpc File=/opt/fpc/fpcSearchFPCSrcDirCandidates Value=$(LazarusDir)/fpc/$(FPCVer)/source File=/home/parallels/dev/laza rus/fpc/3.3.1/source/SearchFPCSrcDirCandidates Value=$Path($(CompPath))/../../source File=/source/SearchFPCSrcDirCandidates Value=/usr/share/fpcsrc/$(FPCVer) File=/usr/share/fpcsrc/3.3.1/SearchFPCSrcDirCandidates Value=/usr/local/share/fpcsrc/$(FPCVer) File=/usr/local/share/fpcsrc/3.3.1/SearchFPCSrcDirCandidates Value=/usr/share/fpcsrc File=/usr/share/fpcsrc/SearchFPCSrcDirCandidates Value=/usr/local/share/fpcsrc File=/usr/local/share/fpcsrc/SearchFPCSrcDirCandidates Value=/usr/fpcsrc File=/usr/fpcsrc/SearchFPCSrcDirCandidates Value=/usr/share/fpc/src File=/usr/share/fpc/src/SearchFPCSrcDirCandidates Value=/usr/fpc/src File=/usr/fpc/src/SearchFPCSrcDirCandidates Value=/usr/local/fpc/src File=/usr/local/fpc/src/SearchFPCSrcDirCandidates Value=/usr/local/share/fpc/src File=/usr/local/share/fpc/src/SearchFPCSrcDirCandidates Value=/usr/local/src/fpc File=/usr/local/src/fpc/SearchFPCSrcDirCandidates Value=/usr/lib/fpc/src File=/usr/lib/fpc/src/SearchFPCSrcDirCandidates Value=/usr/local/lib/fpc/src File=/usr/local/lib/fpc/src/SearchFPCSrcDirCandidates Value=/vol/fpc/src File=/vol/fpc/src/SearchFPCSrcDirCandidates Value=/vol/lib/fpc/src File=/vol/lib/fpc/src/SearchFPCSrcDirCandidates Value=/usr/src/fpc File=/usr/src/fpc/SearchFPCSrcDirCandidates Value=/vol/src/fpc File=/vol/src/fpc/SearchMakeExeCandidates Value=make File=/usr/bin/makeTSearchFpcSourceThread.FinishingTInitialS etupDialog.ThreadTerminated TApplication.HandleException: EAccessViolationAccess violation  Stack trace:  $0000FFFF8263CD00  $0067FFFF828D1900  $003E00000069162C  $000000000050BE5C  GTK2KillFocusCBAfter,  line 108 of gtk2widgetset.inc  $0000FFFF8294E700  $003AFFFF82738764  $0021FFFF8274FE9C  $0041FFFF82750DFC  $0039FFFF82757038  $0047FFFF827570E0  $007FFFFF82A88A60  $0000FFFF82A96C84  $004AFFFF82A9998C  $0006FFFF82738764  $007FFFFF8274FD3C  $0047FFFF827515C8  $0067FFFF82757038 It's probably the very same thing that's freezing/killing my application on this platform. The intermittent nature of the issue is perfectly illustrated by the fact that pasting the full path seemed to work while I had the broken installation script for Lazarus, and no longer works properly now that I do have the working installation script for Lazarus Edit: Logging off and then back on prevented the freeze above, somehow - but the underlying issue probably still remains, no? Do we indeed have some kind of other hard-to-reproduce bug in Lazarus, or am I hallucinating like a brand-new AI? ---------------------------------------------------------------------- rvk · 2024-11-28 11:13 Quote from: msintle on November 28, 2024, 11:36:43 amEdit: Logging off and then back on prevented the freeze above, somehow - but the underlying issue probably still remains, no? Do we indeed have some kind of other hard-to-reproduce bug in Lazarus, or am I hallucinating like a brand-new AI? I just installed on Kali in Hyper-V (intel) but I don't get the config-dialog (for compiler and fpc directory). (/edit/ woops, had a previous version there in ~/.lazarus so maybe the reason I didn't get the dialog) In the script I add the FPC directory to the .profile in the home directory (~/.profile). So, after logging out and back in, the ~/dev/fpc/bin directory should be in the path (PATH). When starting Lazarus for the first time, it will search that path and use the fpc compiler and corresponding fpc directory. So no dialog should be asked anymore (if you logoff and login as suggested by the message at the end of the script). I'll try kali on a raspberry pi here to see if can get it to crash or freeze. Where do you have a freeze or crash at the moment? (after that logoff/login) ---------------------------------------------------------------------- msintle · 2024-11-29 10:36 Intel's an entirely other beast, which has given me the intermittent issues only on the Qt5 side of things. Arm though, has been cause for much intermittent issue caused grief; all of which surfaced since I started facing the challenge of perfection there head-on, spurred first by the common file dialogs, and now these random crashes/freezes. The configuration dialog always shows and your PATH setting doesn't seem to help, at least on ARM, even after reboots; as I had found out on Ubuntu. I have no idea why Lazarus's configuration dialog doesn't crash on Kali after a logoff/logon, and does crash before. Is it a threading instability issue on Linux for Lazarus? I'd already attached my stack trace above, but it hardly provides any hints; does it? I've at least gotten my builds done and will see if they provide any more clues today. Edit: Here's where I have a reproducible crash right now, but no details yet on a minimum project to recreate it. The call stack and the unit/line of crash don't ring any bells for anyone, do they? ---------------------------------------------------------------------- rvk · 2024-11-29 10:53 I keep having trouble compiling on Raspberry pi 3 with Kali. It kept crashing when compiling FPC. After increasing the swapsize it almost completed the script but crashed at the end of compiling Lazarus. QuoteError: /home/kali/dev/fpc/bin/ppca64 can't be executed, error message: Failed to execute "/home/kali/dev/fpc/bin/ppca64", error code: -9 Not sure if my Raspberry pi 3 is too small or there is a problem with the combination with Kali (because I never had these problems in Debian on rpi). ---------------------------------------------------------------------- msintle · 2024-11-29 11:24 Quote from: rvk on November 29, 2024, 11:53:09 amI keep having trouble compiling on Raspberry pi 3 with Kali. It kept crashing when compiling FPC. After increasing the swapsize it almost completed the script but crashed at the end of compiling Lazarus. QuoteError: /home/kali/dev/fpc/bin/ppca64 can't be executed, error message: Failed to execute "/home/kali/dev/fpc/bin/ppca64", error code: -9 With Alf we'd figured we need at least 4 GB RAM on VMs for successful compilation, in case that helps. Quote from: rvk on November 29, 2024, 11:53:09 amNot sure if my Raspberry pi 3 is too small or there is a problem with the combination with Kali (because I never had these problems in Debian on rpi). Something's definitely wrong with Kali aarch64. Please see my immediately preceding screenshot above. It is a new post even though it shows before yours (reply #167). Edit: Trying to come up with a reproducing pattern, here's some of the innocently choice actions I've spotted: - Changing tabs on my product - Opening the Find dialog in Lazarus Any of these can literally trigger the freeze of the running host app (my own or Lazarus itself). And be nearly impossible to reproduce on next run. ---------------------------------------------------------------------- rvk · 2024-11-30 12:53 Seems like Kali is a lot more memory hungry. I changed the swap space to 4GB (from 1GB) and now FPC/Lazarus compiles correctly. (No more freezes and crashes during compilation) No further problems detected with running a small test project. (Raspberry pi 3 with Kali and trunk FPC/Lazarus) ---------------------------------------------------------------------- msintle · 2024-11-30 14:19 Quote from: rvk on November 30, 2024, 01:53:36 pmSeems like Kali is a lot more memory hungry. I changed the swap space to 4GB (from 1GB) and now FPC/Lazarus compiles correctly. (No more freezes and crashes during compilation) No further problems detected with running a small test project. (Raspberry pi 3 with Kali and trunk FPC/Lazarus) Do you have something more involved you could try out? That might hopefully expose some issues. BTW I just realized my own Kali VM has only 2 GB RAM allocated to it - wow! Your script still ran successfully, installing Lazarus; and my project also built entirely successfully; but I'll repeat all tests with 4 GB RAM too, just to be safe. Would be such a relief if the oddities turned out due to RAM issues. I'm not holding my breath, although there's always hope, I suppose. ---------------------------------------------------------------------- msintle · 2024-12-01 23:33 So this is what the issue was - if I set focus on the parent control immediately after hiding a child control, this sometimes, and only sometimes, causes problems with some GTK2 aarch64 Linux distributions. The solution I've implemented is to trigger a Timer to do the focusing shortly after the hiding, which is an ultra dirty solution, but it works. ---------------------------------------------------------------------- rvk · 2024-12-01 23:55 Quote from: msintle on December 02, 2024, 12:33:37 amif I set focus on the parent control immediately after hiding a child control, this sometimes, and only sometimes, causes problems with some GTK2 aarch64 Linux distributions. So, you hide a component that has focus, and then set focus to the parent??? I don't think you can (or should be able) to hide a control that has focus !!! Make a test project showing this and create a bugreport. ---------------------------------------------------------------------- msintle · 2024-12-02 16:56 Why not? Let's say the user presses ESC on the focused control, because (s)he doesn't want it showing anymore. Then I hide it and focus the parent control, which works fine on macOS, most Linux'es, and Windows, and Delphi. Since this involves custom controls, I'm not sure how readily it'll reproduce with generics. If I get to it, I'll update this thread. ---------------------------------------------------------------------- Thaddy · 2024-12-02 17:35 Quote from: msintle on December 02, 2024, 05:56:32 pmWhy not? Let's say the user presses ESC on the focused control, because (s)he doesn't want it showing anymore. Simply because pressing ESC used to mean it should return to the OS, NOT to the program. That is why it is called ESCape, What is so difficult to understand? Tied to Windows or Linux or Widgetset? ---------------------------------------------------------------------- rvk · 2024-12-02 17:39 Quote from: msintle on December 02, 2024, 05:56:32 pmThen I hide it and focus the parent control, which works fine on macOS, most Linux'es, and Windows, and Delphi. You first need to shift the focus BEFORE you can hide that control. A hidden control can't have focus (it'll give you an error). And if you try this in an event, it can also have strange effects. That's why I said you need to put this in a sample project showing the problem. Maybe you are doing things the wrong way. And if it is a bug, it can je used to show that. ---------------------------------------------------------------------- msintle · 2024-12-02 18:28 Quote from: Thaddy on December 02, 2024, 06:35:20 pmQuote from: msintle on December 02, 2024, 05:56:32 pmWhy not? Let's say the user presses ESC on the focused control, because (s)he doesn't want it showing anymore. Simply because pressing ESC used to mean it should return to the OS, NOT to the program. That is why it is called ESCape, What is so difficult to understand? Tied to Windows or Linux or Widgetset? Maybe I'm an idiot, and that's why I'm having a hard time to understand, but: When you close a modal dialog in your application using ESC, for example; control doesn't really return to the OS, but whatever main window is your app itself, right? ---------------------------------------------------------------------- msintle · 2024-12-02 18:29 Quote from: rvk on December 02, 2024, 06:39:29 pmQuote from: msintle on December 02, 2024, 05:56:32 pmThen I hide it and focus the parent control, which works fine on macOS, most Linux'es, and Windows, and Delphi. You first need to shift the focus BEFORE you can hide that control. A hidden control can't have focus (it'll give you an error). And if you try this in an event, it can also have strange effects. That's why I said you need to put this in a sample project showing the problem. Maybe you are doing things the wrong way. And if it is a bug, it can je used to show that. But I'm not trying to focus a hidden control at all. The control I'm hiding when ESC is pressed is a child of the still visible parent control. ---------------------------------------------------------------------- rvk · 2024-12-02 18:33 Quote from: msintle on December 02, 2024, 07:29:56 pmBut I'm not trying to focus a hidden control at all. The control I'm hiding when ESC is pressed is a child of the still visible parent control. Your missing my point. You said you first hide the control and THEN set focus to the parent. That's not possible. You first set focus to the parent and THEN hide the (sub)control. See the difference (order). How or what you are actually doing doesn't matter. As long as you don't show any code, this is a non-issue. If you want something resolved (because of a bug or programming error), you need to show the code. ---------------------------------------------------------------------- msintle · 2024-12-04 11:25 Quote from: rvk on December 02, 2024, 07:33:14 pmQuote from: msintle on December 02, 2024, 07:29:56 pmBut I'm not trying to focus a hidden control at all. The control I'm hiding when ESC is pressed is a child of the still visible parent control. Your missing my point. You said you first hide the control and THEN set focus to the parent. That's not possible. You first set focus to the parent and THEN hide the (sub)control. See the difference (order). How or what you are actually doing doesn't matter. As long as you don't show any code, this is a non-issue. If you want something resolved (because of a bug or programming error), you need to show the code. Nope, reordering the call as you suggested did not help. The widgets probably already handle hiding a control properly even when it has focus. So there's another issue, around which, my timer workaround helps; at least for now. I'd love to create a reproducing project for this issue, but I've really got bigger fish to fry for now. ---------------------------------------------------------------------- msintle · 2024-12-04 21:07 Quote from: rvk on November 28, 2024, 09:07:58 amBTW. Can you check if this gives the same directory? (I could use this in the script instead of find) Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i dirname $(gcc --print-file-name=crtbegin.o) /edit/ Ok, I changed this in my script and it seems to take the correct gcc lib directory. Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i cat << EOF >> $HOME/.fpc.cfg-Fu$BASE/fpc/lib/fpc/\$fpcversion/units/\$fpctarget-F u$BASE/fpc/lib/fpc/\$fpcversion/units/\$fpctarget/*- Fu$BASE/fpc/lib/fpc/\$fpcversion/units/\$fpctarget/rtl-Fl$(dirname $(gcc --print-file-name=crtbegin.o))-FD$BASE/fpc/binEOF On to my next issue - investigating why closing common file dialogs now, causes crashes on Qt5 x86_64 Linux operating systems (reproduced on Centos 9 and Fedora 40 thus far). Might you possibly be having a version of your script that installs the Qt5 version of Lazarus, instead of the GTK2 version? ---------------------------------------------------------------------- rvk · 2024-12-04 21:30 Quote from: msintle on December 04, 2024, 10:07:07 pmMight you possibly be having a version of your script that installs the Qt5 version of Lazarus, instead of the GTK2 version? My RPI4 just became available again today so I can check on that tomorrow. (Last time I checked I thought it was automatic but I'll have to check) ---------------------------------------------------------------------- msintle · 2024-12-05 00:03 Quote from: rvk on December 04, 2024, 10:30:04 pmQuote from: msintle on December 04, 2024, 10:07:07 pmMight you possibly be having a version of your script that installs the Qt5 version of Lazarus, instead of the GTK2 version? My RPI4 just became available again today so I can check on that tomorrow. Cool. Quote from: rvk on December 04, 2024, 10:30:04 pm(Last time I checked I thought it was automatic but I'll have to check) Automatic, how exactly? My Linux VMs where this issue happens don't normally have Qt5 installed. So my Qt5 compiled IAMP setup runs in character mode fallback without any GUI since it cannot boot the Qt5 GUI, rendering all setup dialogs in character mode; and then IAMP itself can actually launch in GUI mode, as it only then could it find the installed Qt5 libs after it itself has been successfully set up. How would your script handle this scenario, basically? ---------------------------------------------------------------------- rvk · 2024-12-05 09:39 Quote from: msintle on December 05, 2024, 01:03:26 amQuote from: rvk on December 04, 2024, 10:30:04 pm(Last time I checked I thought it was automatic but I'll have to check) Automatic, how exactly?Ok. I see now it wasn't totally automatic. Last time I did this I just compiled the GTK2 version with the script. Then... and I just did this on Kali and it worked... I installed libqt5pas-dev and did a make bigide over the GTK2 version. Worked perfectly. Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i sudo apt- get install libqt5pas-devcd ~/dev/lazarusmake bigide LCL_PLATFORM=qt5 Result... a Qt5 Lazarus version. BTW instead of Qt5 Lazarus you can also use the GTK2 Lazarus to compile for Qt5 (via widgetset target). QuoteLazarus 4.99 (rev main_4_99-578-ga81ad6381b) FPC 3.3.1 x86_64-linux-qt5 See https://wiki.freepascal.org/Qt5_Interface (I would need to see if Qt5 environment could be detected and used automatically but you see there that Fedora and Debian have different Qt5-dev packages) ---------------------------------------------------------------------- msintle · 2024-12-05 21:19 So I ran a couple tests on affected systems, and they both failed with your script, because apt-get is missing on them. Can you think of any other ways to install Lazarus Qt5 on these devices? Centos 9 and Fedora 41 x86_64. ---------------------------------------------------------------------- rvk · 2024-12-05 21:24 Quote from: msintle on December 05, 2024, 10:19:57 pmCentos 9 and Fedora 41 x86_64. Centos and Fedora don't use APT as package manager. They normally use YUM. My script currently only runs with APT. I'm not sure if the installed packages are called the same. You could remove the apt-get lines and install the required packages manually. If the package names are the same I could add YUM as option (after determining that YUM is used instead of APT). ---------------------------------------------------------------------- msintle · 2024-12-05 22:29 Sounds like a great point to start migrating your script to IAMP, but I was really hoping to get to the bottom of the Qt5 issue before doing any of that. Maybe I can give FPCUPDLX a try before throwing in the towel? ---------------------------------------------------------------------- rvk · 2024-12-05 22:54 Quote from: msintle on December 05, 2024, 11:29:48 pmSounds like a great point to start migrating your script to IAMP, but I was really hoping to get to the bottom of the Qt5 issue before doing any of that. I'm not familiar with IAMP (?) I was thinking about a text-menu. For my Windows script I do have a text menu in the batch file. fpcupdeluxe is always a much more elaborate way to install. I created my script just got me, to just simply install only the options I want/need. In fpcupdeluxe you have a lot more options from which you can choose. (I could never fit that into a 'simple' script  ) ---------------------------------------------------------------------- msintle · 2024-12-05 23:04 Oh wow, a text menu! Well, your script has worked for me on devices where FPCUPDLX fails, so dare I say you've done a great job? ---------------------------------------------------------------------- rvk · 2024-12-06 09:24 Don't read to much in "text menu"  It's just a few options. Because on Windows I needed 64 and 32 bit. The Linux script doesn't have (or had) that many options. Architecture and bitness is determined by the system and I had no need for cross- compilation etc. I also wanted to avoid pulling in too many dependencies for it. For Windows you could for example use something elaborate like Chris Titus has done with iwr (https://christitus.com/windows-tool/). It creates a complete Windows menu from Powershell. On Linux I could have used ncurses for text-menus. But then I would have needed to check (and possibly install) the ncurses dependencies, cluttering the system before I even got to compiling. So I normally try to keep it as simple as possible. And that also the reason why it worked. The problem with fpcupdeluxe was that it is programmed in Lazarus. And your system just happened to have a problem with all Lazarus compiled applications (due to the not masking of the exception). So fpcupdeluxe just didn't work. A simple script does. Power of simplicity    Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ----------- ----------------------------------------------------------------"Lazar us & FPC Updater"----------------------------------------------------- ---------------------- "Updating current installation in Q:\dev64" 1. [X] Clone or Pull FPC2. [X] Compile FPC3. [X] Clone or Pull Lazarus4. [X] Compile Lazarus5. [X] Configure Lazarus 6. [X] Compile 64 bit R = RUN the selected choicesQ = Quit Enter Choice : ---------------------------------------------------------------------- msintle · 2024-12-06 11:18 So cool! The IAMP you asked about (InstallAware Multi Platform) has similar tricks I wrote about above - if the GUI cannot boot, it falls back to console rendering - retaining all your custom dialog designs in the process. I really want to take a look at building a Lazarus installer in IAMP, with your script as a starting point. Anyways, my Fedora FPCUPDLX Qt5 installation ended up producing a GTK2 version of Lazarus instead. I'd installed Lazarus GTK2 earlier from the "Store" of the operating system previously, so I figured that might be to blame. Flattened the VM, downgraded from Fedora 41 to Fedora 40 as a result (turns out I hadn't updated my snapshot for v41). Now reinstalling with FPCUPDLX Qt5 after installing libqt5pas and libqt5pasdevel using RPM packages. Hopefully this gets the right version of Lazarus installed, and I can start troubleshooting what's wrong with common dialog boxes upon close on this platform. FPCUPDLX Qt5 failed on Centos 9, the other reproducing OS, sadly. I hate it when it does that - again, your script works where it so very often fails in this manner; but my hands have been tied by the Qt5 constraint this time. ---------------------------------------------------------------------- rvk · 2024-12-06 11:49 Quote from: msintle on December 06, 2024, 12:18:31 pmAnyways, my Fedora FPCUPDLX Qt5 installation ended up producing a GTK2 version of Lazarus instead. If you have the GTK2 version you can just recompile it inside Lazarus itself with Qt5. You do need qt5pas-devel: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i sudo dnf install qt5pas-develBut after that, you can start Lazarus and go to Tools > Configure Build Lazarus and then check the LCL widget type as qt5. After that press Build and Lazarus will rebuild itself as Qt5  (I just did this and it works under Fedora) Hardest part in changing my script was finding the correct dependencies (no build-essentials package). I now have these and am not sure yet if they are sufficient. But I've got it working here (need some rework and I'll post the latest result). Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i sudo dnf -y install make binutils gdb git zip unzip pvsudo dnf -y install libX11-devel gtk2-devel gtk+-devel  # for Lazarus, includes all dependenciessudo dnf -y install gcc gcc-c++ kernel-devel Problem is that I couldn't do make bigide from the terminal after a successful compile to switch to Qt5 (it gave me target errors). ---------------------------------------------------------------------- msintle · 2024-12-06 14:07 Music to my ears. In my latest test, Fedora failed to install Qt5 Lazarus with FPCUPDLX, so whatever had happened in my immediately preceding test succeeding with the GTK2 version of Lazarus probably only succeeded because FPCUPDLX got confused about the widgets somehow and built the wrong thing instead of the right thing, which would have failed. So yes your latest post is music to my ears, as I just checked official downloads for Lazarus on the site and there's no mention of widgets at all for the RPM downloads (meaning they're GTK2). I was about to ask what next I could try. As I await your latest script I'll reinstall the GTK2 version of Lazarus and try to rebuild Lazarus manually for Qt5 and try to get things rolling that way. Hopefully by then you'll have a solid grasp on why bigide is failing and even a fix for it, perhaps. Many thanks once again for your support, and wishing you an awesome weekend! ---------------------------------------------------------------------- rvk · 2024-12-06 16:54 Here is my new version. Tested in Fedora and will compile Qt5 directly. (see the LCL_PLATFORM option at the top) Currently zip=1 so it will use the zip download from github instead of cloning the entire repository. You'll loose the ability to browse through all the changes in the repository but for testing this doesn't matter. (Those options would be where a menu comes in handy ) I also see I need to copy the desktop shortcut to ~/.local/share/applications because Fedora doesn't have a desktop but it needs the shortcut there to appear in the All Programs. Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i #!/bin/bash# ======================================================# by rvk (v.2.1, 2024-12-06)# ====================================================== echo ""echo "=============================================================="echo "Running on: $(sed 's/\x0/ /' /sys/firmware/devicetree/base/model 2>/dev/null || cat /sys/devices/virtual/dmi/id/product_name 2>/dev/null || echo Unknown)" # ======================================================# setup versions, download and compile# ====================================== ================ #fpc_version="release_3_2_0"#laz_version="lazarus_2_0 _12" #fastzip=1 # repositoryfpc_git=1laz_git=1 # compilefpc_compile=1laz_compile=1 LCL_PLATFORM=qt5#LCL_PLATFORM=gtk2 # ======================================================# check if we are running in bash instead of shps $$ 2>&1 | grep bash > /dev/null 2>&1 && echo "Running in bash. continuing..." || { echo "Not running in bash. Aborting..."; exit 1; } # ======================================================# optional use zram as swapfile# ======================================================# not done yet # ======================================================# minimal swap space needed is 1024MB# ======================================================while true; do   FREESWAP=$(free | grep -i swap | awk '{print $2}')  if [ $FREESWAP -lt 900000 ]; then     echo "=============================================================="    echo "Current swapsize is $FREESWAP"    echo "Swapsize is really small. Recomended size is 1024MB (1GB).";    echo "=============================================================="     read -n1 -p "Do you want to increase it to 1024MB (1GB) or continue without swap? [y/n/c] " yn    echo ""    case $yn in      [Cc]* ) break;;      [Yy]* ) ;;      [Nn]* ) echo >&2 "Please increase the swap space manually. Aborting..."; exit 1;;      [Qq]* ) exit 1;;    * ) echo "Please answer yes or no."; echo ""; continue;;    esac     # we can increase this if /etc/dphys-swapfile exists    [ -f /etc/dphys- swapfile ] && {      echo "=============================================================="      echo "Setting in /etc/dphys-swapfile $(cat /etc/dphys-swapfile | grep CONF_SWAPSIZE)"      echo "Increasing value and restarting swap"      sudo sed -i 's/CONF_SWAPSIZE=[0-9]*$/CONF_SWAPSIZE=1024/g' /etc/dphys- swapfile      sudo /etc/init.d/dphys-swapfile stop      sudo /etc/init.d/dphys-swapfile restart      echo "=============================================================="    } || {      echo "=============================================================="      echo "Setting up /swapfile"      DATE=$(date +%s)      sudo fallocate -l 4G "/swapfile.$DATE" \      && sudo chmod 600 "/swapfile.$DATE" \    && sudo mkswap "/swapfile.$DATE" \      && sudo swapon "/swapfile.$DATE" \      && sudo swapon --show \      && echo "Created and turned on /swapfile.$DATE" \      && echo "Note: This is not permanent."      echo "=============================================================="    }   else    echo "Current swapsize is $FREESWAP. Ok"    break;  fi done # ======================================================begin=$(date +%s) # ======================================================# update packages list to latest version# ======================================================echo "=============================================================="echo ""echo "Updating package list to latest version (sudo needed)"echo "" PKG_MANAGER=""command -v dnf >&1 >/dev/null && PKG_MANAGER="dnf"command -v apt-get >&1 >/dev/null && PKG_MANAGER="apt" # ======================================================# some other essentials# ======================================================echo "=============================================================="echo ""echo "Installing required packages (sudo used)"echo ""if [ "$PKG_MANAGER" = "apt" ]; then  sudo apt-get -y install make binutils build-essential gdb git subversion zip unzip pv  sudo apt-get -y install libx11-dev libgtk2.0-dev  # for Lazarus, includes all dependencies   if [ "$LCL_PLATFORM" = "qt5" ]; then sudo apt-get -y install libqt5pas-dev; fi elif [ "$PKG_MANAGER" = "dnf" ]; then  # dnf search gtk2*  sudo dnf -y install make binutils gdb git zip unzip pv  sudo dnf -y install libX11-devel gtk2-devel gtk+-devel  # for Lazarus, includes all dependencies  sudo dnf -y install gcc gcc-c++ kernel- devel   if [ "$LCL_PLATFORM" = "qt5" ]; then sudo dnf -y install qt5pas-devel; fi else  echo >&2 "Neither yum/dnf nor apt-get found. Aborting."; exit 1;fi # sudo apt-get -y install libx11-dev libgdk- pixbuf2.0-dev libcairo2-dev lpango-1.0 libpangox-1.0-dev xorg-dev libatk1.0-dev libgtk2.0-dev# libgtk2.0-dev libcairo2-dev libpango1.0-dev libgdk-pixbuf2.0-dev libatk1.0-dev libghc-x11-dev# or# xorg-dev libssl-dev libx11-dev libgdk-pixbuf2.0-dev # libcairo2-dev lpango-1.0 libpangox-1.0-dev libatk1.0-dev libgtk2.0-dev git --version >/dev/null 2>&1 || { echo >&2 "I require git but it's not installed. Aborting."; exit 1; } # ======================================================## ============= =========================================BASE=$HOME/devmkdir -p $BASEcd $BASE # ======================================================# We need a bootstrap compiler fpc 3.2.2# There is NONE AVAILABLE so we need to download complete# fpc-3.2.2.arm-linux-raspberry1wq.tar# in virtualbox Rasbian stretch we need i386# ====================================================== echo "=============================================================="echo ""CPU=$(uname -m)                  # armv7l, aarch64, x86_64 # note L not 1#CPU=$(dpkg --print-architecture) # armhf, arm64, if [ "$CPU" = "armv7l" ]; then # note L not 1  echo "Compiling for ARMv7 Processor (Pi2 and higher only)"  OPTIONS_FPC="-g -gl -gw3 -O2 -Xs -CX -XX -v0 -dFPC_ARMHF"  OPTIONS_LAZ="-g -gl -gw3 -v0"  OS_TARGET="linux"  CPU_TARGET="arm"  COMP3_DOWNLOAD="https://downloads.freepascal.org/fpc/dist/3.2.2/arm- linux/fpc-3.2.2.arm-linux.tar" # complete version  COMP=ppcarmelif [ "$CPU" = "aarch64" ]; then  echo "Compiling for ARM64 Processor (Pi2 and higher only)"  OPTIONS_FPC="-g -gl -gw3 -O2 -Xs -CX -XX -v0 -dFPC_ARMHF"  OPTIONS_LAZ="-g -gl -gw3 -v0"  OS_TARGET="linux"  CPU_TARGET="aarch64"  COMP3_DOWNLOAD="https://downloads.freepascal.org /fpc/dist/3.2.2/aarch64-linux/fpc-3.2.2.aarch64-linux.tar" # complete version  COMP=ppca64elif [ "$CPU" = "x86_64" ]; then  echo "Compiling for x64 Processor"  OPTIONS_FPC="-g -gl -gw3 -O2 -Xs -CX -XX -v0"  OPTIONS_LAZ="-g -gl -gw3 -v0"  OS_TARGET="linux"  CPU_TARGET="x86_64"  COMP3_DOWNLOAD="https://downloads.freepascal.org/fpc/dist/3.2.2/x86_64 -linux/fpc-3.2.2.x86_64-linux.tar" # complete version  COMP=ppcx64elif [ "$CPU" = "i686" ]; then  echo "Compiling for i686 Processor"  OPTIONS_FPC="-g -gl -gw3 -O2 -Xs -CX -XX -v0 -dFPC_I386"  OPTIONS_LAZ="-g -gl -gw3 -v0"  OS_TARGET="linux"  CPU_TARGET="i386"  C OMP3_DOWNLOAD="https://downloads.freepascal.org/fpc/dist/3.2.2/i386- linux/fpc-3.2.2.i386-linux.tar" # complete version  COMP=ppc386else  echo >&2 "$CPU is not supported as processor (needed armv7l/x86_64/i686). Aborting."; exit 1;fi # ------------------------------------------------------ echo "=============================================================="if [ ! -x ./bootstrap/$COMP ]; then  echo "Downloading compiler 3.2.2"  echo ""  wget --continue --quiet -O- $COMP3_DOWNLOAD |\  tar -O -xf- --wildcards --no-anchored "binary*-linux.tar" --strip=1 |\  tar -O -xf- --wildcards --no-anchored "base.*-linux.tar.gz" |\  tar -xzf- --wildcards --no-anchored "lib/fpc/*/ppc*" --transform "s|lib/fpc/.*/ppc|./bootstrap/ppc|"fi[ -x ./bootstrap/$COMP ] || { echo >&2 "Bootstrap $BASE/bootstrap/$COMP compiler not found. Aborting."; exit 1; } echo "Using bootstrap $BASE/bootstrap/$COMP compiler"echo "" # ======================================================# downloading fpc and lazarus# ======================================================if [ "$zip" = "1" ]; then   wget --continue --quiet -O fpc.zip "https://gitlab.com/freepascal.org/fpc/source/-/archive/main/source- main.zip"  wget --continue --quiet -O laz.zip "https://gitlab.com/free pascal.org/lazarus/lazarus/-/archive/main/lazarus-main.zip"  unzip -q fpc.zip  unzip -q laz.zip  mv lazarus-main lazarus  mv source-main fpc else   if [ "$fpc_git" = "1" ]; then     echo "=============================================================="    echo ""    echo "Downloading FPC sources $(git -C fpc log -1 2>&1 | grep Date)"    echo ""    [ -d ./fpc ] && { git -C fpc reset --hard && git -C fpc pull -q; } || { git clone https://gitlab.com/freepascal.org/fpc/source.git fpc; }    [ -f ./fpc/Makefile ] || { echo >&2 "Download of fpc failed. Aborting."; exit 1; }    echo "Now: $(git -C fpc log -1 | grep Date 2>&1)"    echo ""   fi   if [ "$laz_git" = "1" ]; then     echo "Downloading Lazarus sources $(git -C lazarus log -1 2>&1 | grep Date)"    [ -d ./lazarus ] && { git -C lazarus reset --hard && git -C lazarus pull -q; } || { git clone https://gitlab.com/freepascal.org/lazarus/lazarus.git lazarus; }    [ -f ./lazarus/Makefile ] || { echo >&2 "Download of fpc failed. Aborting."; exit 1; }    echo "Now: $(git -C lazarus log -1 | grep Date 2>&1)"    echo ""   fi   if [ "$fpc_version" != "" ]; then    echo "Switch to fpc $fpc_version"    git -C fpc checkout tags/$fpc_version  fi   if [ "$laz_version" != "" ]; then    echo "Switch to lazarus $laz_version"    git -C lazarus checkout tags/$laz_version  fi fi # ======================================================# compiling fpc# ======================================================if [ "$fpc_compile" = "1" ]; then echo "=============================================================="echo ""echo "Now compiling FPC, this will take some time"echo ""cd $BASE/fpc echo "Cleaning up"# find . -name "*.ppu" -type f -delete# find . -name "*.o" -type f -delete# make clean distclean cleanall > /dev/null 2>&1git clean -xdf > /dev/null 2>&1    # will clean untracked files and directories echo "make -s all install OPT=\"$OPTIONS_FPC\" OS_TARGET=$OS_TARGET CPU_TARGET=$CPU_TARGET INSTALL_PREFIX=$BASE/fpc PP=$BASE/bootstrap/$COMP" make -s all install OPT="$OPTIONS_FPC" OS_TARGET=$OS_TARGET CPU_TARGET=$CPU_TARGET INSTALL_PREFIX=$BASE/fpc PP=$BASE/bootstrap/$COMP \  | pv -l -bp -s2500 >$BASE/fpc.log \  || { echo >&2 "Compilation of FPC failed. Aborting."; exit 1; }cd $BASE[ -x ./fpc/bin/fpc ] || { echo >&2 "Something went wrong compiling FPC. Aborting."; exit 1; } echo ""echo "Doing some extra configuration" # remove old config[ -f $HOME/.fpc.cfg ] && rm $HOME/.fpc.cfgln -sf $(find $BASE/fpc/lib -name $COMP    ) $BASE/fpc/bin/$COMPln -sf $(find $BASE/fpc/lib -name samplecfg) $BASE/fpc/bin/samplecfg# ln -sf $BASE/fpc/lib/fpc/3.3.1/$COMP $BASE/fpc/bin/$COMP# ln -sf $BASE/fpc/lib/fpc/3.3.1/samplecfg $BASE/fpc/bin/samplecfg$BASE/fpc/bin/fpcmkcfg -d basepath=$BASE/fpc -o $HOME/.fpc.cfg # sudo find / -name crtbegin.o# This library needs to be added to the fpc.cfg file. cat << EOF >> $HOME/.fpc.cfg- Fu$BASE/fpc/lib/fpc/\$fpcversion/units/\$fpctarget-Fu$BASE/fpc/lib/fpc /\$fpcversion/units/\$fpctarget/*- Fu$BASE/fpc/lib/fpc/\$fpcversion/units/\$fpctarget/rtl-Fl$(dirname $(gcc --print-file-name=crtbegin.o))-FD$BASE/fpc/binEOF echo ""echo "Doing some extra configuration"echo "" # set path withhout old fpcPATH=$(echo $PATH | sed "s|$BASE/fpc/bin\:||g") # strip previous $BASE from .profilesed -i '/# FPC PATH/,/fi/d' $HOME/.bash_profile cat << EOF >> $HOME/.bash_profile # FPC PATHif [ -d $BASE/fpc/bin ] ; then    PATH="$BASE/fpc/bin:\$PATH"fiEOF # replace all double empty lines with onesed -i '/^$/N;/^\n$/D' $HOME/.bash_profile echo "" fi # fpc_compile # ======================================================# compiling lazarus# ======================================================if [ "$laz_compile" = "1" ]; then echo "=============================================================="echo ""echo "Now compiling Lazarus, this will take some time"echo ""cd $BASE/lazarus echo "Cleaning up"# find . -name "*.ppu" -type f -delete# find . -name "*.o" -type f -delete# make clean distclean cleanall > /dev/null 2>&1git clean -xdf > /dev/null 2>&1    # will clean untracked files and directories echo "make -s bigide OS_TARGET=$OS_TARGET CPU_TARGET=$CPU_TARGET OPT=\"$OPTIONS_LAZ\" PP=$BASE/fpc/bin/fpc" # make bigide OS_TARGET="linux" CPU_TARGET="x86_64" OPT="-g -gl -gw3 -v0" LCL_PLATFORM=qt5# make bigide LCL_PLATFORM=qt5 make -s bigide LCL_PLATFORM=$LCL_PLATFORM OS_TARGET=$OS_TARGET CPU_TARGET=$CPU_TARGET OPT="$OPTIONS_LAZ" PP=$BASE/fpc/bin/fpc \  | pv -l -bp >$BASE/laz.log \  || { echo >&2 "Compilation of Lazarus failed. Aborting."; exit 1; }cd $BASE[ -f ./lazarus/lazarus ] || { echo >&2 "Something went wrong compiling Lazarus. Aborting."; exit 1; } echo ""echo "Creating desktop icon"echo "" # ~/.local/share/applications/Lazarus.desktop# $HOME/Desktop/Lazarus.desktop# $(INSTALL_PREFIX)/share/applications/lazarus.desktop cat << EOF > $HOME/Desktop/Lazarus.desktop[Desktop Entry]Name=LazarusComment=Lazaru sIcon=$BASE/lazarus/images/ide_icon48x48.pngExec=$BASE/lazarus/startla zarusPath=$BASE/lazarusType=ApplicationEncoding=UTF- 8Terminal=falseCategories=None;EOF fi end=$(date +%s)echo "=============================================================="echo ""echo "$((($end-$begin) / 60)) minutes and $((($end-$begin) % 60)) seconds elapsed."echo ""echo "We are done. Please logout and back in before starting Lazarus"echo "Otherwise you need to supply the fpc location on 1st start"echo ""echo "=============================================================="echo "" ---------------------------------------------------------------------- msintle · 2024-12-06 19:02 Quote from: rvk on December 06, 2024, 05:54:52 pmHere is my new version. Tested in Fedora and will compile Qt5 directly. (see the LCL_PLATFORM option at the top) Currently zip=1 so it will use the zip download from github instead of cloning the entire repository. You'll loose the ability to browse through all the changes in the repository but for testing this doesn't matter. (Those options would be where a menu comes in handy ) I also see I need to copy the desktop shortcut to ~/.local/share/applications because Fedora doesn't have a desktop but it needs the shortcut there to appear in the All Programs. Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i #!/bin/bash# ======================================================# by rvk (v.2.1, 2024-12-06)# ====================================================== echo ""echo "=============================================================="echo "Running on: $(sed 's/\x0/ /' /sys/firmware/devicetree/base/model 2>/dev/null || cat /sys/devices/virtual/dmi/id/product_name 2>/dev/null || echo Unknown)" # ======================================================# setup versions, download and compile# ====================================== ================ #fpc_version="release_3_2_0"#laz_version="lazarus_2_0 _12" #fastzip=1 # repositoryfpc_git=1laz_git=1 # compilefpc_compile=1laz_compile=1 LCL_PLATFORM=qt5#LCL_PLATFORM=gtk2 # ======================================================# check if we are running in bash instead of shps $$ 2>&1 | grep bash > /dev/null 2>&1 && echo "Running in bash. continuing..." || { echo "Not running in bash. Aborting..."; exit 1; } # ======================================================# optional use zram as swapfile# ======================================================# not done yet # ======================================================# minimal swap space needed is 1024MB# ======================================================while true; do   FREESWAP=$(free | grep -i swap | awk '{print $2}')  if [ $FREESWAP -lt 900000 ]; then     echo "=============================================================="    echo "Current swapsize is $FREESWAP"    echo "Swapsize is really small. Recomended size is 1024MB (1GB).";    echo "=============================================================="     read -n1 -p "Do you want to increase it to 1024MB (1GB) or continue without swap? [y/n/c] " yn    echo ""    case $yn in      [Cc]* ) break;;      [Yy]* ) ;;      [Nn]* ) echo >&2 "Please increase the swap space manually. Aborting..."; exit 1;;      [Qq]* ) exit 1;;    * ) echo "Please answer yes or no."; echo ""; continue;;    esac     # we can increase this if /etc/dphys-swapfile exists    [ -f /etc/dphys- swapfile ] && {      echo "=============================================================="      echo "Setting in /etc/dphys-swapfile $(cat /etc/dphys-swapfile | grep CONF_SWAPSIZE)"      echo "Increasing value and restarting swap"      sudo sed -i 's/CONF_SWAPSIZE=[0-9]*$/CONF_SWAPSIZE=1024/g' /etc/dphys- swapfile      sudo /etc/init.d/dphys-swapfile stop      sudo /etc/init.d/dphys-swapfile restart      echo "=============================================================="    } || {      echo "=============================================================="      echo "Setting up /swapfile"      DATE=$(date +%s)      sudo fallocate -l 4G "/swapfile.$DATE" \      && sudo chmod 600 "/swapfile.$DATE" \    && sudo mkswap "/swapfile.$DATE" \      && sudo swapon "/swapfile.$DATE" \      && sudo swapon --show \      && echo "Created and turned on /swapfile.$DATE" \      && echo "Note: This is not permanent."      echo "=============================================================="    }   else    echo "Current swapsize is $FREESWAP. Ok"    break;  fi done # ======================================================begin=$(date +%s) # ======================================================# update packages list to latest version# ======================================================echo "=============================================================="echo ""echo "Updating package list to latest version (sudo needed)"echo "" PKG_MANAGER=""command -v dnf >&1 >/dev/null && PKG_MANAGER="dnf"command -v apt-get >&1 >/dev/null && PKG_MANAGER="apt" # ======================================================# some other essentials# ======================================================echo "=============================================================="echo ""echo "Installing required packages (sudo used)"echo ""if [ "$PKG_MANAGER" = "apt" ]; then  sudo apt-get -y install make binutils build-essential gdb git subversion zip unzip pv  sudo apt-get -y install libx11-dev libgtk2.0-dev  # for Lazarus, includes all dependencies   if [ "$LCL_PLATFORM" = "qt5" ]; then sudo apt-get -y install libqt5pas-dev; fi elif [ "$PKG_MANAGER" = "dnf" ]; then  # dnf search gtk2*  sudo dnf -y install make binutils gdb git zip unzip pv  sudo dnf -y install libX11-devel gtk2-devel gtk+-devel  # for Lazarus, includes all dependencies  sudo dnf -y install gcc gcc-c++ kernel- devel   if [ "$LCL_PLATFORM" = "qt5" ]; then sudo dnf -y install qt5pas-devel; fi else  echo >&2 "Neither yum/dnf nor apt-get found. Aborting."; exit 1;fi # sudo apt-get -y install libx11-dev libgdk- pixbuf2.0-dev libcairo2-dev lpango-1.0 libpangox-1.0-dev xorg-dev libatk1.0-dev libgtk2.0-dev# libgtk2.0-dev libcairo2-dev libpango1.0-dev libgdk-pixbuf2.0-dev libatk1.0-dev libghc-x11-dev# or# xorg-dev libssl-dev libx11-dev libgdk-pixbuf2.0-dev # libcairo2-dev lpango-1.0 libpangox-1.0-dev libatk1.0-dev libgtk2.0-dev git --version >/dev/null 2>&1 || { echo >&2 "I require git but it's not installed. Aborting."; exit 1; } # ======================================================## ============= =========================================BASE=$HOME/devmkdir -p $BASEcd $BASE # ======================================================# We need a bootstrap compiler fpc 3.2.2# There is NONE AVAILABLE so we need to download complete# fpc-3.2.2.arm-linux-raspberry1wq.tar# in virtualbox Rasbian stretch we need i386# ====================================================== echo "=============================================================="echo ""CPU=$(uname -m)                  # armv7l, aarch64, x86_64 # note L not 1#CPU=$(dpkg --print-architecture) # armhf, arm64, if [ "$CPU" = "armv7l" ]; then # note L not 1  echo "Compiling for ARMv7 Processor (Pi2 and higher only)"  OPTIONS_FPC="-g -gl -gw3 -O2 -Xs -CX -XX -v0 -dFPC_ARMHF"  OPTIONS_LAZ="-g -gl -gw3 -v0"  OS_TARGET="linux"  CPU_TARGET="arm"  COMP3_DOWNLOAD="https://downloads.freepascal.org/fpc/dist/3.2.2/arm- linux/fpc-3.2.2.arm-linux.tar" # complete version  COMP=ppcarmelif [ "$CPU" = "aarch64" ]; then  echo "Compiling for ARM64 Processor (Pi2 and higher only)"  OPTIONS_FPC="-g -gl -gw3 -O2 -Xs -CX -XX -v0 -dFPC_ARMHF"  OPTIONS_LAZ="-g -gl -gw3 -v0"  OS_TARGET="linux"  CPU_TARGET="aarch64"  COMP3_DOWNLOAD="https://downloads.freepascal.org /fpc/dist/3.2.2/aarch64-linux/fpc-3.2.2.aarch64-linux.tar" # complete version  COMP=ppca64elif [ "$CPU" = "x86_64" ]; then  echo "Compiling for x64 Processor"  OPTIONS_FPC="-g -gl -gw3 -O2 -Xs -CX -XX -v0"  OPTIONS_LAZ="-g -gl -gw3 -v0"  OS_TARGET="linux"  CPU_TARGET="x86_64"  COMP3_DOWNLOAD="https://downloads.freepascal.org/fpc/dist/3.2.2/x86_64 -linux/fpc-3.2.2.x86_64-linux.tar" # complete version  COMP=ppcx64elif [ "$CPU" = "i686" ]; then  echo "Compiling for i686 Processor"  OPTIONS_FPC="-g -gl -gw3 -O2 -Xs -CX -XX -v0 -dFPC_I386"  OPTIONS_LAZ="-g -gl -gw3 -v0"  OS_TARGET="linux"  CPU_TARGET="i386"  C OMP3_DOWNLOAD="https://downloads.freepascal.org/fpc/dist/3.2.2/i386- linux/fpc-3.2.2.i386-linux.tar" # complete version  COMP=ppc386else  echo >&2 "$CPU is not supported as processor (needed armv7l/x86_64/i686). Aborting."; exit 1;fi # ------------------------------------------------------ echo "=============================================================="if [ ! -x ./bootstrap/$COMP ]; then  echo "Downloading compiler 3.2.2"  echo ""  wget --continue --quiet -O- $COMP3_DOWNLOAD |\  tar -O -xf- --wildcards --no-anchored "binary*-linux.tar" --strip=1 |\  tar -O -xf- --wildcards --no-anchored "base.*-linux.tar.gz" |\  tar -xzf- --wildcards --no-anchored "lib/fpc/*/ppc*" --transform "s|lib/fpc/.*/ppc|./bootstrap/ppc|"fi[ -x ./bootstrap/$COMP ] || { echo >&2 "Bootstrap $BASE/bootstrap/$COMP compiler not found. Aborting."; exit 1; } echo "Using bootstrap $BASE/bootstrap/$COMP compiler"echo "" # ======================================================# downloading fpc and lazarus# ======================================================if [ "$zip" = "1" ]; then   wget --continue --quiet -O fpc.zip "https://gitlab.com/freepascal.org/fpc/source/-/archive/main/source- main.zip"  wget --continue --quiet -O laz.zip "https://gitlab.com/free pascal.org/lazarus/lazarus/-/archive/main/lazarus-main.zip"  unzip -q fpc.zip  unzip -q laz.zip  mv lazarus-main lazarus  mv source-main fpc else   if [ "$fpc_git" = "1" ]; then     echo "=============================================================="    echo ""    echo "Downloading FPC sources $(git -C fpc log -1 2>&1 | grep Date)"    echo ""    [ -d ./fpc ] && { git -C fpc reset --hard && git -C fpc pull -q; } || { git clone https://gitlab.com/freepascal.org/fpc/source.git fpc; }    [ -f ./fpc/Makefile ] || { echo >&2 "Download of fpc failed. Aborting."; exit 1; }    echo "Now: $(git -C fpc log -1 | grep Date 2>&1)"    echo ""   fi   if [ "$laz_git" = "1" ]; then     echo "Downloading Lazarus sources $(git -C lazarus log -1 2>&1 | grep Date)"    [ -d ./lazarus ] && { git -C lazarus reset --hard && git -C lazarus pull -q; } || { git clone https://gitlab.com/freepascal.org/lazarus/lazarus.git lazarus; }    [ -f ./lazarus/Makefile ] || { echo >&2 "Download of fpc failed. Aborting."; exit 1; }    echo "Now: $(git -C lazarus log -1 | grep Date 2>&1)"    echo ""   fi   if [ "$fpc_version" != "" ]; then    echo "Switch to fpc $fpc_version"    git -C fpc checkout tags/$fpc_version  fi   if [ "$laz_version" != "" ]; then    echo "Switch to lazarus $laz_version"    git -C lazarus checkout tags/$laz_version  fi fi # ======================================================# compiling fpc# ======================================================if [ "$fpc_compile" = "1" ]; then echo "=============================================================="echo ""echo "Now compiling FPC, this will take some time"echo ""cd $BASE/fpc echo "Cleaning up"# find . -name "*.ppu" -type f -delete# find . -name "*.o" -type f -delete# make clean distclean cleanall > /dev/null 2>&1git clean -xdf > /dev/null 2>&1    # will clean untracked files and directories echo "make -s all install OPT=\"$OPTIONS_FPC\" OS_TARGET=$OS_TARGET CPU_TARGET=$CPU_TARGET INSTALL_PREFIX=$BASE/fpc PP=$BASE/bootstrap/$COMP" make -s all install OPT="$OPTIONS_FPC" OS_TARGET=$OS_TARGET CPU_TARGET=$CPU_TARGET INSTALL_PREFIX=$BASE/fpc PP=$BASE/bootstrap/$COMP \  | pv -l -bp -s2500 >$BASE/fpc.log \  || { echo >&2 "Compilation of FPC failed. Aborting."; exit 1; }cd $BASE[ -x ./fpc/bin/fpc ] || { echo >&2 "Something went wrong compiling FPC. Aborting."; exit 1; } echo ""echo "Doing some extra configuration" # remove old config[ -f $HOME/.fpc.cfg ] && rm $HOME/.fpc.cfgln -sf $(find $BASE/fpc/lib -name $COMP    ) $BASE/fpc/bin/$COMPln -sf $(find $BASE/fpc/lib -name samplecfg) $BASE/fpc/bin/samplecfg# ln -sf $BASE/fpc/lib/fpc/3.3.1/$COMP $BASE/fpc/bin/$COMP# ln -sf $BASE/fpc/lib/fpc/3.3.1/samplecfg $BASE/fpc/bin/samplecfg$BASE/fpc/bin/fpcmkcfg -d basepath=$BASE/fpc -o $HOME/.fpc.cfg # sudo find / -name crtbegin.o# This library needs to be added to the fpc.cfg file. cat << EOF >> $HOME/.fpc.cfg- Fu$BASE/fpc/lib/fpc/\$fpcversion/units/\$fpctarget-Fu$BASE/fpc/lib/fpc /\$fpcversion/units/\$fpctarget/*- Fu$BASE/fpc/lib/fpc/\$fpcversion/units/\$fpctarget/rtl-Fl$(dirname $(gcc --print-file-name=crtbegin.o))-FD$BASE/fpc/binEOF echo ""echo "Doing some extra configuration"echo "" # set path withhout old fpcPATH=$(echo $PATH | sed "s|$BASE/fpc/bin\:||g") # strip previous $BASE from .profilesed -i '/# FPC PATH/,/fi/d' $HOME/.bash_profile cat << EOF >> $HOME/.bash_profile # FPC PATHif [ -d $BASE/fpc/bin ] ; then    PATH="$BASE/fpc/bin:\$PATH"fiEOF # replace all double empty lines with onesed -i '/^$/N;/^\n$/D' $HOME/.bash_profile echo "" fi # fpc_compile # ======================================================# compiling lazarus# ======================================================if [ "$laz_compile" = "1" ]; then echo "=============================================================="echo ""echo "Now compiling Lazarus, this will take some time"echo ""cd $BASE/lazarus echo "Cleaning up"# find . -name "*.ppu" -type f -delete# find . -name "*.o" -type f -delete# make clean distclean cleanall > /dev/null 2>&1git clean -xdf > /dev/null 2>&1    # will clean untracked files and directories echo "make -s bigide OS_TARGET=$OS_TARGET CPU_TARGET=$CPU_TARGET OPT=\"$OPTIONS_LAZ\" PP=$BASE/fpc/bin/fpc" # make bigide OS_TARGET="linux" CPU_TARGET="x86_64" OPT="-g -gl -gw3 -v0" LCL_PLATFORM=qt5# make bigide LCL_PLATFORM=qt5 make -s bigide LCL_PLATFORM=$LCL_PLATFORM OS_TARGET=$OS_TARGET CPU_TARGET=$CPU_TARGET OPT="$OPTIONS_LAZ" PP=$BASE/fpc/bin/fpc \  | pv -l -bp >$BASE/laz.log \  || { echo >&2 "Compilation of Lazarus failed. Aborting."; exit 1; }cd $BASE[ -f ./lazarus/lazarus ] || { echo >&2 "Something went wrong compiling Lazarus. Aborting."; exit 1; } echo ""echo "Creating desktop icon"echo "" # ~/.local/share/applications/Lazarus.desktop# $HOME/Desktop/Lazarus.desktop# $(INSTALL_PREFIX)/share/applications/lazarus.desktop cat << EOF > $HOME/Desktop/Lazarus.desktop[Desktop Entry]Name=LazarusComment=Lazaru sIcon=$BASE/lazarus/images/ide_icon48x48.pngExec=$BASE/lazarus/startla zarusPath=$BASE/lazarusType=ApplicationEncoding=UTF- 8Terminal=falseCategories=None;EOF fi end=$(date +%s)echo "=============================================================="echo ""echo "$((($end-$begin) / 60)) minutes and $((($end-$begin) % 60)) seconds elapsed."echo ""echo "We are done. Please logout and back in before starting Lazarus"echo "Otherwise you need to supply the fpc location on 1st start"echo ""echo "=============================================================="echo "" Awesome! Any chance you might be able to upload this inside a ZIP file like last time, to prevent any script corruptions that may happen as we previously encountered? ---------------------------------------------------------------------- rvk · 2024-12-06 19:22 Quote from: msintle on December 06, 2024, 08:02:43 pmAny chance you might be able to upload this inside a ZIP file like last time, to prevent any script corruptions that may happen as we previously encountered? Attached ---------------------------------------------------------------------- msintle · 2024-12-06 20:22 Thank you! While waiting for that I've been busy: - Installing Lazarus from the "store" on Fedora 40 - Then installing it via FPCUPDLX, getting the GTK2 build despite requesting the Qt5 build - Doing the rebuild as you suggested (this failed with the store version of the product, but worked with the FPCUPDLX version) so I had an actual Qt5 build - Recompiling all my code And bingo, the common file dialogs no longer crash my app upon cancel. But now I have a new message printed to the command line any time I launch my app: QSocketNotifier: Can only be used with threads started with QThread Any thoughts on how I can fix this one? The newer build of Lazarus clearly solved my problem here, but introduced a new scary warning above. I'll also archive and test on a clean Fedora 40 VM with your script shortly. Edit: There were other oddities with the Lazarus Qt5 version here, most notably that window locations did not persist, the main Lazarus window could not be resized, and that upon every launch, each Lazarus window invariably appeared at a new location. Not sure if this is a trunk effect, or outright emergent sentience on part of the software that is literally coming alive with seemingly random issues on each platform we try it on. ---------------------------------------------------------------------- msintle · 2024-12-06 22:01 Just finished installing your version! Again, the first line of Terminal output when I launched Lazarus from the Terminal (seeing as, exactly as you predicted, the Desktop shortcut was unrecognized) is exactly the same as in my post above (the part in bold). BTW where would I expect to find the FPC sources? Right now it's scanning the whole device, including the host OS, due to folder sharing ---------------------------------------------------------------------- rvk · 2024-12-06 22:14 Quote from: msintle on December 06, 2024, 11:01:03 pmBTW where would I expect to find the FPC sources? Right now it's scanning the whole device, including the host OS, due to folder sharing fpc executable is ~/dev/fpc/bin/fpc The source is in ~/dev/fpc After installing with the script it's best you logout first and then log back in. The ~/dev/fpc/bin is then added to the path. After starting lazarus then, the fpc executable is found. You only need to enter the directory for the source ~/dev/fpc I don't know why you get that warning message but it seems to be a common warning on Fedora (searching the internet for that message). ---------------------------------------------------------------------- rvk · 2024-12-08 15:29 BTW. I also have that warning on Fedora in Hyper-V on Intel. But it doesn't effect running programs at all. So you might want to check what your problems exactly are at the moment and maybe make some test programs to show those. The not persisting Window positions do indeed seem to be a problem in Qt5 / Wayland. Quoterik@localhost-live:~/dev/lazarus$ ./startlazarus QSocketNotifier: Can only be used with threads started with QThread Info: (startlazarus) [TLazarusManager.Run] starting /home/rik/dev/lazarus/lazarus ... Info: (startlazarus) [TLazarusManager.Run] exe=/home/rik/dev/lazarus/lazarus Params=[--started-by-startlazarus --no-splash-screen --force-new-instance ] QSocketNotifier: Can only be used with threads started with QThread Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="/home/rik/.lazarus" Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="/etc/lazarus" Looking for code tools config file:  "/home/rik/.lazarus/codetoolsoptions.xml" NOTE: codetools config file not found - using defaults NOTE: help options config file not found - using defaults qt.qpa.wayland: Wayland does not support QWindow::requestActivate() qt.qpa.wayland: Wayland does not support QWindow::requestActivate() qt.qpa.wayland: Wayland does not support QWindow::requestActivate() qt.qpa.wayland: Wayland does not support QWindow::requestActivate() Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-linux--qt5 New=x86_64-linux--qt5 Changed: OS/CPU=True LCL=False ### TCodeToolManager.HandleException: [20170421194936] "no pascal code found (first token is )" in "unit1.pas" qt.qpa.wayland: Wayland does not support QWindow::requestActivate() qt.qpa.wayland: Wayland does not support QWindow::requestActivate() qt.qpa.wayland: Wayland does not support QWindow::requestActivate() qt.qpa.wayland: Wayland does not support QWindow::requestActivate() qt.qpa.wayland: Wayland does not support QWindow::requestActivate() qt.qpa.wayland: Wayland does not support QWindow::requestActivate() ---------------------------------------------------------------------- msintle · 2024-12-09 00:52 Sorry I've been late in getting back to you! For now, I'll have to wait for QA to qualify whether all known Linux issues have been resolved. According to my tests, that's certainly the case - thanks to your help in no small part!!! Redirecting error output to a null handle tool care of the superfluous Qt5 errors on Fedora, and common file dialogs no longer crash on close. Sadly I have a feeling QA are going to notice the window positions, of course! ---------------------------------------------------------------------- rvk · 2024-12-11 09:41 Quote from: msintle on December 09, 2024, 01:52:27 amSadly I have a feeling QA are going to notice the window positions, of course! You could enable docking in the options. Then at least the windows will be visible. ---------------------------------------------------------------------- msintle · 2024-12-11 12:22 Quote from: rvk on December 11, 2024, 10:41:35 amQuote from: msintle on December 09, 2024, 01:52:27 amSadly I have a feeling QA are going to notice the window positions, of course! You could enable docking in the options. Then at least the windows will be visible. I was referring to random window positions in our own app when built with Qt5 in the latest Lazarus. What is the state of docking now, BTW? Which components are recommended to implement it? We never were able to get it working properly during our previous efforts, but it's been more than a year since we last tried. ---------------------------------------------------------------------- rvk · 2024-12-11 12:50 Quote from: msintle on December 11, 2024, 01:22:38 pmI was referring to random window positions in our own app when built with Qt5 in the latest Lazarus.Ha yes, I see. Strange that this isn't addressed yet. https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40695 Quote from: msintle on December 11, 2024, 01:22:38 pmWhat is the state of docking now, BTW? Which components are recommended to implement it? We never were able to get it working properly during our previous efforts, but it's been more than a year since we last tried. If AnchorDockingDsgn and DockedFormEditor are installed, you have the options under Tools > Options > Environment to enable them. (Docking / AnchorDocking and Docked Form Editor) I think they are installed automatically with BigIDE but not enabled by default (or you might get a setup during first start). If not, you can install them and then you do get the setup dialog during start. ---------------------------------------------------------------------- msintle · 2024-12-12 19:40 Do we actually have an up-to-date best practice document and/or just component recommendation to implement cross platform docking in our own apps? ---------------------------------------------------------------------- dsiders · 2024-12-12 19:53 Quote from: rvk on December 11, 2024, 01:50:24 pmQuote from: msintle on December 11, 2024, 01:22:38 pmI was referring to random window positions in our own app when built with Qt5 in the latest Lazarus. Ha yes, I see. Strange that this isn't addressed yet. https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40695 What's strange about it? It's a QT5+Wayland issue. Wayland is brain- dead and there's nothing LCL can do about that. ---------------------------------------------------------------------- rvk · 2024-12-12 20:24 Ok, there is a warning about wayland. https://wiki.freepascal.org/Qt5_Interface#Systems_using_Wayland Although the warning mentioned another problem (not the window positions). So wayland and Qt5/Qt6 is a no-go. https://www.reddit.com/r/linux/comments/16vciex/lets_make_wayland_have _support_for_window/ (And wayland is becoming more and more mainstream so Qt5/Qt6 is no longer  advisable on Linux.) ---------------------------------------------------------------------- dsiders · 2024-12-12 22:02 Quote from: rvk on December 12, 2024, 09:24:48 pmOk, there is a warning about wayland. https://wiki.freepascal.org/Qt5_Interface#Systems_using_Wayland Although the warning mentioned another problem (not the window positions). So wayland and Qt5/Qt6 is a no-go. https://www.reddit.com/r/linux/comments/16vciex/lets_make_wayland_have _support_for_window/ (And wayland is becoming more and more mainstream so Qt5/Qt6 is no longer  advisable on Linux.) That's a lot of jumping to conclusions. Wayland is brain-dead, so use X11. If you're using a Linux distro that only offers Wayland, you're on the wrong Linux distro. QT5 and Qt6 are just fine. The problem is the pissing contest between KDE/Gnome/Wayland. I don't care how many decades Wayland has been around now, it's still not ready for prime time if it can't display a window in a specific position or with an icon that's not in a .desktop file. Fundamental stuff. It's simple. Just use X11. Migrate if you can't. ---------------------------------------------------------------------- msintle · 2024-12-13 10:51 Quote from: dsiders on December 12, 2024, 11:02:19 pmIt's simple. Just use X11. Migrate if you can't. It's never that simple. While us developers could always migrate, our clients may, for whatever legitimate (or illegitimate) reasons, be unable or unwilling to migrate. ---------------------------------------------------------------------- zeljko · 2024-12-13 11:37 Quote from: rvk on December 12, 2024, 09:24:48 pmOk, there is a warning about wayland. https://wiki.freepascal.org/Qt5_Interface#Systems_using_Wayland Although the warning mentioned another problem (not the window positions). So wayland and Qt5/Qt6 is a no-go. https://www.reddit.com/r/linux/comments/16vciex/lets_make_wayland_have _support_for_window/ (And wayland is becoming more and more mainstream so Qt5/Qt6 is no longer  advisable on Linux.) Well, I've tested qt5 wayland on recent kde plasma (mint 22, mankaro etc), and it works ok (not excellent but works). Don't expect that it works fine with older distros. Qt6 plasma is even better. Personally, I'm using x11, and it will be so for at least next 3-5 years, until wayland matures. ---------------------------------------------------------------------- rvk · 2024-12-13 11:51 Quote from: zeljko on December 13, 2024, 12:37:33 pmWell, I've tested qt5 wayland on recent kde plasma (mint 22, mankaro etc), and it works ok (not excellent but works). At least with Fedora KDE Plasma Desktop 41 (latest default install), Qt5 compile will not be able to position Windows. Both Lazarus and your own application have problems positioning the windows correctly. Even Fedora Workstation 41 (latest default install) with GNOME uses wayland (so also no correct window positions with Qt5). ---------------------------------------------------------------------- zeljko · 2024-12-13 12:05 Try plasma 6. In any case it is not about lazarus, but about wayland protocols implementation ---------------------------------------------------------------------- msintle · 2024-12-14 01:32 Wayland sounds braindead indeed. How come Fedora uses it? I've heard Fedora being called repulsive before. ---------------------------------------------------------------------- rvk · 2024-12-14 11:10 Fedora, Ubuntu, Red Hat Enterprise, Debian, Slackware and Manjaro all ship wayland as default. Although Ubuntu shorty switched back to X11 it's back on wayland as of 21.04. (My own Ubuntu in Hyper-V does seem to have X11 default but maybe that's because of the Remote Desktop part) https://en.wikipedia.org/wiki/Wayland_(protocol) ---------------------------------------------------------------------- msintle · 2024-12-14 12:55 Quote from: rvk on December 14, 2024, 12:10:12 pmFedora, Ubuntu, Red Hat Enterprise, Debian, Slackware and Manjaro all ship wayland as default. Although Ubuntu shorty switched back to X11 it's back on wayland as of 21.04. (My own Ubuntu in Hyper-V does seem to have X11 default but maybe that's because of the Remote Desktop part) https://en.wikipedia.org/wiki/Wayland_(protocol) That's twice as interesting then, why does the issue (of dialogs popping up in random locations) only reproduce in my "Intel" Fedora Qt5 tests and not other OS's like "Intel" Manjaro, say? ---------------------------------------------------------------------- rvk · 2024-12-14 13:39 Quote from: msintle on December 14, 2024, 01:55:28 pmThat's twice as interesting then, why does the issue (of dialogs popping up in random locations) only reproduce in my "Intel" Fedora Qt5 tests and not other OS's like "Intel" Manjaro, say? Then check if your Menjaro runs wayland. ---------------------------------------------------------------------- msintle · 2024-12-15 00:19 Quote from: rvk on December 14, 2024, 02:39:17 pmQuote from: msintle on December 14, 2024, 01:55:28 pmThat's twice as interesting then, why does the issue (of dialogs popping up in random locations) only reproduce in my "Intel" Fedora Qt5 tests and not other OS's like "Intel" Manjaro, say? Then check if your Menjaro runs wayland. How exactly? ---------------------------------------------------------------------- rvk · 2024-12-15 00:26 Quote from: msintle on December 15, 2024, 01:19:18 amQuote from: rvk on December 14, 2024, 02:39:17 pmQuote from: msintle on December 14, 2024, 01:55:28 pmThat's twice as interesting then, why does the issue (of dialogs popping up in random locations) only reproduce in my "Intel" Fedora Qt5 tests and not other OS's like "Intel" Manjaro, say? Then check if your Menjaro runs wayland. How exactly? https://www.cyberciti.biz/faq/howto-check-for-wayland-or-x11-with-my- linux-desktop/ ---------------------------------------------------------------------- dsiders · 2024-12-15 00:27 Quote from: msintle on December 15, 2024, 01:19:18 amQuote from: rvk on December 14, 2024, 02:39:17 pmQuote from: msintle on December 14, 2024, 01:55:28 pmThat's twice as interesting then, why does the issue (of dialogs popping up in random locations) only reproduce in my "Intel" Fedora Qt5 tests and not other OS's like "Intel" Manjaro, say? Then check if your Menjaro runs wayland. How exactly? Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i echo $XDG_SESSION_TYPE ---------------------------------------------------------------------- msintle · 2024-12-16 14:20 Quote from: dsiders on December 15, 2024, 01:27:10 amQuote from: msintle on December 15, 2024, 01:19:18 amQuote from: rvk on December 14, 2024, 02:39:17 pmQuote from: msintle on December 14, 2024, 01:55:28 pmThat's twice as interesting then, why does the issue (of dialogs popping up in random locations) only reproduce in my "Intel" Fedora Qt5 tests and not other OS's like "Intel" Manjaro, say? Then check if your Menjaro runs wayland. How exactly? Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i echo $XDG_SESSION_TYPE Returns x11. So at least my Manjaro is sane, and I can consider this peta thread resolved? ---------------------------------------------------------------------- msintle · 2025-03-02 17:37 Quote from: rvk on December 06, 2024, 08:22:34 pmQuote from: msintle on December 06, 2024, 08:02:43 pmAny chance you might be able to upload this inside a ZIP file like last time, to prevent any script corruptions that may happen as we previously encountered? Attached Hi again! Is there a way to edit/pass a command line to your script, so it installs a specific version of Lazarus, instead of the very latest trunk - which seems to have moved some functions around, or completely removed some (ex: LazGetLanguageIDs) and as such, is breaking our builds? ---------------------------------------------------------------------- rvk · 2025-03-02 17:56 Quote from: msintle on March 02, 2025, 06:37:13 pmIs there a way to edit/pass a command line to your script, so it installs a specific version of Lazarus, instead of the very latest trunk - which seems to have moved some functions around, and as such, is breaking our builds? The script doesn't have a parameter, but at the top you have the lines to assign a version to fpc_version and laz_version. So uncomment those lines and fill in the version you want. You can also leave fpc_version commented (for trunk) and only uncomment laz_version. But I'm not sure which version of fpc would best with certain versions of Lazarus. ---------------------------------------------------------------------- msintle · 2025-03-02 18:02 Quote from: rvk on March 02, 2025, 06:56:42 pmQuote from: msintle on March 02, 2025, 06:37:13 pmIs there a way to edit/pass a command line to your script, so it installs a specific version of Lazarus, instead of the very latest trunk - which seems to have moved some functions around, and as such, is breaking our builds? The script doesn't have a parameter, but at the top you have the lines to assign a version to fpc_version and laz_version. So uncomment those lines and fill in the version you want. You can also leave fpc_version commented (for trunk) and only uncomment laz_version. But I'm not sure which version of fpc would best with certain versions of Lazarus. Wow great, thanks! Edit: So would: #fpc_version="release_3_2_2" #laz_version="lazarus_3_4" Be valid identifiers for each of those fields, respectively? Or would we need another kind of formatting for the version numbers? ---------------------------------------------------------------------- rvk · 2025-03-02 18:19 Quote from: msintle on March 02, 2025, 07:02:02 pmSo would: #fpc_version="release_3_2_2" #laz_version="lazarus_3_4" Be valid identifiers for each of those fields, respectively? Or would we need another kind of formatting for the version numbers? Yes, you need to use the names from the gitlab revisions and uncomment the lines. So Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i fpc_version="release_3_2_2"laz_version="lazarus_3_4" https://gitlab.com/freepascal.org Although I'm not sure if Lazarus 3.4 compiled with FPC 3.2.0 or 3.2.2 The announcement of 3.4 says FPC 3.2.2, so yes, that should be fine. ---------------------------------------------------------------------- TRon · 2025-03-03 00:08 Quote from: rvk on March 02, 2025, 07:19:33 pmThe 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). ---------------------------------------------------------------------- msintle · 2025-03-05 10:06 So if I am ending up with: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Turn off this advice by setting config variable advice.detachedHead to false HEAD is now at 34295aa424 set fixes version to 3.4============================================================== Now compiling FPC, this will take some time Cleaning upmake -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/usr/bin/ld: /home/parallels/dev/fpc/rtl/units/aarch64-linux/cprt0.o: in function `_start':(.text+0x54): undefined reference to `__libc_csu_init'/usr/bin/ld: (.text+0x58): undefined reference to `__libc_csu_init'/usr/bin/ld: (.text+0x5c): undefined reference to `__libc_csu_fini'/usr/bin/ld: (.text+0x60): undefined reference to `__libc_csu_fini'make[2]: *** [Makefile:1719: fpmake] Error 1make[1]: *** [Makefile:2682: packages_smart] Error 2make: *** [Makefile:2837: build-stamp.aarch64-linux] Error 2 470  [===========>                                                     ]  18%Something went wrong compiling FPC. Aborting. That means I am out of luck here? Edit: This is on Ubuntu aarch64 24.04. ---------------------------------------------------------------------- rvk · 2025-03-05 10:15 Quote from: msintle on March 05, 2025, 11:06:18 amThat 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 · 2025-03-05 12:56 Quote from: rvk on March 05, 2025, 11:15:32 amQuote from: msintle on March 05, 2025, 11:06:18 amThat 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][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Turn off this advice by setting config variable advice.detachedHead to false HEAD is now at 34295aa424 set fixes version to 3.4============================================================== Now compiling FPC, this will take some time Cleaning upmake -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./lazarus_on_linux_gtk2.sh: line 281: pv: command not foundmake[7]: *** [Makefile:3848: system.ppu] Broken pipemake[6]: *** [Makefile:2037: linux_all] Error 2make[5]: *** [Makefile:4470: rtl] Error 2make[4]: *** [Makefile:4330: next] Error 2make[3]: *** [Makefile:4335: ppc1] Error 2make[2]: *** [Makefile:4347: cycle] Error 2make[1]: *** [Makefile:2800: compiler_cycle] Error 2make: *** [Makefile:2832: build- stamp.aarch64-linux] Error 2Compilation of FPC failed. Aborting.  And Fedora 41 aarch64 reports: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i I require apt-get but it's not installed. Aborting. 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][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i error: pathspec 'tags/fixes_3_2' did not match any file(s) known to giterror: 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? ---------------------------------------------------------------------- rvk · 2025-03-05 13:01 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][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i # ======================================================# update packages list to latest version# ======================================================echo "=============================================================="echo ""echo "Updating package list to latest version (sudo needed)"echo "" PKG_MANAGER=""command -v dnf >&1 >/dev/null && PKG_MANAGER="dnf"command -v apt-get >&1 >/dev/null && PKG_MANAGER="apt" # ======================================================# some other essentials# ======================================================echo "=============================================================="echo ""echo "Installing required packages (sudo used)"echo ""if [ "$PKG_MANAGER" = "apt" ]; then  sudo apt-get -y install make binutils build-essential gdb git subversion zip unzip pv  sudo apt-get -y install libx11-dev libgtk2.0-dev  # for Lazarus, includes all dependencies   if [ "$LCL_PLATFORM" = "qt5" ]; then sudo apt-get -y install libqt5pas-dev; fi  if [ "$LCL_PLATFORM" = "qt6" ]; then sudo apt-get -y install libqt6pas-dev; fi  elif [ "$PKG_MANAGER" = "dnf" ]; then  # dnf search gtk2*  sudo dnf -y install make binutils gdb git zip unzip pv  sudo dnf -y install libX11-devel gtk2-devel gtk+-devel  # for Lazarus, includes all dependencies  sudo dnf -y install gcc gcc-c++ kernel-devel   if [ "$LCL_PLATFORM" = "qt5" ]; then sudo dnf -y install qt5pas-devel; fi  if [ "$LCL_PLATFORM" = "qt6" ]; then sudo dnf -y install qt6pas-devel; fi else  echo >&2 "Neither yum/dnf nor apt-get found. Aborting."; exit 1;fi ---------------------------------------------------------------------- msintle · 2025-03-05 13:04 Quote from: rvk on March 05, 2025, 02:01:05 pmThe 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][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i # ======================================================# update packages list to latest version# ======================================================echo "=============================================================="echo ""echo "Updating package list to latest version (sudo needed)"echo "" PKG_MANAGER=""command -v dnf >&1 >/dev/null && PKG_MANAGER="dnf"command -v apt-get >&1 >/dev/null && PKG_MANAGER="apt" # ======================================================# some other essentials# ======================================================echo "=============================================================="echo ""echo "Installing required packages (sudo used)"echo ""if [ "$PKG_MANAGER" = "apt" ]; then  sudo apt-get -y install make binutils build-essential gdb git subversion zip unzip pv  sudo apt-get -y install libx11-dev libgtk2.0-dev  # for Lazarus, includes all dependencies   if [ "$LCL_PLATFORM" = "qt5" ]; then sudo apt-get -y install libqt5pas-dev; fi  if [ "$LCL_PLATFORM" = "qt6" ]; then sudo apt-get -y install libqt6pas-dev; fi  elif [ "$PKG_MANAGER" = "dnf" ]; then  # dnf search gtk2*  sudo dnf -y install make binutils gdb git zip unzip pv  sudo dnf -y install libX11-devel gtk2-devel gtk+-devel  # for Lazarus, includes all dependencies  sudo dnf -y install gcc gcc-c++ kernel-devel   if [ "$LCL_PLATFORM" = "qt5" ]; then sudo dnf -y install qt5pas-devel; fi  if [ "$LCL_PLATFORM" = "qt6" ]; then sudo dnf -y install qt6pas-devel; fi else  echo >&2 "Neither yum/dnf nor apt-get found. Aborting."; exit 1;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 · 2025-03-05 13:06 Quote from: msintle on March 05, 2025, 02:04:04 pmWould 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.h tml#msg540286 ---------------------------------------------------------------------- msintle · 2025-03-05 13:10 Quote from: rvk on March 05, 2025, 02:06:16 pmQuote from: msintle on March 05, 2025, 02:04:04 pmWould 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.h tml#msg540286 Thanks for linking that in! Please see my edits above BTW, I've just posted a third edit - reporting some surprising results! ---------------------------------------------------------------------- rvk · 2025-03-05 13:26 Quote from: msintle on March 05, 2025, 02:10:46 pmPlease 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][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   if [ "$fpc_version" != "" ]; then    echo "Switch to fpc $fpc_version"    git -C fpc checkout $fpc_version  fi   if [ "$laz_version" != "" ]; then    echo "Switch to lazarus $laz_version"    git -C lazarus checkout $laz_version  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][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i fpc_version="fixes_3_2"laz_version="tags/lazarus_3_4" You can also just try FPC trunk with Laz 3.4. Just do this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i fpc_version=""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 · 2025-03-05 13:29 Quote from: rvk on March 05, 2025, 02:26:16 pmQuote from: msintle on March 05, 2025, 02:10:46 pmPlease 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][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   if [ "$fpc_version" != "" ]; then    echo "Switch to fpc $fpc_version"    git -C fpc checkout $fpc_version  fi   if [ "$laz_version" != "" ]; then    echo "Switch to lazarus $laz_version"    git -C lazarus checkout $laz_version  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][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i fpc_version="fixes_3_2"laz_version="tags/lazarus_3_4" You can also just try FPC trunk with Laz 3.4. Just do this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i fpc_version=""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 · 2025-03-05 13:50 Debian 12.6 aarch64 (with fixes_3_2): Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Turn off this advice by setting config variable advice.detachedHead to false HEAD is now at 34295aa424 set fixes version to 3.4============================================================== Now compiling FPC, this will take some time Cleaning upmake -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./lazarus_on_linux_gtk2.sh: line 281: pv: command not foundmake[7]: *** [Makefile:3861: system.ppu] Broken pipemake[6]: *** [Makefile:2050: linux_all] Error 2make[5]: *** [Makefile:4530: rtl] Error 2make[4]: *** [Makefile:4388: next] Error 2make[3]: *** [Makefile:4393: ppc1] Error 2make[2]: *** [Makefile:4405: cycle] Error 2make[1]: *** [Makefile:2825: compiler_cycle] Error 2make: *** [Makefile:2857: build- stamp.aarch64-linux] Error 2Compilation of FPC failed. Aborting.  Ubuntu 24.04 aarch64 (fixes_3_2): Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Downloading FPC sources  Cloning into 'fpc'...remote: Enumerating objects: 774018, done.remote: Counting objects: 100% (29/29), done.remote: Compressing objects: 100% (29/29), done.remote: Total 774018 (delta 6), reused 0 (delta 0), pack-reused 773989 (from 1)Receiving objects: 100% (774018/774018), 224.08 MiB | 1.42 MiB/s, done.Resolving deltas: 100% (620350/620350), done.Updating files: 100% (24872/24872), done.Now: Date:   Tue Mar 4 21:40:49 2025 +0000 Downloading Lazarus sources Cloning into 'lazarus'...remote: Enumerating objects: 598578, done.remote: Counting objects: 100% (418/418), done.remote: Compressing objects: 100% (281/281), done.error: 10345 bytes of body are still expected93 MiB | 3.48 MiB/s  fetch-pack: unexpected disconnect while reading sideband packetfatal: early EOFfatal: fetch- pack: invalid index-pack outputDownload of fpc failed. Aborting.  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). ---------------------------------------------------------------------- TRon · 2025-03-05 14:24 Quote from: msintle on March 05, 2025, 02:50:30 pmDebian 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. QuoteUbuntu 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. ---------------------------------------------------------------------- msintle · 2025-03-05 15:07 This is what the search came back with: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Sorting... DoneFull Text Search... Done389-ds/stable 2.3.1+dfsg1-1 all  389 Directory Server suite - metapackage...pv/stable 1.6.20-1 arm64  Shell pipeline element to meter data passing through...zmap/stable 2.1.1-2+b6 arm64  network scanner for researchers  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 · 2025-03-05 15:16 Quote from: msintle on March 05, 2025, 04:07:49 pmThis 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. ---------------------------------------------------------------------- rvk · 2025-03-05 15:26 Quote from: msintle on March 05, 2025, 04:07:49 pmBut 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. ---------------------------------------------------------------------- msintle · 2025-03-06 22:34 Quote from: rvk on March 05, 2025, 04:26:32 pmQuote from: msintle on March 05, 2025, 04:07:49 pmBut 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. Need for 3.4 - on macOS it's the most stable Lazarus for us, clearly not the case on Linux'es. Does ANYONE have a recommendation for a Linux distribution that is STABLE with Lazarus on aarch64 as a build environment on GTK2? Ubuntu still gives us loads of pain, Debian seems best, but Ubuntu is just unaddressable - so many endless issues (regardless of Lazarus version AFAIK). ---------------------------------------------------------------------- msintle · 2025-03-06 22:35 Quote from: TRon on March 05, 2025, 04:16:14 pmQuote from: msintle on March 05, 2025, 04:07:49 pmThis 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. You and me both. At least now we know we can remove it.