Recent

Author Topic: Lazarus with RPi 3  (Read 25707 times)

Cyrax

  • Hero Member
  • *****
  • Posts: 835
Re: Lazarus with RPi 3
« Reply #30 on: October 29, 2016, 01:35:14 am »
I see dropbox link in that script, too.
And does the script work for you on a RPI with curl installed?

Maybe dropbox doesn't always redirect (in which case the curl will work without -L).

Sorry, but I don't own RPI so I can't test it. Just checked it out if server at cache.getlazarus.org does some funky real time modifications on during serving the script file to the client.

krolikbest

  • Full Member
  • ***
  • Posts: 136
Re: Lazarus with RPi 3
« Reply #31 on: November 07, 2016, 09:20:28 am »
Hi,

I try to install at rvk suggestion http://forum.lazarus.freepascal.org/index.php/topic,33254.msg215422.html#msg215422 and
1. fpc is installed
2. but after downloading trunk ver of Lazarus, when doing:
Quote
make all OPT="-dFPC_ARMHF"
get an errors:
Quote
/usr/local/lazarus/trunktmp/ide/lazbuild.lpr(1870,1) Error: (9029) Error while compiling resources
/usr/local/lazarus/trunktmp/ide/lazbuild.lpr(1870,1) Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Makefile:4010: recipe for target 'lazbuild' failed
make[2]: *** [lazbuild] Error 1
make[2]: Leaving directory '/usr/local/lazarus/trunktmp/ide'
Makefile:4437: recipe for target 'lazbuilder' failed
make[1]: *** [lazbuilder] Error 2
make[1]: Leaving directory '/usr/local/lazarus/trunktmp/ide'
Makefile:3221: recipe for target 'lazbuild' failed
make: *** [lazbuild] Error 2

system:
Linux raspberrypi 4.4.26-v7+ #915 SMP Thu Oct 20 17:08:44 BST 2016 armv7l GNU/Linux


Could someone help?

Martin

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1345
Re: Lazarus with RPi 3
« Reply #32 on: November 07, 2016, 09:57:58 am »
Building Lazarus consumes a lot of memory !
You need an extra swap of at least 500MB, but better 1GB to build Lazarus.
So, add swap with a swapfile.

rvk

  • Hero Member
  • *****
  • Posts: 4324
Re: Lazarus with RPi 3
« Reply #33 on: November 07, 2016, 10:03:08 am »
Building Lazarus consumes a lot of memory !
You need an extra swap of at least 500MB, but better 1GB to build Lazarus.
So, add swap with a swapfile.
If my instructions were followed to the letter the swap would have been extended to 512Mb.

(I'm currently testing to see if that's enough with a clean install)

Code: [Select]
# ======================================================
# we NEED to extend the swapfile (1 minute)
# ======================================================
sudo nano /etc/dphys-swapfile
CONF_SWAPSIZE=512   # <-- change this line
sudo /etc/init.d/dphys-swapfile stop
sudo /etc/init.d/dphys-swapfile start

rvk

  • Hero Member
  • *****
  • Posts: 4324
Re: Lazarus with RPi 3
« Reply #34 on: November 07, 2016, 10:21:48 am »
Yep, I also get the error with a 512 swap. Extending it to 1024 doesn't help.

