[fpc-devel] FPC on SPARC Linux
Pierre Free Pascal
pierre at freepascal.org
Wed Dec 31 13:11:58 CET 2014
Hi Mark,
did you try to generate the libraries needed
to compile FP IDE with GDB support by
using the script in fpcsrc/packages/gdbint/gen-gdblib-inc.sh ?
If you have a build directory of a certain GDB version (let's say 7.8.1
as an example), simply copy the script over to build-gdb-7.8.1/gdb, and run
it locally.
This script tries to determine all the libraries needed
and generates a second script called copy-libs.sh
that you should call in turn, with a simple arg, the target directory,
for example, ./copy-libs.sh ~/pas/libgdb-7.8.1
After that,
using
make -C ./packages/gdbint GDBLIBDIR=~/pas/libgdb-7.8.1
followed by
make -C ide GDBLIBDIR=~/pas/libgdb-7.8.1
should makes the things much easier.
One caveat is to avoid system installed libraries to
be installed instead of the ones inside this directory.
On systems on which I got this problem, I had to manually
remove all lines {$librarypath XXX}
where XXX resolved to /usr/lib or /lib
In the hope this will help,
Pierre Muller
> -----Message d'origine-----
> De : fpc-devel-bounces at lists.freepascal.org [mailto:fpc-devel-
> bounces at lists.freepascal.org] De la part de Mark Morgan Lloyd
> Envoyé : mardi 30 décembre 2014 19:13
> À : fpc-devel at lists.freepascal.org
> Objet : [fpc-devel] FPC on SPARC Linux
>
> I'm having another of my periodic sessions building on minority
> architectures, I've been rather off this for several months due to
> various issues- mostly blown computers- at this end.
>
> Running on Debian "Sqeeze" for SPARC, trunk fails if I tell it to add
> debugging capability to the FP IDE. Building with
>
> make GDB_V607=1 OPT='-V2.6.4 -O- -gl' all
>
> in multiple places I note
>
> fpmake.pp(49) Warning: "crtbegin.o" not found, this will probably cause
> a linking failure
> fpmake.pp(49) Warning: "crtend.o" not found, this will probably cause a
> linking failure
>
> and
>
> Warning: Unable to determine the libgcc path.
>
> although things generally continue until I get to
>
> -----8<-----
> ./fpmake compile --localunitdir=.. --globalunitdir=../packages
> --os=linux --cpu=sparc -o -Ur -o -Xs -o -O2 -o -n -o
> -Fu/usr/local/src/fpc/trunk/rtl/units/sparc-linux -o
> -Fu/usr/local/src/fpc/trunk/packages/paszlib/units/sparc-linux -o
> -Fu/usr/local/src/fpc/trunk/packages/fcl-process/units/sparc-linux -o
> -Fu/usr/local/src/fpc/trunk/packages/hash/units/sparc-linux -o
> -Fu/usr/local/src/fpc/trunk/packages/libtar/units/sparc-linux -o
> -Fu/usr/local/src/fpc/trunk/packages/fpmkunit/units/sparc-linux -o
> -V2.6.4 -o -O- -o -gl -o -vt -o -dRELEASE
> --compiler=/usr/local/src/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/trunk/compiler/ppheap.pas
> Compiling /usr/local/src/fpc/trunk/compiler/cutils.pas
> ..
> Compiling /usr/local/src/fpc/trunk/compiler/dbgstabs.pas
> Compiling /usr/local/src/fpc/trunk/compiler/dbgdwarf.pas
> Compiling /usr/local/src/fpc/trunk/compiler/browcol.pas
> Warning: Unable to determine the libgcc path.
> Compiling fp.pas
> Compiling fpcatch.pas
> Compiling fpcompil.pas
> ..
> Compiling fpcodcmp.pas
> Compiling fpcodtmp.pas
> Compiling fptemplt.pas
> Linking bin/sparc-linux/fp
> The installer encountered the following error:
> External command "/usr/local/src/fpc/trunk/compiler/ppcsparc -Tlinux
> -FEbin/sparc-linux -FUunits/sparc-linux/
> -Fu/usr/local/src/fpc/trunk/rtl/units/sparc-linux/
> -Fu/usr/local/src/fpc/trunk/packages/rtl-extra/units/sparc-linux/
> -Fu/usr/local/src/fpc/trunk/packages/fv/units/sparc-linux/
> -Fu/usr/local/src/fpc/trunk/packages/rtl-console/units/sparc-linux/
> -Fu/usr/local/src/fpc/trunk/packages/chm/units/sparc-linux/
> -Fu/usr/local/src/fpc/trunk/packages/fcl-xml/units/sparc-linux/
> -Fu/usr/local/src/fpc/trunk/packages/fcl-base/units/sparc-linux/
> -Fu/usr/local/src/fpc/trunk/packages/fcl-res/units/sparc-linux/
> -Fu/usr/local/src/fpc/trunk/packages/rtl-objpas/units/sparc-linux/
> -Fu/usr/local/src/fpc/trunk/packages/iconvenc/units/sparc-linux/
> -Fu/usr/local/src/fpc/trunk/packages/regexpr/units/sparc-linux/
> -Fu/usr/local/src/fpc/trunk/packages/gdbint/units/sparc-linux/ -Fl -Ur
> -Xs -O2 -n -Fu/usr/local/src/fpc/trunk/rtl/units/sparc-linux
> -Fu/usr/local/src/fpc/trunk/packages/paszlib/units/sparc-linux
> -Fu/usr/local/src/fpc/trunk/packages/fcl-process/units/sparc-linux
> -Fu/usr/local/src/fpc/trunk/packages/hash/units/sparc-linux
> -Fu/usr/local/src/fpc/trunk/packages/libtar/units/sparc-linux
> -Fu/usr/local/src/fpc/trunk/packages/fpmkunit/units/sparc-linux -V2.6.4
> -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/ -Xd -viq fp.pas" failed with exit code 256.
> Console output:
> Target OS: Linux for SPARC
> Compiling fp.pas
> fp.pas(27,2) (2004) Start reading includefile globdir.inc
> Compiling fpcatch.pas
> fpcatch.pas(18,2) (2004) Start reading includefile globdir.inc
> Compiling fpcompil.pas
> fpcompil.pas(15,2) (2004) Start reading includefile globdir.inc
> Compiling wutils.pas
> Assembling wutils
> Using assembler: /usr/bin/as
> Compiling wviews.pas
> wviews.pas(13,2) (2004) Start reading includefile globdir.inc
> Compiling wconsts.pas
> wconsts.pas(12,2) (2004) Start reading includefile globdir.inc
> wconsts.pas(38,5) (2004) Start reading includefile wconstse.inc
> Writing Resource String Table file: wconsts.rsj
> Assembling wconsts
> Writing Resource String Table file: wviews.rsj
> Assembling wviews
> Compiling wcedit.pas
> wcedit.pas(15,2) (2004) Start reading includefile globdir.inc
> Compiling weditor.pas
> weditor.pas(15,2) (2004) Start reading includefile globdir.inc
> Compiling wcedit.pas
> wcedit.pas(15,2) (2004) Start reading includefile globdir.inc
> Assembling wcedit
> Assembling weditor
> Compiling fpsymbol.pas
> fpsymbol.pas(15,2) (2004) Start reading includefile globdir.inc
> Compiling fpviews.pas
> fpviews.pas(17,2) (2004) Start reading includefile globdir.inc
> Compiling whelp.pas
> Assembling whelp
> Compiling whlpview.pas
> Assembling whlpview
> Compiling wansi.pas
> Assembling wansi
> Compiling fpconst.pas
> Compiling whtmlhlp.pas
> Compiling whtml.pas
> whtml.pas(15,2) (2004) Start reading includefile globdir.inc
> Assembling whtml
> Compiling wchmhwrap.pas
> Assembling wchmhwrap
> Compiling whtmlscn.pas
> Assembling whtmlscn
> Assembling whtmlhlp
> Assembling fpconst
> Compiling fpusrscr.pas
> fpusrscr.pas(15,2) (2004) Start reading includefile globdir.inc
> Assembling fpusrscr
> Compiling fpswitch.pas
> Compiling fpvars.pas
> fpvars.pas(15,2) (2004) Start reading includefile globdir.inc
> Compiling fpdebug.pas
> fpdebug.pas(22,2) (2004) Start reading includefile globdir.inc
> Compiling fpredir.pas
> Assembling fpredir
> Compiling fpregs.pas
> Compiling fpvars.pas
> fpvars.pas(15,2) (2004) Start reading includefile globdir.inc
> Compiling fputils.pas
> Compiling fpvars.pas
> fpvars.pas(15,2) (2004) Start reading includefile globdir.inc
> Compiling fpcalc.pas
> fpcalc.pas(15,2) (2004) Start reading includefile globdir.inc
> Writing Resource String Table file: fpcalc.rsj
> Assembling fpcalc
> Assembling fpvars
> Assembling fputils
> Assembling fpregs
> Compiling fptools.pas
> fptools.pas(15,2) (2004) Start reading includefile globdir.inc
> Compiling wini.pas
> Assembling wini
> Writing Resource String Table file: fptools.rsj
> Assembling fptools
> Compiling fpintf.pas
> fpintf.pas(15,2) (2004) Start reading includefile globdir.inc
> Compiling fpcompil.pas
> fpcompil.pas(15,2) (2004) Start reading includefile globdir.inc
> Compiling fpsymbol.pas
> fpsymbol.pas(15,2) (2004) Start reading includefile globdir.inc
> Compiling fpide.pas
> fpide.pas(25,2) (2004) Start reading includefile globdir.inc
> Compiling fpevalw.pas
> Assembling fpevalw
> Compiling fpkeys.pas
> Assembling fpkeys
> Compiling fpdpansi.pas
> Assembling fpdpansi
> Compiling wconsole.pas
> Assembling wconsole
> Compiling fpini.pas
> fpini.pas(18,2) (2004) Start reading includefile globdir.inc
> Writing Resource String Table file: fpini.rsj
> Assembling fpini
> Compiling fpcompil.pas
> fpcompil.pas(15,2) (2004) Start reading includefile globdir.inc
> Compiling fpdesk.pas
> Compiling wresourc.pas
> Assembling wresourc
> Compiling fphelp.pas
> Compiling woahelp.pas
> Assembling woahelp
> Compiling wnghelp.pas
> Assembling wnghelp
> Compiling wos2help.pas
> Assembling wos2help
> Compiling wvphelp.pas
> Assembling wvphelp
> Compiling wwinhelp.pas
> Assembling wwinhelp
> Assembling fphelp
> make[2]: *** [all] Error 1
> make[1]: *** [ide_all] Error 2
> make: *** [build-stamp.sparc-linux] Error 2
> Compiling fpcodcmp.pas
> Assembling fpcodcmp
> Compiling fpcodtmp.pas
> Writing Resource String Table file: fpcodtmp.rsj
> Assembling fpcodtmp
> Assembling fpdesk
> Writing Resource String Table file: fpcompil.rsj
> Assembling fpcompil
> Compiling fptemplt.pas
> Assembling fptemplt
> fpide.pas(1795,2) (2004) Start reading includefile fpmfile.inc
> fpide.pas(1797,2) (2004) Start reading includefile fpmedit.inc
> fpide.pas(1799,2) (2004) Start reading includefile fpmsrch.inc
> fpide.pas(1801,2) (2004) Start reading includefile fpmrun.inc
> fpide.pas(1803,2) (2004) Start reading includefile fpmcomp.inc
> fpide.pas(1805,2) (2004) Start reading includefile fpmdebug.inc
> fpide.pas(1807,2) (2004) Start reading includefile fpmtools.inc
> fpide.pas(1809,2) (2004) Start reading includefile fpmopts.inc
> fpide.pas(1811,2) (2004) Start reading includefile fpmwnd.inc
> fpide.pas(1813,2) (2004) Start reading includefile fpmhelp.inc
> fpide.pas(1815,2) (2004) Start reading includefile fpmansi.inc
> Writing Resource String Table file: fpide.rsj
> Assembling fpide
> Writing Resource String Table file: fpsymbol.rsj
> Assembling fpsymbol
> Assembling fpintf
> Writing Resource String Table file: fpdebug.rsj
> Assembling fpdebug
> Assembling fpswitch
> Writing Resource String Table file: fpviews.rsj
> Assembling fpviews
> Writing Resource String Table file: fpcatch.rsj
> Assembling fpcatch
> Writing Resource String Table file: fp.rsj
> Assembling fp
> Linking bin/sparc-linux/fp
> /usr/bin/ld: warning: bin/sparc-linux/link.res contains output
> sections;
> did you forget -T?
> /usr/bin/ld: cannot find -lgcc
> fp.pas(582) Error: Error while linking
> fp.pas(582) Fatal: There were 1 errors compiling module, stopping
> Fatal: Compilation aborted
>
> make[2]: Leaving directory `/usr/local/src/fpc/trunk/ide'
> make[1]: Leaving directory `/usr/local/src/fpc/trunk'
> ----->8-----
>
> If I build with NOGDB=1 then things are generally OK. 2.6.4 built with
> libgdb, 2.6.2 and 2.6.0 failed (OK without debugger), older versions
> generally OK. I'm not at this point able to say which versions I've
> exercised the debugger with, above is build only.
>
> I can live without a debugger, all I'm aiming for at the moment is to
> have a version of FPC which will work with a fairly recent Lazarus so
> that I can publish some stuff I've been working on.
>
> --
> Mark Morgan Lloyd
> markMLl .AT. telemetry.co .DOT. uk
>
> [Opinions above are the author's, not those of his employers or
> colleagues]
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
More information about the fpc-devel
mailing list