<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Bo Berglund via fpc-pascal <<a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>> schrieb am Do., 16. Nov. 2023, 08:19:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From the Lazarus list:<br>
<br>
>Just a quick follow-up here:<br>
>It seems like the fpc sources have not been updated with the solution to the bug<br>
>discussed here:<br>
><br>
><a href="https://gitlab.com/freepascal.org/fpc/source/-/issues/39295" rel="noreferrer noreferrer" target="_blank">https://gitlab.com/freepascal.org/fpc/source/-/issues/39295</a><br>
><br>
>This causes the build of Lazarus using fpcupdeluxe with the latest fpc 3.2.2 to<br>
>fail because of a problem with __libc_csu_init during linking.<br>
><br>
>Apparently it is fixed in non-released sources of fpc which we are waiting<br>
>for...<br>
<br>
The GitLab ticket was opened 2 years ago:<br>
<a href="https://gitlab.com/freepascal.org/fpc/source/-/issues/39295" rel="noreferrer noreferrer" target="_blank">https://gitlab.com/freepascal.org/fpc/source/-/issues/39295</a><br>
<br>
According to a post on the Lazarus forum the fix that solves the fatal error<br>
during fpc build on 64 bit aarch64 Linux (like on Raspberry Pi4B with Pi-OS 64<br>
bit) has *not* been ported to the target aarch64 Linux, only to powerpc.<br>
<br>
<a href="https://forum.lazarus.freepascal.org/index.php/topic,34645.msg496883.html#msg496883" rel="noreferrer noreferrer" target="_blank">https://forum.lazarus.freepascal.org/index.php/topic,34645.msg496883.html#msg496883</a></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Wrong. Who said that the solution consisted only of a single commit? </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
So I am sitting here unable to run Lazarus/FPC on the RPi4B with the latest 64<br>
bit Pi-OS...<br>
<br>
Is any solution to this problem in the works?<br>
I have tried every fpc source release from 3.2.2 up to trunk with the exact same<br>
result (here from a build try on trunk):<br>
<br>
/bin/ld:<br>
/home/bosse/devtools/lazarus/2.2.6/fpcsrc/rtl/units/aarch64-linux/cprt0.o: in<br>
function `_start':<br>
(.text+0x54): undefined reference to `__libc_csu_init'<br>
/bin/ld: (.text+0x58): undefined reference to `__libc_csu_init'<br>
/bin/ld: (.text+0x5c): undefined reference to `__libc_csu_fini'<br>
/bin/ld: (.text+0x60): undefined reference to `__libc_csu_fini'<br>
make[1]: *** [Makefile:2682: packages_smart] Error 2<br>
make: *** [Makefile:2837: build-stamp.aarch64-linux] Error 2<br>
fpmake.pp(60) Error: Error while linking<br>
fpmake.pp(60) Fatal: There were 1 errors compiling module, stopping<br>
Fatal: Compilation aborted<br>
<br>
I believe that a lot of people will experience this since the 64 bit OS on RPi4<br>
has been recently released as the *recommended* version on that popular<br>
platform...<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I can not reproduce. On a Raspberry OS 10 64-bit I downloaded FPC 3.2.2 for aarch64-linux from SourceForge as well as the sources of both 3.2.3 and 3.3.1 from GitLab. </div><div dir="auto">I install 3.2.2, setup PATH to find the compiler and simply do the following for each 3.2.3 and 3.3.1 (in their corresponding source directories):</div><div dir="auto"><br></div><div dir="auto">make all FPMAKEOPT="-T 4" -j 4</div><div dir="auto">make install INSTALL_PREFIX=/path/for/fpc/<version> - j 4</div><div dir="auto">cd /path/for/fpc/<version>/bin</div><div dir="auto">ln -s .. /lib/fpc/<version>/ppca64 ppca64</div><div dir="auto"><br></div><div dir="auto">(the -T and -j are simply for parallel compilation) </div><div dir="auto"><br></div><div dir="auto">Both 3.2.3 and 3.3.1 (don't forget to set PATH correctly!) can successfully compile a hello world program that links against the C library (in my case by using the cthreads unit) while 3.2.2 can not (as expected). </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>