This thread died of natural causes, but since it's the one turned up by search engines I thought it worth tacking a comment onto it. However since SPARC as a target seems to have very little life left in it this is more in the spirit of wrapping up loose ends than anything else.
I commented incorrectly to this that I thought I'd seen this on a SPARC (i.e. 32-bit) platform, and was suspicious that it was something to do with an attempt to move a compiler built on Debian 8 or 9 ("Lenny" or "Stretch", circa 2015 or 2017 respectively) to Debian 10 ("Buster", 2019) possibly the result of an incompatible linker version.
However I later realised that the Debian 10 system was, in fact, SPARC64 and that my problems stemmed at least in part from trying to run a 32-bit compiler on it. I've not explored to what extent this can be worked around with Debian's multiarch libraries, since the tenuous nature of Debian's support for the SPARC64 port introduces far too many potential points of failure for comfort.
Hence I think the first thing to suspect when seeing this sort of issue from a trivial program
0 1>markMLl@sunfire:~$ fpc test.pas
Free Pascal Compiler version 3.0.4 [2017/11/10] for sparc
Copyright (c) 1993-2017 by Florian Klaempfl and others
Target OS: Linux for SPARC
Compiling test.pas
Assembling test
Linking test
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
/usr/bin/ld: skipping incompatible test.o when searching for test.o
/usr/bin/ld: skipping incompatible ./test.o when searching for test.o
/usr/bin/ld: cannot find test.o
test.pas(6) Error: Error while linking
test.pas(6) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/local/bin/ppcsparc returned an error exitcode
is a mismatch between a 64-bit OS and a version of FPC generating 32-bit code, i.e. as repeatedly experienced by people on the x86 and x86_64 platforms.
Having said which, 32-bit SPARC FPC 3.2.2 installed from Sourceforge appears to work with Debian 10 SPARC to an extent that it compiles simple programs to a runnable state. It is not, however, able to build anything complex like the Lazarus IDE.
MarkMLl