For those reading this on fpc-devel the context is that the upload of fpc 2.6.2 to debian failed on most architectures and I would like upstream input on sorting it out.
Abou Al Montacir wroteMany targets are broken: powerpc, sparc, armel, armhf. The error message looks very similar on 3 targets (powerpc, sparc and armel) but not for armhf.
I've sorted the armhf specific issue. As expected it just required some tweaking of ifdefs so that the code in question wasn't used when building the rtl with 2.6.0. After sorting that issue it failed with much the same linker problem with fpmake as other architectures.
Show quoted text 22 lines
I figured out the cause of this one. To successfully link against libc on many platforms (but NOT i386 and amd64) fpc needs to find certain libraries (/usr/lib/crt?.o iirc). To make things more confusing if it doesn't find them it silently leaves them out of the linker script and the build fails with missing symbol errors. This was discovered some time ago. On debian versions that support multiarch the libraries in question can be found in /usr/lib/<multiarch triplet>
For programs that users build we got arround this some time ago by adding a line to fpc.cfg but that doesn't work for stuff that is built as part of the build process itself like fpmake because the fpc build process (deliberately) ignores fpc.cfg. So the option to make it look int the right place needs to be passed in explicitly. Unfortunately I haven't managed to make the fpc build process pass that in. I vaugely remember an option called something like FPMAKEOPT but I can't seem to find any evidence of it in the 2.6.2 source tree.
Another way of solving the problem would be to add /usr/lib/<multiarch triplet> to the paths that are baked into the compiler (as is done for gcc in debian). IMO this is the best soloution but last time I mentioned this to upstream they didn't seem to keen on the idea.
Yet another option would be to disable threading support in fpmake but i'd rather not go down that road.
