Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 268516 - dev-lang/fpc-ide-2.2.4 builds without built-in GDB support
Summary: dev-lang/fpc-ide-2.2.4 builds without built-in GDB support
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-03 21:01 UTC by A.C.Heron
Modified: 2016-01-30 15:13 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge --info.txt,6.98 KB, text/plain)
2009-05-03 21:05 UTC, A.C.Heron
Details
gdb-6.8.50.20090728.ebuild (gdb-6.8.50.20090728.ebuild,1.93 KB, text/plain)
2009-08-08 21:12 UTC, Harald van Dijk (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description A.C.Heron 2009-05-03 21:01:06 UTC
When compiling modules for FPC IDE at a certain point I get the message:

make testgdb
make[2]: Entering directory `/var/tmp/portage/dev-lang/fpc-ide-2.2.4/work/fpcbuild-2.2.4/fpcsrc/ide'
LibGDB not found
LIBGDBFILE=
GDBLIBDIR=../libgdb/linux

make[2]: Leaving directory `/var/tmp/portage/dev-lang/fpc-ide-2.2.4/work/fpcbuild-2.2.4/fpcsrc/ide'

And a bit later:

make postgdbinfo
make[2]: Entering directory `/var/tmp/portage/dev-lang/fpc-ide-2.2.4/work/fpcbuild-2.2.4/fpcsrc/ide'
LibGDB was not found, IDE has no Debugger support
make[2]: Leaving directory `/var/tmp/portage/dev-lang/fpc-ide-2.2.4/work/fpcbuild-2.2.4/fpcsrc/ide'

After that the compilation and linking seem to continue fine.
However, in the resulting program any attempt to use debugging tools, such as "trace into", "step over", "run to", etc. only results in the "Information" window with the message "No debugger support available."

I found a number of reports from people experiencing the same problem. At least two workarounds have been suggested:

1. Manually compile sys-devel/gdb and put the necessary libraries (a number of lib*.a files) into ${WORKDIR}/${P}/fpcsrc/libgdb/linux

2. Instead of compiling get the libraries from ftp://ftp.freepascal.org/fpc/contrib/libgdb/ 

but neither worked for me. Either linking fails for some reason, or the resulting program crashes. However, the AMD64 binary from freepascal.org site works fine and has debugging support.

Observed on AMD64 platform with versions 2.2.0, 2.2.2, 2.2.4 and a number of earlier versions.
Comment 1 A.C.Heron 2009-05-03 21:05:57 UTC
Created attachment 190261 [details]
emerge --info
Comment 2 Harald van Dijk (RETIRED) gentoo-dev 2009-05-14 19:38:50 UTC
Sorry, but FPC's GDB support just doesn't work with recent versions of GDB. This has already been reported upstream:

  http://mantis.freepascal.org/view.php?id=12636

which shifts the blame to gdb. Whichever it is, something needs to be fixed elsewhere before it can get into Gentoo, so I'll close this for now. If upsream (either) is fixed, please re-open this bug.
Comment 3 A.C.Heron 2009-08-08 12:23:59 UTC
The problem was reported as fixed in in gdb/6.8.50.20090628:  
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=473955 
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=509873

Reopening.

I haven't tested it yet, because I couldn't compile gdb-6.8.50.20090803.2.12 with ebuild for 6.8.50.20090302.8.11. I can't access mantis.freepascal.org to see if they tried the fix.
Comment 4 Harald van Dijk (RETIRED) gentoo-dev 2009-08-08 21:12:44 UTC
Created attachment 200623 [details]
gdb-6.8.50.20090728.ebuild

Here's an ebuild to install gdb-6.8.50.20090728 based on a combination of the toolchain overlay and the gdb-6.8-r2 ebuild in the main tree. I've made it install libgdb as simply as possible. I expect it will also work with newer snapshots, but I've only tried this one.

fpc-ide still doesn't work for me with this version:

Linking ./fp
/usr/bin/ld: Warning: alignment 4 of symbol `gdb_sysroot' in /usr/lib32/libgdb.a(main.o) is smaller than 16 in /usr/lib/fpc/2.2.4/units/i386-linux/gdbint/gdbint.o
/usr/bin/ld: Warning: alignment 4 of symbol `batch_silent' in /usr/lib32/libgdb.a(main.o) is smaller than 16 in /usr/lib/fpc/2.2.4/units/i386-linux/gdbint/gdbint.o
/usr/bin/ld: Warning: alignment 4 of symbol `xdb_commands' in /usr/lib32/libgdb.a(main.o) is smaller than 16 in /usr/lib/fpc/2.2.4/units/i386-linux/gdbint/gdbint.o
/usr/bin/ld: Warning: alignment 4 of symbol `dbx_commands' in /usr/lib32/libgdb.a(main.o) is smaller than 16 in /usr/lib/fpc/2.2.4/units/i386-linux/gdbint/gdbint.o
/usr/bin/ld: Warning: alignment 4 of symbol `return_child_result' in /usr/lib32/libgdb.a(main.o) is smaller than 16 in /usr/lib/fpc/2.2.4/units/i386-linux/gdbint/gdbint.o
/usr/lib32/libgdb.a(annotate.o): In function `annotate_ignore_count_change':
(.text+0x0): multiple definition of `annotate_ignore_count_change'
/usr/lib/fpc/2.2.4/units/i386-linux/gdbint/gdbint.o:gdbint.pp:(.text+0x5a0): first defined here
/usr/lib32/libgdb.a(annotate.o): In function `_initialize_annotate':
(.text+0x20): multiple definition of `_initialize_annotate'
/usr/lib/fpc/2.2.4/units/i386-linux/gdbint/gdbint.o:gdbint.pp:(.text+0xab0): first defined here
/usr/lib32/libgdb.a(annotate.o): In function `annotate_array_section_end':
(.text+0x60): multiple definition of `annotate_array_section_end'
/usr/lib/fpc/2.2.4/units/i386-linux/gdbint/gdbint.o:gdbint.pp:(.text+0x990): first defined here
/usr/lib32/libgdb.a(annotate.o): In function `annotate_elt':
(.text+0x90): multiple definition of `annotate_elt'
/usr/lib/fpc/2.2.4/units/i386-linux/gdbint/gdbint.o:gdbint.pp:(.text+0x980): first defined here
/usr/lib32/libgdb.a(annotate.o): In function `annotate_elt_rep_end':
(.text+0xc0): multiple definition of `annotate_elt_rep_end'
/usr/lib/fpc/2.2.4/units/i386-linux/gdbint/gdbint.o:gdbint.pp:(.text+0x970): first defined here
/usr/lib32/libgdb.a(annotate.o): In function `annotate_elt_rep':
(.text+0xf0): multiple definition of `annotate_elt_rep'
/usr/lib/fpc/2.2.4/units/i386-linux/gdbint/gdbint.o:gdbint.pp:(.text+0x960): first defined here
/usr/lib32/libgdb.a(annotate.o): In function `annotate_frame_end':
(.text+0x120): multiple definition of `annotate_frame_end'
/usr/lib/fpc/2.2.4/units/i386-linux/gdbint/gdbint.o:gdbint.pp:(.text+0x750): first defined here
/usr/lib32/libgdb.a(annotate.o): In function `annotate_frame_where':
(.text+0x150): multiple definition of `annotate_frame_where'
/usr/lib/fpc/2.2.4/units/i386-linux/gdbint/gdbint.o:gdbint.pp:(.text+0x740): first defined here
/usr/lib32/libgdb.a(annotate.o): In function `annotate_frame_source_end':
(.text+0x180): multiple definition of `annotate_frame_source_end'
/usr/lib/fpc/2.2.4/units/i386-linux/gdbint/gdbint.o:gdbint.pp:(.text+0x730): first defined here
/usr/lib32/libgdb.a(annotate.o): In function `annotate_frame_source_line':
(.text+0x1b0): multiple definition of `annotate_frame_source_line'
/usr/lib/fpc/2.2.4/units/i386-linux/gdbint/gdbint.o:gdbint.pp:(.text+0x720): first defined here
/usr/lib32/libgdb.a(annotate.o): In function `annotate_frame_source_file_end':
(.text+0x1e0): multiple definition of `annotate_frame_source_file_end'
/usr/lib/fpc/2.2.4/units/i386-linux/gdbint/gdbint.o:gdbint.pp:(.text+0x710): first defined here
/usr/lib32/libgdb.a(annotate.o): In function `annotate_frame_source_file':
(.text+0x210): multiple definition of `annotate_frame_source_file'
/usr/lib/fpc/2.2.4/units/i386-linux/gdbint/gdbint.o:gdbint.pp:(.text+0x700): first defined here
[...]
/usr/lib/fpc/2.2.4/units/i386-linux/gdbint/gdbint.o:gdbint.pp:(.text+0x4f0): first defined here
/usr/lib/fpc/2.2.4/units/i386-linux/gdbint/gdbint.o: In function `GDBINT_TGDBINTERFACE_$__GDB__INIT':
gdbint.pp:(.text+0xd30): undefined reference to `deprecated_create_breakpoint_hook'
/usr/lib/fpc/2.2.4/units/i386-linux/gdbint/gdbint.o: In function `GDBINT_TGDBINTERFACE_$__GDB_DONE':
gdbint.pp:(.text+0xd6c): undefined reference to `deprecated_create_breakpoint_hook'
[...]

(And more undefined references follow, but the rest just seem like missing -l options that would be easy enough to fix.)

I don't think this is properly fixed upstream yet, so I would suggest closing this bug again for now, but I'll check with the fpc folks when I get the chance.
Comment 5 Pacho Ramos gentoo-dev 2016-01-30 15:13:04 UTC
this package is not present