[fpc-pascal] Compiling sources obtained via SVN
Pierre Free Pascal
pierre at freepascal.org
Wed Oct 19 11:22:58 CEST 2011
> In function `GDBINT$_$TGDBINTERFACE_$__$$_GDB__INIT':
> gdbint.pp:(.text+0xfde): undefined reference to
> `deprecated_create_breakpoint_hook'
> /data2/sources/subversion/fpc/packages/gdbint/units/x86_64-linux/gdbint.o:
> In function `GDBINT$_$TGDBINTERFACE_$__$$_GDB_DONE':
> gdbint.pp:(.text+0x103f): undefined reference to
> `deprecated_create_breakpoint_hook'
> /usr/lib64/libgdb.a(varobj.o): In function `construct_visualizer':
The problem is that you are using a system install GDb library
/usr/lib64/libgdb.a
This will most probably fail, as packages/gdbint will probably not find
out
the correct option that were used to generate this library.
The absence of this particular symbol `deprecated_create_breakpoint_hook'
probably means that your libgdb is older and still has
`create_breakpoint_hook' symbol instead.
But there are other problems that might appear as
the library can be generated with different configure options
that need different libraries
(like using --with-python option )
The best way to generate a Free Pascal IDE is
to rebuild gdb from source (best would be to use the latest
port to your system or GDB 7.3 official GNU sources).
Then use packages/gbint/gen-gdblib-inc.sh
by copying that script to build/gdb directory and executing it
from there.
This generates copy-libs.sh script that can be used to copied
the needed (at least the ones the script finds) library to
a destination directory that is the required argument to that script.
./copy-libs.sh /path-to-trunk-svn/libgdb/OS_TARGET/CPU_TARGET/
where you would replace OS_TARGET by linux
CPU_TARGET by x86_64
and /path-to-trunk by the real directory of the svn fpc trunk checkout
(would be fpcsrc sub-directory if you checked out fpcbuild).
It is probably an error in the Makefile to search
for libgdb.a also in system directories as it leads to more
troubles than anything else...
Pierre Muller
More information about the fpc-pascal
mailing list