× CodeTyphon Cross-Build Development, discussions and problems

Question Cross-compile for arm linux on Windows8(64)

  • JungHwan Jang
  • Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 2 months ago - 6 years 2 months ago #8276 by JungHwan Jang
Cross-compile for arm linux on Windows8(64) was created by JungHwan Jang
Hello,
This is my first post to the forum. I have been programming in pascal(Borland..Embarcadaro Delphi) for 14 years now. Recently I wanted to build some data parser module(.so) that could be used on ARM Linux platform, so I found the CodeTyphon project. Thank you for the Codetyphon team.

My development environments like:
Host: Windows 8(64)
Target: ARM Linux
Typhon: 5.5









To demonstrate the problem I have written a very simple module(.so) that just echo string. I cannot compile it for the ARM Linux. I got a error like a follwoing messages.
Compile Project, OS: linux, CPU: arm, Target: libgs2module.so: Exit code 1, Errors: 1
c:\codetyphon\fpc\fpc32\bin\i386-win32\arm-linux-ld.exe: cannot find /lib/ld-linux.so.3
gs2module.pas(19,0) Error: Error while linking

This is my code.
library gs2module;
{$mode objfpc}{$H+}
uses
  Classes;

function echo(AValue: PChar): PChar;
begin
  Result := AValue;
end;

exports
  echo;

begin
end.

Please any thoughts.
Thank you, JH Jang.
Last edit: 6 years 2 months ago by JungHwan Jang.

Please Log in or Create an account to join the conversation.

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
6 years 2 months ago - 6 years 2 months ago #8281 by Sternas Stefanos
Replied by Sternas Stefanos on topic Cross-compile for arm linux on Windows8(64)
Sir
a)-You must define and Target platform info
CT Project has 3 main parameters : Target CPU, Target OS and Target Platform
if you library DON'T use Desktop functions use "NoGUI" for Target Platform

b)-We don't have arm-linux OS-libraries to our server, you must copy all libraries need, like ld-linux.so.3
from target OS to you CT OS-Libraries directory

c)-My suggestion is to build you library (fist) for arm-linux-Raspbian tutorial here
or for arm-linux-Raspbian2 tutorial here
Raspbian it's Debian Linux for arm CPU and Pi arm-board

PilotLogic Architect and Core Programmer
Last edit: 6 years 2 months ago by Sternas Stefanos.
The following user(s) said Thank You: JungHwan Jang

Please Log in or Create an account to join the conversation.

  • JungHwan Jang
  • Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 1 month ago #8326 by JungHwan Jang
Replied by JungHwan Jang on topic Cross-compile for arm linux on Windows8(64)
Dear Sternas Stefanos,
Thank you for your reply.
I was try to building a so file on a two host which are windows 8(64) and Unbuntu14.04LTS(32).
Unfortunately, I could not compile it. Sorry, but I ask for help and advice again.

First, I was re-installing a CT using a install script.
Second, I was building a library using the tutorials( arm-linux-Raspbian and arm-linux-Raspbian2 tutorial ).
- Download ToolChains and OSLibraries.
- Then build it using a cross build engine.






Third: Define a target platform, I just clicking a save settings button.:




Fourth: Project options assigned like a followings:





But I got a error messages like a followings, and the ld-linux-armff.so.3 is placed in a C:\codetyphon\binLibraries\arm-linux-Raspbian:
Compile Project, OS: linux, CPU: arm, Target: libgs2module.so: Exit code 1, Errors: 1
c:\codetyphon\fpc\fpc32\bin\i386-win32\arm-linux-ld.exe: cannot find /lib/ld-linux-armhf.so.3
gs2module.pas(19,0) Error: Error while linking

Please review once more.
Thank you,
JH Jang.

Please Log in or Create an account to join the conversation.