Recent

Author Topic: Compiling Lazarus on a pcDuino  (Read 4671 times)

Johan

  • New Member
  • *
  • Posts: 10
Compiling Lazarus on a pcDuino
« on: May 06, 2013, 12:06:29 pm »
Hi

I purchased a pcDuino (arm V7 board with arduino compatible headers - http://www.pcduino.com/) and I have managed to get fpc 2.7.1 installed and compiled by following the instructions from her - http://www.michellcomputing.co.uk/blog/2012/11/lazarus-on-the-raspberry-pi/ . When I try to compile Lazarus from source I get the following error:

Assembling lazbuild
Compiling resource ../units/arm-linux/nogui/lazbuild.or
Linking ../lazbuild
/usr/bin/ld: warning: ../link.res contains output sections; did you forget -T?
/usr/bin/ld: error: /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtbegin.o uses VFP register arguments, ../lazbuild does not
/usr/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtbegin.o
/usr/bin/ld: error: /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtend.o uses VFP register arguments, ../lazbuild does not
/usr/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtend.o
lazbuild.lpr(1624) Error: Error while linking
lazbuild.lpr(1624) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted

Any ideas on how to get past the error ?

Johan

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7504
Re: Compiling Lazarus on a pcDuino
« Reply #1 on: May 06, 2013, 08:26:19 pm »
RPi is V6, you use a V7 system.

Solution: use a FPC compiled for a V7 system. (which amounts to using FPC trunk afaik)

avra

  • Hero Member
  • *****
  • Posts: 1717
    • Additional info
Re: Compiling Lazarus on a pcDuino
« Reply #2 on: May 07, 2013, 08:54:19 am »
If you run Debian or Ubuntu on that board, and you can live with FPC 2.6.0 + Laz 1.0.6 then you might try to install FPC from repository, and then install Laz 1.0.6 from source (I think that was the last version that could be compiled with FPC 2.6.0).
Alternatively, you might try fpGUI prepared here: http://www.turbocontrol.com/easyfpgui.htm.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

jardigital

  • Newbie
  • Posts: 2
Re: Compiling Lazarus on a pcDuino
« Reply #3 on: July 03, 2013, 04:12:06 pm »
Hi,

i also bought PCDUINO. I try to install FPC  release is 2.6.2. using http://www.freepascal.org/down/arm/linux.var download it and install it without any problem.

Then i download lazarus 1.0.10 source http://sourceforge.net/projects/lazarus/files/Lazarus%20Zip%20_%20GZip/. And compile it.
With one problem in compilation:

cprt0.o: In function `_haltproc_eabi':
(.text+0x88): undefined reference to `_fini'
cprt0.o: In function `_haltproc_eabi':
(.text+0x90): undefined reference to `_init'

i solve it using http://bugs.freepascal.org/view.php?id=24056
(editing cpty0.as write missing lines from ucprt.as) .
Then compilling was in OK.
Now I have compiled lazarus. Without any problem.

But when I try to start lazarus program
using "./lazarus" system wrote me "bash: ./lazarus: No such file or directory"
when i start this program using file Manager system wrote me "Filed to execute child process /opt/lazarus/lazarus (No such file or directory)"

file "lazarus" exist in this folder, and is set to executable file.
when i start it like a root there were the some problem.

Anyone know where the problem might be?

Robert