Atozed Forums
Indy 10 for ArmV7 - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Indy (https://www.atozed.com/forums/forum-8.html)
+--- Forum: Indy General Discussion (https://www.atozed.com/forums/forum-9.html)
+--- Thread: Indy 10 for ArmV7 (/thread-2140.html)



Indy 10 for ArmV7 - KeesBl - 11-23-2020

I try to use Indy 10 on Lazarus. I've installed Lazarus with fpcupdeluxe for cross compiling. My project is a minimal project:
program exportSmData;
{$mode objfpc}{$H+}
uses
  {$IFDEF UNIX}
  cthreads,
  {$ENDIF}
  Classes, SysUtils, idException, idHttp;
var cc: TidHttp;
begin
    cc:=TIdHttp.create(nil);
    cc.free;
end.

This compiles and links fine for targets Windows and Linux 64 bits. When I target Linux on Armv7 (for a Raspberry Pi) I get a link error:
....\cross\bin\arm-linux\arm-linux-gnueabihf-ld.exe: cannot find -lrt. A missing library?
I wonder whether it is possible to compile and link Indy 10 to Arm.
I've compiled and linked a few other programs with this setup to arm without problems.

Greetings,
Kees


RE: Indy 10 for ArmV7 - rlebeau - 11-24-2020

(11-23-2020, 07:01 PM)KeesBl Wrote: This compiles and links fine for targets Windows and Linux 64 bits. When I target Linux on Armv7 (for a Raspberry Pi) I get a link error:
....\cross\bin\arm-linux\arm-linux-gnueabihf-ld.exe: cannot find -lrt. A missing library?

I don't see how that has anything to do with Indy specifically. Sounds like a general issue with your FreePascal/Lazarus setup instead.


RE: Indy 10 for ArmV7 - KeesBl - 11-24-2020

(11-24-2020, 03:46 AM)rlebeau Wrote:
(11-23-2020, 07:01 PM)KeesBl Wrote: This compiles and links fine for targets Windows and Linux 64 bits. When I target Linux on Armv7 (for a Raspberry Pi) I get a link error:
....\cross\bin\arm-linux\arm-linux-gnueabihf-ld.exe: cannot find -lrt. A missing library?

I don't see how that has anything to do with Indy specifically.  Sounds like a general issue with your FreePascal/Lazarus setup instead.

Thanks rlebeau for looking at my problem.
In my lazarus setup a lot of command line programs without Indy compile and link without problems for arm, win64 and linux 64. When I added idHttp.pas to the project I get this error.

The Indy 10 package is not installed in my Lazarus setup.

---------------------------
I've found the problem. The missing library is called librt.so. In lazarus was a library librt.so.1. After copy librt.so.1 to librt.so the error is gone. So the problem is not on Indy but in fpcupdeluxe. Sorry for the noise.