Lazarus

Installation => PDAs and Smartphones => Topic started by: Stygian on July 07, 2016, 08:20:20 am

Title: Correct way to install Lazarus on Orange PI A20
Post by: Stygian on July 07, 2016, 08:20:20 am
Dear Everyone,

I would like to install Lazarus on my Orange PI A20 board, but i run into some errors.

I try to do it with a Rasberry PI tuturial(RPI3 is also ARMV7) but it failed with the following message:
Something like i tried to complie the makefile with a 3.0.0 source and i should have to do it with a 2.6.4

I followed this tutorial:
http://www.tweaking4all.com/hardware/raspberry-pi/install-lazarus-pascal-on-raspberry-pi-2/

After that i give up so i followed the Lazarus WIKI tutorial but that also failed
Cannot find the source code. I pointed it to /usr/local/lazarus 1.2.4 but that time the lcl missing.

Can someone help me what is the correct way to install Lazarus on my board?

Thanks,
Sty
Title: Re: Correct way to install Lazarus on Orange PI A20
Post by: Thaddy on July 07, 2016, 09:49:33 am
The message is probably about the starting bootstrap compiler, which indeed needs to be officially 2.6.4 to obtain 3.0.0 stable. Likewise for trunk you need 3.0.0 to bootstrap 3.1.1.

It seems you are trying to build 3.0 with 3.0.

You may get away with 
Code: [Select]
sudo make clean all install OVERRIDEVERSIONCHECK=1 THIS IS UNSUPPORTED!
Title: Re: Correct way to install Lazarus on Orange PI A20
Post by: Stygian on July 07, 2016, 06:35:53 pm
I got errors. not compiled.
Code: Pascal  [Select][+][-]
  1. compproc.inc(64,91) Error: Fields cannot appear after a method or property definition, start a new visibility section first
  2. compproc.inc(65,102) Error: Fields cannot appear after a method or property definition, start a new visibility section first
  3. compproc.inc(66,94) Error: Fields cannot appear after a method or property definition, start a new visibility section first
  4. compproc.inc(316,114) Error: Fields cannot appear after a method or property definition, start a new visibility section first
  5. compproc.inc(316,136) Fatal: There were 4 errors compiling module, stopping

Btw this is the error code:
Code: Pascal  [Select][+][-]
  1. Makefile:2887: *** The only supported starting compiler version is 3.0.0. You are trying to build with 2.6.4..  Stop.

Regards,
Sty
Title: Re: Correct way to install Lazarus on Orange PI A20
Post by: Leledumbo on July 07, 2016, 07:30:31 pm
Here are the general bootstrapping rules of FPC:
3.0.0 can be bootstrapped by 2.6.4 or itself. Current trunk is 3.1.1, which can be bootstrapped by 3.0.0. But there was a time quite long ago, when 3.0.0 is not yet released, where 3.1.1 can be bootstrapped by 2.6.4 (the latest release at that time). 3.0.0 was released on Nov 2015, the article is written on Apr 2015. Now you see where your problem is: the article needs an update.

The solution is simply to grab 3.0.0 and use that as starting compiler instead of 2.6.4.
Title: Re: Correct way to install Lazarus on Orange PI A20
Post by: rvk on July 07, 2016, 07:45:54 pm
The solution is simply to grab 3.0.0 and use that as starting compiler instead of 2.6.4.
It's quite a shame there isn't yet a bootstrap 3.0.0 for arm-linux (or even Windows 64bit).

I've put some instruction how I did it with the download of FPC 3.0.0 official for arm-linux-raspberry. You might want to see if you can take some of that for the Orange PI A20.
http://forum.lazarus.freepascal.org/index.php/topic,33254.msg215326.html#msg215326

(instruction are for FPC trunk and Lazarus trunk)
Title: Re: Correct way to install Lazarus on Orange PI A20
Post by: Stygian on July 07, 2016, 10:21:45 pm
Thank you everyone its almost good...Only ide failed now.

