<div dir="ltr">I did more tests. If I try build a empty program linked with libc, this program cause a linker failure as mentioned on previous message.<div><br></div><div>program program1;</div><div><br></div><div>{$LINKLIB c}<br>
</div><div><br></div><div>begin</div><div><br></div><div>end.</div><div><br></div><div>Someone can say if this is a problem with my raspbian image or a problem with my FPC installation?</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2014-06-25 23:52 GMT-03:00 Fabio Luis Girardi <span dir="ltr"><<a href="mailto:fluisgirardi@gmail.com" target="_blank">fluisgirardi@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">What's the current status of dynlibs unit for Linux ARM?<div><br></div><div>I'm doing a project and a shared library, both on a raspberry pi with FPC 2.6.4. I built the shared library successfully, but when I try build a empty program only with dynlibs unit on uses, the program won't compile. The output is:</div>
<div><br></div><div><div><div>pi@raspberrypi ~/ffcfilas/libcustomization.wizard $ fpc program1.fpr</div><div>Free Pascal Compiler version 2.6.4 [2014/03/21] for arm</div><div>Copyright (c) 1993-2014 by Florian Klaempfl and others</div>
<div>Target OS: Linux for ARMEL</div><div>Compiling program1.fpr</div><div>Assembling program1</div><div>Linking program1</div><div>/usr/bin/ld: warning: link.res contains output sections; did you forget -T?</div><div>/usr/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In function `_haltproc_eabi':</div>
<div>(.text+0x88): undefined reference to `_fini'</div><div>/usr/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In function `_haltproc_eabi':</div><div>(.text+0x90): undefined reference to `_init'</div><div>program1.fpr(16) Error: Error while linking</div>
<div>program1.fpr(16) Fatal: There were 1 errors compiling module, stopping</div><div>Fatal: Compilation aborted</div><div>Error: /usr/bin/ppcarm returned an error exitcode (normal if you did not specify a source file to be compile</div>
</div><div><br></div><div>The program program1.fpr is:</div><div><div><br></div><div>program program1;</div><div><br></div><div>uses dynlibs;<br></div><div><br></div><div>procedure test;</div><div>begin</div><div><br></div>
<div>end;</div><div><br></div><div>begin</div><div> test;</div><div>end.</div></div><div><br></div><div>My FPC come from <a href="http://sourceforge.net/projects/freepascal/files/Linux/2.6.4/fpc-2.6.4.arm-linux.tar" target="_blank">http://sourceforge.net/projects/freepascal/files/Linux/2.6.4/fpc-2.6.4.arm-linux.tar</a><br>
<div></div></div><div><br></div><div>On a Linux 64, the program and the shared library compiles and works fine.</div><div><br></div><div>So, programs and shared libraries works fine on RPi or I'm doing something wrong? </div>
<span class="HOEnZb"><font color="#888888">
<div><br></div><div><div><div><br></div><div><br></div><div><br></div><div><br></div>-- <br>The best regards,<br><br>Fabio Luis Girardi<br>PascalSCADA Project<br><a href="http://sourceforge.net/projects/pascalscada" target="_blank">http://sourceforge.net/projects/pascalscada</a><br>
<a href="http://www.pascalscada.com" target="_blank">http://www.pascalscada.com</a>
</div></div></font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>The best regards,<br><br>Fabio Luis Girardi<br>PascalSCADA Project<br><a href="http://sourceforge.net/projects/pascalscada" target="_blank">http://sourceforge.net/projects/pascalscada</a><br>
<a href="http://www.pascalscada.com" target="_blank">http://www.pascalscada.com</a>
</div>