[fpc-devel] fpc fails to link against libc on some architectures due to multiarch

peter green plugwash at p10link.net
Fri Aug 12 22:33:30 CEST 2011


reassign 636802 fpc
thanks

 From my testing on armel I now belive that the issue causing the 
lazarus build failures is a problem with freepascal and multiarch. I 
haven't tried to troubleshoot the issue on powerpc or sparc as I don't 
have access to them but I presume it is the same issue.

On armel the problem seems to be that freepascal can't find crti.o in 
the new multiarch path. Confusingly if freepascal can't find crti.o then 
rather than throwing an error it simply omits it from link.res. Manually 
pointing freepascal at the multiarch path by using 
-Fl/usr/lib/arm-linux-gnueabi (for armel) allows the test program to be 
built successfully. I presume the problem is the same on powerpc and 
sparc but I have no way of testing those.

So it would seem that the multiarch library path for the relavent 
architecture needs to be added to the default freepascal search path 
either through adding it to the default configuration file or adding it 
to the hardcoded list in fpcsrc/compiler/systems/t_linux.pas .





More information about the fpc-devel mailing list