Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2014-12

FPC on SPARC Linux

9 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mark Morgan Lloyd

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]

Reply by email

Marco van de Voort
to Joost van der Sluis

In our previous episode, Joost van der Sluis said:

> /usr/bin/ld: cannot find -lgcc Install the libc-(devel) package. And your message is not completely clear, does it compile without gdb?

(textmode IDE also requires libc via ncurses)

Reply by email

Pierre Free Pascal
to Mark Morgan Lloyd: I'm having another of my periodic sessions building on minority architectures, I've been…

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

Show quoted text 268 lines
-----Message d'origine----- De : [mailto:fpc-devel- De la part de Mark Morgan Lloyd Envoyé : mardi 30 décembre 2014 19:13 À : 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 - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply by email

Mark Morgan Lloyd
to Marco van de Voort: In our previous episode, Joost van der Sluis said: (textmode IDE also requires libc via…
Marco van de Voort wrote 6 lines
In our previous episode, Joost van der Sluis said: >> /usr/bin/ld: cannot find -lgcc > Install the libc-(devel) package. And your message is not completely > clear, does it compile without gdb? (textmode IDE also requires libc via ncurses)

It compiles without gdb and appears to run. There are sufficient libraries etc. installed that 2.6.4 compiles and runs, although as I said I've not exercised the debugger.

I'd note that 2.7.1 installation still ignores e.g. INSTALL_BINDIR=/usr/local/bin/fpc.d/2.7.1 and insists on clobbering anything in /usr/local/bin, hence the fpc binary from trunk has overwritten the one from 2.6.4 which IMO should not be allowed to happen.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to Joost van der Sluis: Install the libc-(devel) package. And your message is not completely clear, does it…
Joost van der Sluis wrote 7 lines
On 12/30/2014 07:12 PM, Mark Morgan Lloyd wrote: > /usr/bin/ld: cannot find -lgcc Install the libc-(devel) package. And your message is not completely clear, does it compile without gdb? See also the Lazarus-FAQ.

Up to date URL please? The version I see is dated 2010 and this is a new problem: 2.6.4 builds and so did 2.7.1 around [checks] 26319 i.e. about a year ago.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to Pierre Free Pascal: did you try to generate the libraries needed to compile FP IDE with GDB support by using…
Pierre Free Pascal wrote 31 lines
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

Thanks Pierre, I'll investigate. OTOH the existing GDB 6.7.1 libraries appear sufficient for 2.2.4 through 2.4.4 and for 2.6.4, all on the same system without any underlying adjustments.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 28 lines
Pierre Free Pascal wrote: > 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

I've found where we discussed this before, about August 2013. Part of the solution at the time was to use -Xd but...

Show quoted text 7 lines
> In the hope this will help, > > Pierre Muller Thanks Pierre, I'll investigate. OTOH the existing GDB 6.7.1 libraries appear sufficient for 2.2.4 through 2.4.4 and for 2.6.4, all on the same system without any underlying adjustments.

The problem is that there's now a -Xd being put in the internal command line, without a -Fl for the location of libgcc.a since it's no longer being picked up from fpc.cfg.

If I add an explicit -Fl/usr/lib/gcc/sparc-linux-gnu/4.4 (or whatever) to match libgcc.a then fp builds and runs with libgcc, although I've not tested this aggressively. There was an outdated reference to 4.3.2 in fpc.cfg which had been moved around between several generations of machines, this could have affected some earlier builds.

Is there a more appropriate way of doing this than using OPT=-Fl..., and is having a fixed path for libgcc in fpc.cfg still appropriate?

Noting that the makefile is able to work around the case where it can't find libgdb, could something similar be done for libgcc? In other words, a stern warning that something's not right without screwing the entire build?

I notice that on at least some systems (not limited to SPARC) the libgcc path in /etc/fpc.cfg is derived from the gcc version info even if this doesn't match what's on disc, e.g. something like ...linux-gnu/4.3.2 rather than ...linux-gnu/4.3

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Pierre Free Pascal
to Mark Morgan Lloyd

Hi Mark,

Show quoted text 55 lines
-----Message d'origine----- De : [mailto:fpc-devel- De la part de Mark Morgan Lloyd Envoyé : mercredi 7 janvier 2015 12:01 À : Objet : Re: [fpc-devel] FPC on SPARC Linux Mark Morgan Lloyd wrote: > Pierre Free Pascal wrote: >> 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 I've found where we discussed this before, about August 2013. Part of the solution at the time was to use -Xd but... >> In the hope this will help, >> >> Pierre Muller > > Thanks Pierre, I'll investigate. OTOH the existing GDB 6.7.1 libraries > appear sufficient for 2.2.4 through 2.4.4 and for 2.6.4, all on the same > system without any underlying adjustments. The problem is that there's now a -Xd being put in the internal command line, without a -Fl for the location of libgcc.a since it's no longer being picked up from fpc.cfg.

This should not matter if you use the script I was talking about, because GDB compilation also required libgcc, so that it should be inside the generated gdblib.inc

Show quoted text 10 lines
If I add an explicit -Fl/usr/lib/gcc/sparc-linux-gnu/4.4 (or whatever) to match libgcc.a then fp builds and runs with libgcc, although I've not tested this aggressively. There was an outdated reference to 4.3.2 in fpc.cfg which had been moved around between several generations of machines, this could have affected some earlier builds. Is there a more appropriate way of doing this than using OPT=-Fl..., and is having a fixed path for libgcc in fpc.cfg still appropriate?

Yes, see above.

Show quoted text 11 lines
Noting that the makefile is able to work around the case where it can't find libgdb, could something similar be done for libgcc? In other words, a stern warning that something's not right without screwing the entire build? I notice that on at least some systems (not limited to SPARC) the libgcc path in /etc/fpc.cfg is derived from the gcc version info even if this doesn't match what's on disc, e.g. something like ...linux-gnu/4.3.2 rather than ...linux-gnu/4.3

I must confess that I don't even know how this is done...

Pierre

Reply by email