Sign in Join

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

Mailing lists / fpc-pascal / 2013-05

Program not running

6 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Koenraad Lelong

Hi,

Does anyone have an idea why a program made with fpc will not run ? I have an odroid X2 module, with xubuntu armhf. I "installed" the fpc/fpgui-package from Paul Breneman on it. Then I compiled the demo's which went fine. But when I tried to start those executables I get an error :
./helloworld
-bash: ./helloworld: No such file or directory

When I "file" the executables I get :

file helloworld
helloworld: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.0.0, not stripped

ldd gives :
ldd helloworld
not a dynamic executable

A bare fpc-program gives the same results.

program test;
begin
writeln('tfpc-test');
end.

Commandline to compile this :
./ppcarm test -Sc -FEbin -FUdcu -Fufpcunits -Iufpcunits

Running those same executables on a Raspberry Pi works OK.

Thanks for any idea's.

Koenraad Lelong

Koenraad Lelong
to Koenraad Lelong
Koenraad Lelong wrote
Hi,

..

A suggestion on the hardkernel-forum said it might be an armhf problem. Is it prossible to compile fpc from armhf ? Should I do this "native" ? I mean, I have an fpc running on the hardware, but it's an armel, at least I think it is. My ppcarm says Compiler CPU target arm. Then : supported targets : linux for ARMEL.

Thanks,

Koenraad Lelong

Thomas Schatzl
to Koenraad Lelong

Hi,

Koenraad Lelong wrote 7 lines
Op 27-05-13 21:20, Koenraad Lelong schreef: > Hi, > .. A suggestion on the hardkernel-forum said it might be an armhf problem. Is it prossible to compile fpc from armhf ?

There's snapshot on the ftp.

Should I do this "native" ?

Why not?

I mean, I have an fpc running on the hardware, but it's an armel, at least I think it is. My ppcarm says Compiler CPU target arm. Then : supported targets : linux for ARMEL.

Seems so, and explains the issue, i.e. unrecognized executable.

Thomas

Koenraad Lelong
to Thomas Schatzl
Thomas Schatzl wrote
There's snapshot on the ftp.

Downloaded ftp://ftp.freepascal.org/pub/fpc/snapshot/v27/arm-linux-armhf/

> Should I do this "native" ?

Copied the contents to /usr
Tried fpc -i, shows fpc 2.6.2, for armel.

Is there some mistake ?

Since it seems possible, I'll have to investigate how to make my own armhf.

Koenraad.

Thomas Schatzl
to Koenraad Lelong
Koenraad Lelong wrote 12 lines
Op 29-05-13 18:16, Thomas Schatzl schreef: > > There's snapshot on the ftp. Downloaded ftp://ftp.freepascal.org/pub/fpc/snapshot/v27/arm-linux-armhf/ > >> Should I do this "native" ? > Copied the contents to /usr Tried fpc -i, shows fpc 2.6.2, for armel. Is there some mistake ?

Yes, you need to fix some symlink so that fpc uses the new compiler. I think there is a symlink in /usr/bin/ppcppc that still points to the old compiler.

This is probably wrong, don't remember the exact location of the symlink that is used by the fpc wrapper.

Thomas

Mark Morgan Lloyd
to Thomas Schatzl
Thomas Schatzl wrote 17 lines
On Wed, 2013-05-29 at 18:48 +0200, Koenraad Lelong wrote: > Op 29-05-13 18:16, Thomas Schatzl schreef: >> There's snapshot on the ftp. > Downloaded ftp://ftp.freepascal.org/pub/fpc/snapshot/v27/arm-linux-armhf/ > >>> Should I do this "native" ? > Copied the contents to /usr > Tried fpc -i, shows fpc 2.6.2, for armel. > > Is there some mistake ? Yes, you need to fix some symlink so that fpc uses the new compiler. I think there is a symlink in /usr/bin/ppcppc that still points to the old compiler. This is probably wrong, don't remember the exact location of the symlink that is used by the fpc wrapper.

I think in general it will be in the same directory as the fpc wrapper gets placed. So which fpc should give this, and then there'll be a symlink ppcarm or whatever.

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