Recent

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

rvk

  • Hero Member
  • *****
  • Posts: 6112
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #30 on: August 13, 2019, 06:56:12 pm »
Note for previous post.
FPC_REQUIRES_PROPER_ALIGNMENT is true on RPI.

I have a feeling (and can see that debugging) the UnitName is 4 bytes offset from the correct UnitName.

I'm not sure if I've added something wrong during compiling trunk.

Can somebody else confirm the UnitName problem in RPI/Buster?

jdp

  • Full Member
  • ***
  • Posts: 144
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #31 on: August 13, 2019, 07:22:15 pm »
I have now installed Debian Buster in a Virtual machine on my PC and I am following the same steps I followed to install on the PI. Will test if I have the same issue on Intel.

jdp

  • Full Member
  • ***
  • Posts: 144
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #32 on: August 13, 2019, 08:07:53 pm »
I followed the same steps but using the i386 Linux file but get an error when I make FPC 3.3.1.

So at this stage, I can not do anything else than wait till you find what is wrong with the IDE on Buster.

Code: Pascal  [Select][+][-]
  1. make[7]: *** [Makefile:3941: system.ppu] Segmentation fault
  2. make[7]: Leaving directory '/home/pi/source/fpc-3.3.1/rtl/linux'
  3. make[6]: *** [Makefile:2065: linux_all] Error 2
  4. make[6]: Leaving directory '/home/pi/source/fpc-3.3.1/rtl'
  5. make[5]: *** [Makefile:4686: rtl] Error 2
  6. make[5]: Leaving directory '/home/pi/source/fpc-3.3.1/compiler'
  7. make[4]: *** [Makefile:4528: next] Error 2
  8. make[4]: Leaving directory '/home/pi/source/fpc-3.3.1/compiler'
  9. make[3]: *** [Makefile:4542: ppc3] Error 2
  10. make[3]: Leaving directory '/home/pi/source/fpc-3.3.1/compiler'
  11. make[2]: *** [Makefile:4550: cycle] Error 2
  12. make[2]: Leaving directory '/home/pi/source/fpc-3.3.1/compiler'
  13. make[1]: *** [Makefile:2846: compiler_cycle] Error 2
  14. make[1]: Leaving directory '/home/pi/source/fpc-3.3.1'
  15. make: *** [Makefile:2878: build-stamp.i386-linux] Error 2
  16. pi@debian10:~/source/fpc-3.3.1$


jdp

  • Full Member
  • ***
  • Posts: 144
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #33 on: August 14, 2019, 04:44:00 pm »
I installed Lazarus on Debian 10 Buster on Itel using

Code: Pascal  [Select][+][-]
  1. sudo apt-get install lazarus

It installed FPC 3.0.4 and Lazarus 2.0.0.

That seems to work 100%. I am not able to install it from the source.

So now I am stuck. What should I do on the Pi 4 as it only runs Buster ?

rvk

  • Hero Member
  • *****
  • Posts: 6112
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #34 on: August 14, 2019, 04:52:06 pm »
It seems Lazarus (of even FPC) on Intel/Buster/i386 indeed doesn't compile.
ppc2 gives a segmentation fault.
FPCUPdeluxe also doen't work (gives the same problem).
Trying stable in FPCUPdeluxe doesn't work (gives a URL error).