Code: [Select]
Free Pascal Compiler version 3.1.1 [2016/11/07] for arm
Copyright (c) 1993-2016 by Florian Klaempfl and others
(1002) Target OS: Linux for ARMHF
(3104) Compiling lazbuild.lpr
/usr/local/lazarus/trunktmp/ide/lazbuild.lpr(84,48) Hint: (5024) Parameter "Filename" not used
/usr/local/lazarus/trunktmp/ide/lazbuild.lpr(81,45) Hint: (5024) Parameter "Code" not used
/usr/local/lazarus/trunktmp/ide/lazbuild.lpr(82,21) Hint: (5024) Parameter "Filename" not used
/usr/local/lazarus/trunktmp/ide/lazbuild.lpr(101,38) Hint: (5024) Parameter "DlgType" not used
/usr/local/lazarus/trunktmp/ide/lazbuild.lpr(101,65) Hint: (5024) Parameter "Buttons" not used
/usr/local/lazarus/trunktmp/ide/lazbuild.lpr(102,44) Hint: (5024) Parameter "HelpKeyword" not used
/usr/local/lazarus/trunktmp/ide/lazbuild.lpr(104,39) Hint: (5024) Parameter "DlgType" not used
/usr/local/lazarus/trunktmp/ide/lazbuild.lpr(104,66) Hint: (5024) Parameter "Buttons" not used
/usr/local/lazarus/trunktmp/ide/lazbuild.lpr(105,45) Hint: (5024) Parameter "HelpKeyword" not used
/usr/local/lazarus/trunktmp/ide/lazbuild.lpr(617,97) Hint: (5091) Local variable "InheritedOptionStrings" of a managed type does not seem to be initialized
(9022) Compiling resource ../units/arm-linux/nogui/lazbuild.or
An unhandled exception occurred at $00079B9C:
EStringListError: List index (7) out of bounds
  $00079B9C
  $00090154

/usr/local/lazarus/trunktmp/ide/lazbuild.lpr(1870,1) Error: (9029) Error while compiling resources
/usr/local/lazarus/trunktmp/ide/lazbuild.lpr(1870,1) Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Makefile:4010: recipe for target 'lazbuild' failed
make[2]: *** [lazbuild] Error 1
make[2]: Leaving directory '/usr/local/lazarus/trunktmp/ide'
Makefile:4437: recipe for target 'lazbuilder' failed
make[1]: *** [lazbuilder] Error 2
make[1]: Leaving directory '/usr/local/lazarus/trunktmp/ide'
Makefile:3221: recipe for target 'lazbuild' failed
make: *** [lazbuild] Error 2
« Last Edit: November 07, 2016, 10:23:34 am by rvk »

rvk

  • Hero Member
  • *****
  • Posts: 4324
Re: Lazarus with RPi 3
« Reply #35 on: November 07, 2016, 10:36:32 am »
It's a problem with trunk.
On Windows I also get a error compiling Lazarus (lazbuild in particular)
Code: [Select]
An unhandled exception occurred at $0041F3CA:
EStringListError: List index (7) out of bounds
  $0041F3CA  TSTRINGLIST__INSERT,  line 1632 of C:/dev2/fpc/rtl/objpas/classes/stringl.inc
  $00428B6C  TCONFFILEPARSER__PARSE,  line 171 of fpcres/paramparser.pas
  $00429723  TPARAMETERS__PARSE,  line 377 of fpcres/paramparser.pas
  $00401F95  PARSEPARAMS,  line 175 of fpcres/fpcres.pas
  $00402D04  main,  line 394 of fpcres/fpcres.pas

MAKE.EXE[2]: *** [lazbuild.exe] Error 1
MAKE.EXE[1]: *** [lazbuilder] Error 2
MAKE.EXE: *** [lazbuild] Error 2
Done

krolikbest

  • Full Member
  • ***
  • Posts: 136
Re: Lazarus with RPi 3
« Reply #36 on: November 07, 2016, 10:42:39 am »
so maybe a little older ver (eg. 1.6), but more stable?


rvk

  • Hero Member
  • *****
  • Posts: 4324
Re: Lazarus with RPi 3
« Reply #37 on: November 07, 2016, 10:47:40 am »
so maybe a little older ver (eg. 1.6), but more stable?
I'm not sure at the moment if the problem is FPC or Lazbuild.

You could try the Lazarus fixes_1.6 branche with FPC 3.0
svn co http://svn.freepascal.org/svn/fpc/branches/fixes_3_0/ fixes
svn co http://svn.freepascal.org/svn/lazarus/branches/fixes_1_6/ fixes

(and change the lines below that from trunk to fixes)

