Linking failure when cross-building a library for Linux.
Original Reporter info from Mantis: DonAlfredo @DonAlfredo
-
Reporter name: Alfred
Original Reporter info from Mantis: DonAlfredo @DonAlfredo
- Reporter name: Alfred
Description:
As already reported on the mailing list, cross-building a library fails during the linking stage due to the dynamic linker not found.
Looking at t_linux.pas, this code is the culprit:
if (isdll) then
begin
Add('INPUT(');
Add(sysrootpath+info.DynamicLinker); <----- gives file not found
Add(')');
end;
I have asked fpcupdeluxe users to test if the code below works for them:
if FileExists(sysrootpath+info.DynamicLinker,false) then
Add(sysrootpath+info.DynamicLinker)
else
Add(ExtractFileName(info.DynamicLinker));
With this code-change, linking succeeds and the binaries (libraries) still work on the target system
Mantis conversion info:
- Mantis ID: 36506
- Platform: Any
- Version: 3.3.1