Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-09

Compiling lazarus on arm-linux

7 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Koenraad Lelong

Hi,

I'm trying to compile lazarus on an arm-linux system (odroid C1, but also on RPi model 2). It works until this :

...
make --assume-new=svn2revisioninc.pas svn2revisioninc make[2]: Entering directory `/home/odroid/Downloads/source/tools' Makefile:2332: warning: overriding commands for target `.' Makefile:2330: warning: ignoring old commands for target `.' /home/odroid/fpc-2.6.4/bin/ppcarm -gl -Fu.
-Fu../components/lazutils/lib/arm-linux -Fu../lcl/units/arm-linux -Fu../lcl/units/arm-linux/nogui -FE. -FU.
-Fl/usr/lib/gcc/arm-linux-gnueabihf/4.9 -Flinclude -Fl/etc/ld.so.conf.d/*.conf -dFPC_ARMHF -darm svn2revisioninc.pas Free Pascal Compiler version 2.6.4 [2014/03/21] for arm Copyright (c) 1993-2014 by Florian Klaempfl and others Target OS: Linux for ARMEL
Compiling svn2revisioninc.pas
Assembling svn2revisioninc
Linking ./svn2revisioninc
/usr/bin/ld.bfd.real: warning: ./link.res contains output sections; did you forget -T?
/home/odroid/fpc-2.6.4/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In function `_haltproc_eabi':
(.text+0x88): undefined reference to `_fini'
/home/odroid/fpc-2.6.4/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In function `_haltproc_eabi':
(.text+0x90): undefined reference to `_init'
svn2revisioninc.pas(791) Error: Error while linking svn2revisioninc.pas(791) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
make[2]: *** [svn2revisioninc] Error 1
make[2]: Leaving directory `/home/odroid/Downloads/source/tools' make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/odroid/Downloads/source/tools' make: *** [lazbuild] Error 2

Firt I tried with the latest stable sources, than I tried with the latest svn-verion, both the same error.

What am I missing ?
First compiled with "make all bigide", the tried with "make all OPT=-dFPC_ARMHF", both have the same problem.

Thanks for any help,

Koenraad.

Reply by email

Martin Schreiber
to Koenraad Lelong
Koenraad Lelong wrote 18 lines
Hi, I'm trying to compile lazarus on an arm-linux system (odroid C1, but also on RPi model 2). It works until this : ... make --assume-new=svn2revisioninc.pas svn2revisioninc make[2]: Entering directory `/home/odroid/Downloads/source/tools' Makefile:2332: warning: overriding commands for target `.' Makefile:2330: warning: ignoring old commands for target `.' /home/odroid/fpc-2.6.4/bin/ppcarm -gl -Fu. -Fu../components/lazutils/lib/arm-linux -Fu../lcl/units/arm-linux -Fu../lcl/units/arm-linux/nogui -FE. -FU. -Fl/usr/lib/gcc/arm-linux-gnueabihf/4.9 -Flinclude -Fl/etc/ld.so.conf.d/*.conf -dFPC_ARMHF -darm svn2revisioninc.pas Free Pascal Compiler version 2.6.4 [2014/03/21] for arm Copyright (c) 1993-2014 by Florian Klaempfl and others Target OS: Linux for ARMEL <<<<<<<<<<<<<<<<--------------

This is wrong, you need a eabihf compiler, either a patched FPC 2.6.4 or better FPC 3.0.1 from here:
http://sourceforge.net/projects/mseide-msegui/files/fpcrossarm/

Martin

Reply by email

Sven Barth
to Koenraad Lelong: I'm trying to compile lazarus on an arm-linux system (odroid C1, but also on RPi model…
"Koenraad Lelong" wrote
What am I missing ? First compiled with "make all bigide", the tried with "make all

OPT=-dFPC_ARMHF", both have the same problem.

In addition to Martin's answer: the -dFPC_ARMHF option is only needed for building the compiler, but not for Lazarus or any other application.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150930/83850d3d/attachment.html>

Reply by email

Koenraad Lelong
to Martin Schreiber: This is wrong, you need a eabihf compiler, either a patched FPC 2.6.4 or better FPC 3.0.1…

Op 30-09-15 om 15:43 schreef Martin Schreiber:

Show quoted text 6 lines
This is wrong, you need a eabihf compiler, either a patched FPC 2.6.4 or better FPC 3.0.1 from here: http://sourceforge.net/projects/mseide-msegui/files/fpcrossarm/ Martin

Thanks,

Although the link points to a crosscompiler, I managed to compile lazarus on the odroid with binaries from your repo. I had to configure the device to run without GUI because of lack of memory. Unfortunately, when I start lazarus, it complains it can't find the fpc-sources, which is true, because I only have a number of binaries. Can I just get the svn-sources and use these ?

And when I try to add packages in lazarus, I can't because of lack of memory. So how can I add packages from the command-line ?

Thanks.

Koenraad

Reply by email

Mark Morgan Lloyd
to Koenraad Lelong
Koenraad Lelong wrote 18 lines
Op 30-09-15 om 15:43 schreef Martin Schreiber: > > This is wrong, you need a eabihf compiler, either a patched FPC 2.6.4 or > better FPC 3.0.1 from here: > http://sourceforge.net/projects/mseide-msegui/files/fpcrossarm/ > > Martin Thanks, Although the link points to a crosscompiler, I managed to compile lazarus on the odroid with binaries from your repo. I had to configure the device to run without GUI because of lack of memory. Unfortunately, when I start lazarus, it complains it can't find the fpc-sources, which is true, because I only have a number of binaries. Can I just get the svn-sources and use these ? And when I try to add packages in lazarus, I can't because of lack of memory. So how can I add packages from the command-line ?

Add a USB memory stick and put a swap partition on it. Assume you need at least 512Mb overall memory to build Lazarus.
http://wiki.lazarus.freepascal.org/Native_ARM_Systems

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Koenraad Lelong
to Mark Morgan Lloyd

Op 30-09-15 om 19:06 schreef Mark Morgan Lloyd:

Show quoted text 24 lines
Koenraad Lelong wrote: > Op 30-09-15 om 15:43 schreef Martin Schreiber: >> >> This is wrong, you need a eabihf compiler, either a patched FPC 2.6.4 or >> better FPC 3.0.1 from here: >> http://sourceforge.net/projects/mseide-msegui/files/fpcrossarm/ >> >> Martin > Thanks, > > Although the link points to a crosscompiler, I managed to compile > lazarus on the odroid with binaries from your repo. I had to configure > the device to run without GUI because of lack of memory. > Unfortunately, when I start lazarus, it complains it can't find the > fpc-sources, which is true, because I only have a number of binaries. > Can I just get the svn-sources and use these ? > > And when I try to add packages in lazarus, I can't because of lack of > memory. So how can I add packages from the command-line ? Add a USB memory stick and put a swap partition on it. Assume you need at least 512Mb overall memory to build Lazarus. http://wiki.lazarus.freepascal.org/Native_ARM_Systems

Thanks,

An odroid C1 has 1G ram, more than 800M free.
But I added an SD-card as swap, and I could compile lazarus with extra packages :-).
Remains the fact that lazarus keeps complaining about the fpc-sources.

Koenraad.

Reply by email

Martin Schreiber
to Koenraad Lelong: Op 30-09-15 om 15:43 schreef Martin Schreiber: Although the link points to a…
Koenraad Lelong wrote 11 lines
Op 30-09-15 om 15:43 schreef Martin Schreiber: > This is wrong, you need a eabihf compiler, either a patched FPC 2.6.4 or > better FPC 3.0.1 from here: > http://sourceforge.net/projects/mseide-msegui/files/fpcrossarm/ > > Martin Thanks, Although the link points to a crosscompiler, I managed to compile lazarus on the odroid with binaries from your repo.

Ah, sorry, wrong link, please use
http://sourceforge.net/projects/mseide-msegui/files/fpcarm/

Show quoted text 9 lines
I had to configure the device to run without GUI because of lack of memory. Unfortunately, when I start lazarus, it complains it can't find the fpc-sources, which is true, because I only have a number of binaries. Can I just get the svn-sources and use these ? And when I try to add packages in lazarus, I can't because of lack of memory. So how can I add packages from the command-line ?

I normally use cross compiling and remote debugging with MSEide: http://mseide-msegui.sourceforge.net/pics/crossarm.png It needs current MSEide+MSEgui from git master:
https://gitlab.com/mseide-msegui/mseide-msegui
and the FPC cross environment from:
http://sourceforge.net/projects/mseide-msegui/files/fpcrossarm/ There soon will be a MSEide+MSEgui 4.0beta1 release. You probably can can configure Lazarus for cross development too.

Martin

Reply by email