Sometimes trunk brakes likes this (It's the hazard of using the latest development version).
Using the fixes_branches normally get you a relative stable version.
Otherwise you could go for the standard released 1.6/3.0 combo.
in
http://svn.freepascal.org/svn/fpc/tags/
http://svn.freepascal.org/svn/lazarus/tags/
« Last Edit: November 07, 2016, 10:50:15 am by rvk »

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8780
  • FPC developer.
Re: Lazarus with RPi 3
« Reply #38 on: November 07, 2016, 05:22:46 pm »
It should be fixed meanwhile.

dogriz

  • Full Member
  • ***
  • Posts: 116
    • Tech blog - Delphi, Lazarus, Firebird, Windows, Linux, Android...
Re: Lazarus with RPi 3
« Reply #39 on: November 08, 2016, 09:01:58 am »
I had same errors with trunk versions from time to time, but with branch FPC 3.0.1 and Lazars 1.6.1, everything works on RaspberryPi 2 and OrangePi One (Raspbian and Armbian OS)
FPC 3.0.4
Lazarus 2.0.6
Debian x86_64, arm

krolikbest

  • Full Member
  • ***
  • Posts: 136
Re: Lazarus with RPi 3
« Reply #40 on: November 08, 2016, 03:21:57 pm »
Finally I've got Lazarus 1.7 (trunk ver).
Thank you rvk and marcov very very much for cooperation :)

stay tuned :) probably it's not an end of my problems, but i'm strongly determined to abandon Windows and Delphi.

Martin


lanties

  • Newbie
  • Posts: 1
Re: Lazarus with RPi 3
« Reply #41 on: November 10, 2016, 05:06:58 pm »
^^^^ krolikbest - What worked for you in the end?

att2

  • New Member
  • *
  • Posts: 49
Re: Lazarus with RPi 3
« Reply #42 on: November 15, 2016, 04:19:51 pm »
Hello,
If you got your banana pi m3 to work with lazarus, its awesome.
I just tried to install Lazarus 1.7 - the IDE starts but soon when I compile my first test program it fails with:

Compile Project, Target: project1: Exit code 256, Errors: 1, Warnings: 2
project1.lpr(22,0) Warning: "crtbegin.o" not found, this will probably cause a linking failure
project1.lpr(22,0) Warning: "crtend.o" not found, this will probably cause a linking failure
/usr/bin/ld.bfd: warning: link.res contains output sections; did you forget -T?
//usr/lib/arm-linux-gnueabihf/libgdk-x11-2.0.so: undefined reference to `XRRFreeMonitors'
//usr/lib/arm-linux-gnueabihf/libgdk-x11-2.0.so: undefined reference to `XRRGetMonitors'
project1.lpr(22,0) Error: Error while linking

Again I am at a loss of just what to do.



Thaddy

  • Hero Member
  • *****
  • Posts: 10516
Re: Lazarus with RPi 3
« Reply #43 on: November 15, 2016, 06:16:11 pm »
project1.lpr(22,0) Warning: "crtbegin.o" not found, this will probably cause a linking failure
project1.lpr(22,0) Warning: "crtend.o" not found, this will probably cause a linking failure
You can ignore them.
But you can also add the GCC library path which is (on my fully up-to-date RPi 3's):
/usr/lib/gcc/arm-linux-gnueabihf/4.9

Now. I don't want to see that question ever again. >:D
You are not the first but I KNOW I have to do it all over again next week.
« Last Edit: November 15, 2016, 06:17:51 pm by Thaddy »

Thaddy

  • Hero Member
  • *****
  • Posts: 10516
Re: Lazarus with RPi 3
« Reply #44 on: November 15, 2016, 06:43:13 pm »
Code: [Select]
/usr/bin/ld.bfd: warning: link.res contains output sections; did you forget -T?
That is an ld (linker) bug and can be safely ignored. The future release of RaspBian is fixed.

Code: [Select]
//usr/lib/arm-linux-gnueabihf/libgdk-x11-2.0.so: undefined reference to `XRRFreeMonitors'
//usr/lib/arm-linux-gnueabihf/libgdk-x11-2.0.so: undefined reference to `XRRGetMonitors'
Are you sure you did a standard install? I have never seen those.... Which is strange. O:-)

 

TinyPortal © 2005-2018