Recent

Author Topic: FPC complite source for linux  (Read 1009 times)

@Func

  • New Member
  • *
  • Posts: 36
FPC complite source for linux
« on: February 08, 2020, 05:38:19 am »
Dear all

I complie project use fpc 2.6 and fpc 3.0.2, The 2.6 file can execute . 3.0.2‘s result could not exectue .

I checked the outfiles use file command in linux. the different of the result is the interpreter is different.

2.6 's interperter is ld-linux-armhf.so.3

3.0.4 's interperter is ld-linux.so.3

so my question's can we define the interpreter so.3 file in complie command.

thanks

Thaddy

  • Hero Member
  • *****
  • Posts: 18524
  • Here stood a man who saw the Elbe and jumped it.
Re: FPC complite source for linux
« Reply #1 on: February 08, 2020, 08:35:38 am »
First ld is a linker and not an interpreter. It is also not part of fpc itself but from the gnu binutils (which fpc installs as a dependency if not present).
You can specify a linker from the command line using -FL but I do not think that is what you mean: You can not mix fpc distributions.
Note it also seems you are mixing platforms, which is only possible with a cross compiler.
My advice is to uninstall 3.0.2 - it is very old - and install 3.0.4 (or 3.2.0 when it becomes a release)
Also note the version *must* match both OS and CPU family. A linux-armhf is for arm processors with a hard float ABI (e.g. Ras[berry Pi) You can't run those binaries on other processor families, like i386.
The fpc install needs to match both CPU(e.g. arm(hf) or intel) and Platform(e.g. Linux or Windows) But you can build a cross compiler that can compile from a Linux i386/x86_64 host to arm-linux.
« Last Edit: February 08, 2020, 08:41:54 am by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

 

TinyPortal © 2005-2018