Recent

Author Topic: Correct way to install Lazarus on Orange PI A20  (Read 23720 times)

Stygian

  • Jr. Member
  • **
  • Posts: 90
Correct way to install Lazarus on Orange PI A20
« 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

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: Correct way to install Lazarus on Orange PI A20
« Reply #1 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!
Specialize a type, not a var.

Stygian

  • Jr. Member
  • **
  • Posts: 90
Re: Correct way to install Lazarus on Orange PI A20
« Reply #2 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
« Last Edit: July 07, 2016, 06:39:38 pm by Stygian »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Correct way to install Lazarus on Orange PI A20
« Reply #3 on: July 07, 2016, 07:30:31 pm »
Here are the general bootstrapping rules of FPC:
  • Latest release can be bootstrapped by previous release or itself
  • Current trunk can be bootstrapped by latest release
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.

rvk

  • Hero Member
  • *****
  • Posts: 6109
Re: Correct way to install Lazarus on Orange PI A20
« Reply #4 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)

Stygian

  • Jr. Member
  • **
  • Posts: 90
Re: Correct way to install Lazarus on Orange PI A20
« Reply #5 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

rvk

  • Hero Member
  • *****
  • Posts: 6109
Re: Correct way to install Lazarus on Orange PI A20
« Reply #6 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 :)

Stygian

  • Jr. Member
  • **
  • Posts: 90
Re: Correct way to install Lazarus on Orange PI A20
« Reply #7 on: July 07, 2016, 10:24:21 pm »
I run it 3 times...and still error

rvk

  • Hero Member
  • *****
  • Posts: 6109
Re: Correct way to install Lazarus on Orange PI A20
« Reply #8 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.)

Stygian

  • Jr. Member
  • **
  • Posts: 90
Re: Correct way to install Lazarus on Orange PI A20
« Reply #9 on: July 07, 2016, 10:29:04 pm »
It's present and executable. And ofc i logged in as root.

rvk

  • Hero Member
  • *****
  • Posts: 6109
Re: Correct way to install Lazarus on Orange PI A20
« Reply #10 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)
« Last Edit: July 07, 2016, 10:50:01 pm by rvk »

Stygian

  • Jr. Member
  • **
  • Posts: 90
Re: Correct way to install Lazarus on Orange PI A20
« Reply #11 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

rvk

  • Hero Member
  • *****
  • Posts: 6109
Re: Correct way to install Lazarus on Orange PI A20
« Reply #12 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)

Stygian

  • Jr. Member
  • **
  • Posts: 90
Re: Correct way to install Lazarus on Orange PI A20
« Reply #13 on: July 07, 2016, 11:31:54 pm »
Armbian is only creating 128M emergency swap area.

rvk

  • Hero Member
  • *****
  • Posts: 6109
Re: Correct way to install Lazarus on Orange PI A20
« Reply #14 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

 

TinyPortal © 2005-2018