Forum > General

Cross-compiling dynamic library for Linux ARM

(1/1)

mata_fp:
Hi,

I'm unable to link dynamic library for Linux ARM, when cross-compiling from linux x64.
Everything works fine for executables (ARM and x64), and dynamic libraries on x64.


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---library knihovna; {$mode objfpc}{$H+}{$R *.res} function Get_Version: Int32; cdecl;begin  Result := 1;end; exports  Get_Version; beginend.  
Compile Project, Mode: ARM, CPU: arm, Target: libknihovna.so: Exit code 1, Errors: 1
/home/shareman/Lazarus_FPC/Lazarus_2_0_0/cross/bin/arm-linux/arm-linux-gnueabihf-ld: warning: /media/sf_Projekty_FPC/Temp/17_dll_so/so/link.res contains output sections; did you forget -T?
/home/shareman/Lazarus_FPC/Lazarus_2_0_0/cross/bin/arm-linux/arm-linux-gnueabihf-ld: cannot find /lib/ld-linux-armhf.so.3
knihovna.lpr(17,0) Error: Error while linking
/lib/ld-linux-armhf.so.3 exists at the specified location, if I copy it to the project directory warnings disappear, but the linking error persists.

Is there any way to fix it?

Thanks for the help.

---------------------------------------   
OS: Linux Mint XFCE x64
Lazarus: 2.0.0
FPC:   3.0.4   

DelphiDinosaur:
@mata_fp did you find a solution to this problem?

I have a Console application that dynamically loads a library file. It works fine when compiled for x86_64. When compiled for ARM, the console application runs until it attempts to load a function from the .so library.

DD.

Navigation

[0] Message Index

Go to full version