[fpc-devel] Compiling for libgdb, and using make -j on larger SPARC systems

Mark Morgan Lloyd markMLl.fpc-devel at telemetry.co.uk
Thu Aug 8 11:02:16 CEST 2013

I'm having one of my periodic attempts to check FPC trunk on various 
architectures, this was going to be a question about an exception when 
trying to link libgdb into 2.6.2 but I find the behaviour has changed so 
I mention that for information only. Also for information only, when I 
used -j 8 for 2.6.2 there was a message about left-over directories, I 
similarly don't get that with trunk (or it's intermittent) so let's 
leave it.

So the current situation is this: when building FPC trunk on Debian 
Linux on SPARC, everything is fine if I use NOGDB=1. However, if I try 
to use libgdb (which has in the past but not particularly recently 
worked OK on this system) I get this

make GDB_V603=1 OPT='-O- -gl' all
./fpmake compile --localunitdir=.. --globalunitdir=../packages 
--os=linux --cpu=sparc -o -Ur -o -Xs -o -O2 -o -n -o 
-Fu/usr/local/src/fpc/fpc-trunk/rtl/units/sparc-linux -o 
-Fu/usr/local/src/fpc/fpc-trunk/packages/paszlib/units/sparc-linux -o 
-o -Fu/usr/local/src/fpc/fpc-trunk/packages/hash/units/sparc-linux -o 
-Fu/usr/local/src/fpc/fpc-trunk/packages/libtar/units/sparc-linux -o 
-Fu/usr/local/src/fpc/fpc-trunk/packages/fpmkunit/units/sparc-linux -o 
-O- -o -gl -o -vt -o -dRELEASE 
--compiler=/usr/local/src/fpc/fpc-trunk/compiler/ppcsparc -bu
Start compiling package ide for target sparc-linux.
LibGDB was found, build IDE with debugger support
Warning: Unable to determine the libgcc path.
        Compiling compiler/compunit.pas
        Compiling /usr/local/src/fpc/fpc-trunk/compiler/ppheap.pas
        Compiling /usr/local/src/fpc/fpc-trunk/compiler/cutils.pas
        Compiling /usr/local/src/fpc/fpc-trunk/compiler/dbgdwarf.pas
        Compiling /usr/local/src/fpc/fpc-trunk/compiler/browcol.pas
Warning: Unable to determine the libgcc path.
        Compiling fp.pas
        Compiling fpcatch.pas
        Compiling fpcompil.pas
        Compiling fpcodtmp.pas
        Compiling fptemplt.pas
        Linking bin/sparc-linux/fp
The installer encountered the following error:
External command "/usr/local/src/fpc/fpc-trunk/compiler/ppcsparc -Tlinux 
-FEbin/sparc-linux -FUunits/sparc-linux/ 
-Fu/usr/local/src/fpc/fpc-trunk/packages/gdbint/units/sparc-linux/ -Fl 
-Ur -Xs -O2 -n -Fu/usr/local/src/fpc/fpc-trunk/rtl/units/sparc-linux 
-Fu/usr/local/src/fpc/fpc-trunk/packages/fpmkunit/units/sparc-linux -O- 
-gl -vt -dRELEASE -Ur -dNOCATCH -dBrowserCol -dGDB -dsparc 
-Fu../compiler -Fu../compiler/sparc -Fu../compiler/targets 
-Fu../compiler/systems -Fi../compiler/sparc -Fi../compiler -Sg 
-Fl../libgdb/linux/sparc/ -viq fp.pas" failed with exit code 1. Console 
Target OS: Linux for SPARC
Compiling fp.pas
fp.pas(27,2)  (2004) Start reading includefile globdir.inc
Compiling fpcatch.pas
Writing Resource String Table file: fpcatch.rst
Assembling fpcatch
Writing Resource String Table file: fp.rst
Assembling fp
Linking bin/sparc-linux/fp
fp.pas(554) Error: Error while linking
fp.pas(554) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted

make[2]: Leaving directory `/usr/local/src/fpc/fpc-trunk/ide'
make[1]: Leaving directory `/usr/local/src/fpc/fpc-trunk'

The obvious first question is: are those references to libgcc 
significant, and what file is being looked for? The normal binary 
installer hasn't been run on this system since FPC's been built on it 
from source since something like 2.0.

Any and all suggestions appreciated.

Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

More information about the fpc-devel mailing list