FPCUPdeluxe on the buster/raspberry gives the same problem with Control.UnitName.
(didn't try stable yet)

I was trying it again on stretch but my sdcard was too small (ran out of space).

You could bring the buster/raspberry/trunk problem to the mailing-list for developers.

jdp

  • Full Member
  • ***
  • Posts: 144
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #35 on: August 14, 2019, 06:05:21 pm »
How do I do that? I just want to point them to this problem.

Thaddy

  • Hero Member
  • *****
  • Posts: 14210
  • Probably until I exterminate Putin.
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #36 on: August 14, 2019, 06:39:48 pm »
It seems Lazarus (of even FPC) on Intel/Buster/i386 indeed doesn't compile.
FPC compiles OK. Lazarus trunk does not. Package install Lazarus? is in repo 1.8.4  but I did not test an install.
Specialize a type, not a var.

rvk

  • Hero Member
  • *****
  • Posts: 6112
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #37 on: August 14, 2019, 06:53:38 pm »
It seems Lazarus (of even FPC) on Intel/Buster/i386 indeed doesn't compile.
FPC compiles OK. Lazarus trunk does not. Package install Lazarus? is in repo 1.8.4  but I did not test an install.
For me (and even fpcupdeluxe) it crashes with compiling fpc. The intermediate ppc2 which is created during the process gives a segmentation fault.

This is current trunk on Debian 10 buster i386.

Thaddy

  • Hero Member
  • *****
  • Posts: 14210
  • Probably until I exterminate Putin.
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #38 on: August 14, 2019, 07:00:46 pm »
For me (and even fpcupdeluxe) it crashes with compiling fpc. The intermediate ppc2 which is created during the process gives a segmentation fault.

This is current trunk on Debian 10 buster i386.
Well, the only problem I have is that my builds suddenly favor Russian.
Code: Bash  [Select][+][-]
  1.  fpc -v
  2. Компилятор Free Pascal версии 3.3.1-r42660 [2019/08/12] для arm
  3.  
  4. uname -a
  5. Linux thaddyginaasta 4.19.58-v7+ #1245 SMP Fri Jul 12 17:25:51 BST 2019 armv7l GNU/Linux
  6.  
That's fpc compiled and running ob Raspbian Buster.
« Last Edit: August 14, 2019, 07:06:24 pm by Thaddy »
Specialize a type, not a var.

rvk

  • Hero Member
  • *****
  • Posts: 6112
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #39 on: August 14, 2019, 08:01:52 pm »
Yikes.
Just installed trunk on a fresh Debian Stretch 9.9 on RPI 3 and have the same problem.

@Thaddy, how did you compile trunk on RPI?
With what commands and options?
And what start-compiler did you use?
Did you upgrade to buster (with an older stretch) or did you use a fresh install?

(But even with fpcupdeluxe it didn't work. You might think it passes the correct compiler-options)

Cyrax

  • Hero Member
  • *****
  • Posts: 836
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #40 on: August 14, 2019, 08:04:56 pm »
It seems Lazarus (of even FPC) on Intel/Buster/i386 indeed doesn't compile.
FPC compiles OK. Lazarus trunk does not. Package install Lazarus? is in repo 1.8.4  but I did not test an install.
For me (and even fpcupdeluxe) it crashes with compiling fpc. The intermediate ppc2 which is created during the process gives a segmentation fault.

This is current trunk on Debian 10 buster i386.

Strange. As for me, i386-linux and x86-64-linux targets compiles successfully (Arch Linux). You can try lower or disable optimization (OPT="-O-").
Check that your distro binutils package are least in version 2.32.

FPC trunk r42685 and Lazarus trunk r61691.
« Last Edit: August 14, 2019, 08:06:49 pm by Cyrax »

Thaddy

  • Hero Member
  • *****
  • Posts: 14210
  • Probably until I exterminate Putin.
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #41 on: August 14, 2019, 09:03:02 pm »
Yikes.
Just installed trunk on a fresh Debian Stretch 9.9 on RPI 3 and have the same problem.

@Thaddy, how did you compile trunk on RPI?
With what commands and options?
And what start-compiler did you use?
Did you upgrade to buster (with an older stretch) or did you use a fresh install?

(But even with fpcupdeluxe it didn't work. You might think it passes the correct compiler-options)
I installed a new Raspbiamn on an RPi 4 and upgraded buster on my RPi3's

Built with a fpc 3.0.4 as a starting compiler (from apt)
svn co etc.
Code: Bash  [Select][+][-]
  1. sudo make clean all install REVSTR=42691 REVINC=force PP=/usr/bin/fpc INSTALL_PREFIX=/usr/local GCCLIBDIR=/usr/lib/gcc/arm-linux-gnueabihf/8 OPT="-CpARMv7a -OpARMv7a -CfVFPv3 -CX -XX -Xs"
  2. sudo cp /usr/local/lib/fpc/3.3.1/ppcarm /usr/local/bin
  3.  
  4. fpc  -v
  5.  $ fpc -v
  6. Компилятор Free Pascal версии 3.3.1-r42691 [2019/08/14] для arm
  7. Copyright (c) 1993-2019 by Florian Klaempfl and others
  8.  
  9.  $ cat /etc/apt/sources.list
  10. deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
  11. # Uncomment line below then 'apt-get update' to enable 'apt-get source'
  12. deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
  13. deb http://httpredir.debian.org/debian buster-backports main contrib non-free
  14.  
I have only the issue that I have a Russian version instead of an English one and I have no clue why?
Solved. the fpc.cfg from apt has all message files uncommented. if that is not corrected, simple re-comment them.
« Last Edit: August 14, 2019, 09:44:12 pm 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 #42 on: August 14, 2019, 09:25:02 pm »
@Thaddy does your Lazarus work correctly. Are the components correct? My FPC works fine but the IDE is screwed up.

jdp

  • Full Member
  • ***
  • Posts: 144
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #43 on: August 14, 2019, 09:39:53 pm »
Here are the steps I took.

The book states you have to make the swap file bigger. On a pi with 1 GB of RAM that is a must but I have a 4GB and the swap space stays 0 so it is fine.

Download FPC from this site and install it.

https://www.freepascal.org/down/arm/linux-hungary.html

fpc-3.0.4.arm-linux-eabihf-raspberry.tar

Code: Pascal  [Select][+][-]
  1. cd /home/pi/Downloads/fpc-3.0.4.arm-linux
  2.  
  3. tar xvf fpc-3.0.4.arm-linux-eabihf-raspberry.tar
  4.  
  5. cd ~/Downloads/fpc-3.0.4.arm-linux
  6.  
  7. sudo ./install.sh



Then you have to download the source of FPC 3.3.1 and compile it.

Code: Pascal  [Select][+][-]
  1. cd
  2. mkdir source
  3.  
  4.  
  5. Install subversion
  6.  
  7. sudo apt-get install -y subversion
  8.  
  9. cd ~/source
  10.  
  11. svn co http://svn.freepascal.org/svn/fpc/trunk fpc-3.3.1


Compile 3.3.1

Code: Pascal  [Select][+][-]
  1. cd ~/source/fpc-3.3.1
  2. make all OPT=-dFPC_ARMHF
  3.  
  4. sudo make install OPT=-dFPC_ARMF PREFIX=/usr/local
  5.  
  6.  
  7. sudo rm –f /usr/local/bin/ppcarm
  8.  
  9. sudo ln –sf /usr/local/lib/fpc/3.3.1/ppcarm /usr/local/bin/ppcarm
  10.  

Then you have to install all the packages

Code: Pascal  [Select][+][-]
  1. sudo apt-get install -y libgtk2.0-dev
  2. sudo apt-get install -y libcairo2-dev
  3. sudo apt-get install -y libpango1.0-dev
  4. sudo apt-get install -y libpangox-1.0-dev
  5. sudo apt-get install -y libgdk-pixbuf2.0-dev
  6. sudo apt-get install -y libx11-dev
  7. sudo apt-get install -y gir1.2-coglpango-1.0
  8. sudo apt-get install -y xorg-dev
  9.  

Download Lazarus trunk

Code: Pascal  [Select][+][-]
  1. cd ~/source
  2. svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus
  3.  
Compile Lazarus

Code: Pascal  [Select][+][-]
  1. cd ~/source/lazarus
  2.  
  3. make all OPT=-dFPC_ARMHF
  4.  
  5. sudo make install OPT=-dFPC_ARMHF PREFIX=/usr/local


Then you get a compiled Lazarus with broken components




« Last Edit: August 14, 2019, 09:41:37 pm by jdp »

Thaddy

  • Hero Member
  • *****
  • Posts: 14210
  • Probably until I exterminate Putin.
Re: Lazarus 2.1.0 Controls Problem on Raspberry Pi 4 (Buster)
« Reply #44 on: August 14, 2019, 10:26:23 pm »
You are doing things way to complicated.
First use my steps for fpc.
Second checkout lazarus trunk
make clean all

I can reproduce that codetools is not working now I rebuild from source for this subject.
Also there seems something wrong with component registration.
 
« Last Edit: August 14, 2019, 10:40:07 pm by Thaddy »
Specialize a type, not a var.

 

TinyPortal © 2005-2018