Recent

Author Topic: (Solved) Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)  (Read 8629 times)

rvk

  • Hero Member
  • *****
  • Posts: 6110
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #45 on: August 14, 2019, 10:27:23 pm »
On stretch I had the same problem.
Now I have gone back to rev 40721 for FPC and rev 59961 for Lazarus. Both version from januari 1st.

And that one works.

Tomorrow I will try again with buster and see what version exactly doesn't work. The problem is in FPC, not in Lazarus. It's in Component.UnitName. So I can write a script to increase the revision and just test FPC only (which is much faster).

Code: [Select]
pi@raspberrypi:~ $ cat test.pas
program test;
uses classes;
var
  O: TObject;
begin
  O := TObject.Create;
  writeln(O.UnitName);
end.

pi@raspberrypi:~ $ ./dev/fpc/bin/fpc test.pas
Free Pascal Compiler version 3.3.1 [2019/08/14] for arm
Copyright (c) 1993-2018 by Florian Klaempfl and others
Target OS: Linux for ARMHF
Compiling test.pas
Linking test
9 lines compiled, 1.5 sec
pi@raspberrypi:~ $ ./test
System
pi@raspberrypi:~ $

Maybe you can test this test.pas on buster already to see if it gives junk.

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #46 on: August 14, 2019, 10:43:46 pm »
No name returned indeed. confirmed.
Specialize a type, not a var.

rvk

  • Hero Member
  • *****
  • Posts: 6110
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #47 on: August 14, 2019, 10:46:26 pm »
No name returned indeed. confirmed.
What happens if you hover over the TButton in Lazarus (compiled with that FPC version)?

Do you see some Chinese character and another normal character (where the UnitName should be)?
(under the component name)

What happens in Lazarus IDE when you create a new project and double click the form?


Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #48 on: August 14, 2019, 10:56:30 pm »
With the current version I can reproduce those issues.
I akso checked the unitname implementation.
It looks like the typeinfo is screwed up. There have been quite some rtti changes since January that could have caused this.
This code is also touched by the attributes feature.
« Last Edit: August 14, 2019, 11:19:33 pm by Thaddy »
Specialize a type, not a var.

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #49 on: August 15, 2019, 07:25:53 am »
reported as: mantis 0035965

I think It is not related to Raspbian Buster or RPi4 as such, it may be related to attributes and rtti. Possibly only on armhf? and/or arm-like platforms.
That is: unless alignment requirements for Buster have changed: Buster now uses version 7 of the ARM architecture specification. ( for reference, see also the Debian Buster release notes)
« Last Edit: August 15, 2019, 07:55:35 am by Thaddy »
Specialize a type, not a var.

jdp

  • Full Member
  • ***
  • Posts: 144
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #50 on: August 15, 2019, 08:41:49 am »
@Thaddy, I am not a Lazarus Guru. I followed the steps in the book I bought.
So you are now also seeing the issue I have. The IDE is broken and you are not able to add a new event by double-clicking on the components.

I just want the IDE to work on the Pi 4. I want to make sure the system we build is future proof and at this stage I am stuck.
Who from the Lazarus team looks after this. Rik you stated I can add it to a mailing list somewhere but not sure where or should I leave it with you 2 to sort out  ;D ?
« Last Edit: August 15, 2019, 08:51:17 am by jdp »

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #51 on: August 15, 2019, 09:22:10 am »
@Thaddy, I am not a Lazarus Guru. I followed the steps in the book I bought.
So you are now also seeing the issue I have. The IDE is broken and you are not able to add a new event by double-clicking on the components.

I just want the IDE to work on the Pi 4. I want to make sure the system we build is future proof and at this stage I am stuck.
Who from the Lazarus team looks after this. Rik you stated I can add it to a mailing list somewhere but not sure where or should I leave it with you 2 to sort out  ;D ?
There is not much I can do, but I reported the bug (it is a serious one) on the bugtracker. The mailing list you want is fpc-devel.
For now, if you install FPC 3.0.4 and Lazarus 1.8.4 from apt, so not the newer versions, you can still work with Lazarus on the Raspberry Pi 1/2/3/4
First remove your FPC and Lazarus.
sudo rm -rf /usr/bin/fpc
sudo rm -rf /usr/local/bin/fpc
sudo rm -rf /usrlocal/lib/fpc
Same for Lazarus.
adapt your sources.list like mine.
sudo apt update && sudo apt dist-upgrade -y
sudo apt install fpc
sudo apt install lazarus
sudo apt autoremove
check the /etc/fpc.cfg file if all paths are correct.
« Last Edit: August 15, 2019, 09:32:22 am by Thaddy »
Specialize a type, not a var.