Code: Pascal  [Select][+][-]
  1. (9022) Compiling resource ../units/arm-linux/gtk2/lazarus.or
  2. /usr/local/lazarus/trunktmp/ide/lazarus.pp(154,1) Error: (9030) Can't call the resource compiler "/usr/local/bin/fpcres", switching to external mode
  3. /usr/local/lazarus/trunktmp/ide/lazarus.pp(154,1) Fatal: (10026) There were 1 errors compiling module, stopping
  4. Fatal: (1018) Compilation aborted
  5. Makefile:4004: recipe for target 'lazarus' failed
  6. make[2]: *** [lazarus] Error 1
  7. make[2]: Leaving directory '/usr/local/lazarus/trunktmp/ide'
  8. Makefile:4428: recipe for target 'ide' failed
  9. make[1]: *** [ide] Error 2
  10. make[1]: Leaving directory '/usr/local/lazarus/trunktmp/ide'
  11. Makefile:3211: recipe for target 'ide' failed
  12. make: *** [ide] Error 2

Regards,
Sty
Title: Re: Correct way to install Lazarus on Orange PI A20
Post by: rvk on July 07, 2016, 10:23:45 pm
Thank you everyone its almost good...Only ide failed now.
Code: Pascal  [Select][+][-]
  1. (9022) Compiling resource ../units/arm-linux/gtk2/lazarus.or
  2. /usr/local/lazarus/trunktmp/ide/lazarus.pp(154,1) Error: (9030) Can't call the resource compiler "/usr/local/bin/fpcres", switching to external mode
  3. /usr/local/lazarus/trunktmp/ide/lazarus.pp(154,1) Fatal: (10026) There were 1 errors compiling module, stopping
  4.  
Yep, I got exactly the same. In my instructions I already mentioned this. Just run the make command one more time and it will work correctly.

I haven't had time yet to find out why it worked the second time... but it works :)
Title: Re: Correct way to install Lazarus on Orange PI A20
Post by: Stygian on July 07, 2016, 10:24:21 pm
I run it 3 times...and still error
Title: Re: Correct way to install Lazarus on Orange PI A20
Post by: rvk on July 07, 2016, 10:26:50 pm
And the /usr/local/bin/fpcres was present and executable?

(For me it was so I was puzzled why it didn't work the first time. Then when running the same make command again it went through.)
Title: Re: Correct way to install Lazarus on Orange PI A20
Post by: Stygian on July 07, 2016, 10:29:04 pm
It's present and executable. And ofc i logged in as root.
Title: Re: Correct way to install Lazarus on Orange PI A20
Post by: rvk on July 07, 2016, 10:43:42 pm
Only reason I can think of still is the swap file.
Try the following:
Code: [Select]
sudo nano /etc/dphys-swapfile
CONF_SWAPSIZE=500

sudo reboot
or
sudo /etc/init.d/dphys-swapfile stop
sudo /etc/init.d/dphys-swapfile start
or maybe
dphys-swapfile setup
dphys-swapfile swapon
you can check the swap with free -m
(and rerun the make command)
Title: Re: Correct way to install Lazarus on Orange PI A20
Post by: Stygian on July 07, 2016, 11:22:50 pm
My swap area is different from RPI ones. I'm using armbian. So 1st i have to figure it out how to resize it :D
Title: Re: Correct way to install Lazarus on Orange PI A20
Post by: rvk on July 07, 2016, 11:29:30 pm
If the swap-area is already 500+ then that shouldn't be the problem.
(you should be able to check with free -m or top)
Title: Re: Correct way to install Lazarus on Orange PI A20
Post by: Stygian on July 07, 2016, 11:31:54 pm
Armbian is only creating 128M emergency swap area.
Title: Re: Correct way to install Lazarus on Orange PI A20
Post by: rvk on July 07, 2016, 11:35:28 pm
Maybe like this:
dd if=/dev/zero of=/path/to/swapfile bs=1M count=512 # For 512MB swap file
mkswap /path/to/swapfile
swapon /path/to/swapfile
Title: Re: Correct way to install Lazarus on Orange PI A20
Post by: Stygian on July 08, 2016, 12:08:10 am
Perfect it's installed. Only Debugger missing?

Should i use fakegdb?
Title: Re: Correct way to install Lazarus on Orange PI A20
Post by: rvk on July 08, 2016, 12:16:49 am
Is there no gdb-package available?

apt-get install gdb
or
apt-get install gdb-arm-none-eabi
Title: Re: Correct way to install Lazarus on Orange PI A20
Post by: Stygian on July 08, 2016, 12:37:57 am
It works.

Thank you rvk for the help.

Regards,
Stygian
TinyPortal © 2005-2018