This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: CVS build for Solaris 5.8 fails: elfcore_write_prpsinfo undefined
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Klaus Zeitler <kzeitler at alcatel-lucent dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 1 Nov 2008 15:17:48 -0700
- Subject: Re: CVS build for Solaris 5.8 fails: elfcore_write_prpsinfo undefined
- References: <q5gfxmd9b9d.fsf@sfsw51.de.lucent.com> <20081101011851.GA15606@adacore.com>
> > Undefined first referenced
> > symbol in file
> > elfcore_write_prpsinfo libgdb.a(procfs.o)
> > elfcore_write_prstatus libgdb.a(procfs.o)
> > ld: fatal: Symbol referencing errors. No output written to gdb
>
> I can reproduce. Looks like a problem in the bfd configure script,
> as the following check returns "no":
>
> AC_CHECK_HEADERS(sys/procfs.h)
Pedro reminded me that he actually had already seen the problem:
http://sourceware.org/ml/gdb-patches/2008-10/msg00283.html.
The problem is that _FILE_OFFSET_BITS is being defined to 64
in order to provide the capability of handling "large files".
The problem is that procfs on solaris clearly does not work
with the large-file environment activated. The error message
is pretty clear about that, I think:
#if !defined(_LP64) && _FILE_OFFSET_BITS == 64
#error "Cannot use procfs in the large file compilation environment"
#endif
This problem was introduced when we started using the AC_SYS_LARGEFILES
macro (patch checked in Sep 11). The work-around is to configure GDB
with --disable-largefile.
I'm not sure what the optimal fix should be. Looks like we cannot have
the two features at the same time on Solaris (I checked version 8, 9
and 10, both sparc and x86). To me, the simplest is to deactivate
AC_SYS_LARGEFILES in bfd for Solaris hosts (unless configured with
--enable-largefile perhaps?).
An alternative is to conditionalize the code in GDB that uses
elfcore_write_prpsinfo and elfcore_write_prstatus. GDB would
then build again, but I think that GDB would then generate core
files which would be missing some pieces that it used to contain.
So I'm not keen on this approach.
Any other suggestion?
--
Joel