rvk

  • Hero Member
  • *****
  • Posts: 6110
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #52 on: August 15, 2019, 09:47:08 am »
I just want the IDE to work on the Pi 4. I want to make sure the system we build is future proof and at this stage I am stuck.
Trunk versions are considered unstable and might contain bugs. But these bugs are usually responded to very (and i mean VERY) quickly, if they are found. But this one went unnoticed. I'm in the process of checking out at what revision FPC broke for arm (fun to do with a slow-ass rpi3  %)).

When checking out FPC with svn you can add -r40721 (which makes it checkout revision 40721 from januari 1st).
You could also use svn to checkout https://svn.freepascal.org/svn/fpc/branches/fixes_3_2/

fixes_3_2 is stable with some critical fixes added to them.
https://www.freepascal.org/develop.html

https://bugs.freepascal.org/view.php?id=35965

jdp

  • Full Member
  • ***
  • Posts: 144
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #53 on: August 15, 2019, 11:11:14 am »
@Thaddy how do I remove Lazarus? You gave me the commands for FPC. I just want to make sure I don't miss a step.

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #54 on: August 15, 2019, 11:50:54 am »
@Thaddy how do I remove Lazarus? You gave me the commands for FPC. I just want to make sure I don't miss a step.
Code: Bash  [Select][+][-]
  1. sudo apt-get purge lazarus
  2. sudo apt autoremove
If you installed through aptitude (apt, apt-get)
Otherwise simply delete the lazarus directories with sudo  rm -rf <lazarus directory root>
You may want to check lazarus hidden directory (written as .lazarus , note the dot) left-overs and /usr/local/lib /usr/local/bin too.
« Last Edit: August 15, 2019, 11:55:37 am by Thaddy »
Specialize a type, not a var.

rvk

  • Hero Member
  • *****
  • Posts: 6110
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #55 on: August 15, 2019, 11:53:51 am »
@Thaddy how do I remove Lazarus? You gave me the commands for FPC. I just want to make sure I don't miss a step.
Code: Bash  [Select][+][-]
  1. sudo apt-get purge lazarus
Off course, that only works if you installed Lazarus with apt-get.
If you installed it with svn and make (like you mentioned) you can remove the created directories manually.

I'm not sure where it was installed in your case.
That why always install "as user" in /home/pi/dev/fpc

Code: [Select]
make -s clean all install OPT="-v0" OS_TARGET=linux CPU_TARGET=arm INSTALL_PREFIX=/home/pi/dev/fpc PP=/home/pi/dev/compiler3/ppcarmIn that case, removing it would mean just deleting that directory (including /home/pi/.lazarus which might be created).

Edit:
I'm currently at revision 42475 -> 42500.
As I see it, I think the problem is in 42486 where Florian made a change in typinfo.pp.
or maybe 42488 where some changes in aligned strings RTTI for arm were made.
Will confirm.
« Last Edit: August 15, 2019, 12:00:12 pm by rvk »

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #56 on: August 15, 2019, 12:06:57 pm »

I forgot: fpc 3.2.0 seems not affected. Sven (fpc core developer) suspects rtti too.
So that should be fine to install.
Specialize a type, not a var.

jdp

  • Full Member
  • ***
  • Posts: 144
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #57 on: August 15, 2019, 12:44:03 pm »
I did not install Lazarus using apt-get I did a build from the trunk source as stated in the steps I took. I just did a rm of all the Lazarus folders.

I installed it now using apt-get and version 2.0.0 is now running. I had some fun and games adding components as it kept asking for packages that are there so I just opened them using the open loaded packages tool and then all seems to compile.

My project now compiles and I am able to add components. I had to roll back some of the dynamic arrays I had a problem with last time as I am now using FPC 3.0.4 and not 3.3.1. 

Aaa the fun and games of software development.

rvk

  • Hero Member
  • *****
  • Posts: 6110
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #58 on: August 15, 2019, 01:37:49 pm »
Just my luck. Was trying between revision 42475 and 42500.
And of course the problem is with r42476  :o
Compiling with r42475 gave a correct result, with r42476 a wrong result.

Quote
Revision: 42476
Author: florian
Date: zondag 21 juli 2019 10:28:29
Message:
* more fixes to rtti after attribute branch merging
----
Modified : /trunk/compiler/ncgrtti.pas
Modified : /trunk/compiler/symconst.pas
Modified : /trunk/rtl/inc/dynarr.inc
Modified : /trunk/rtl/inc/rtti.inc
Modified : /trunk/rtl/inc/rttidecl.inc
Modified : /trunk/rtl/objpas/typinfo.pp

jdp

  • Full Member
  • ***
  • Posts: 144
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #59 on: August 15, 2019, 02:25:35 pm »
OK so what even florian did broke the IDE.

 

TinyPortal © 2005-2018