RE: [RFA] Build failure fix: Python troubles on non-python targets...

Pierre Muller
2009-05-28T16:22:37Z

Here is what I get if I move it down:

$ make
make[1]: Entering directory `/usr/local/src/gdbcvs/build-nopython/gdb'
make[2]: Entering directory
`/usr/local/src/gdbcvs/build-nopython/gdb/gnulib'
make all-am
make[3]: Entering directory
`/usr/local/src/gdbcvs/build-nopython/gdb/gnulib'
if gcc -DHAVE_CONFIG_H -I. -I../../../purecvs/gdb/gnulib -I.. -gstabs+
-O0 -
MT memmem.o -MD -MP -MF ".deps/memmem.Tpo" -c -o memmem.o
../../../purecvs/gdb/g
nulib/memmem.c; \
then mv -f ".deps/memmem.Tpo" ".deps/memmem.Po"; else rm -f
".deps/memme
m.Tpo"; exit 1; fi
rm -f libgnu.a
ar cru libgnu.a dummy.o memmem.o
ranlib libgnu.a
make[3]: Leaving directory `/usr/local/src/gdbcvs/build-nopython/gdb/gnulib'
make[2]: Leaving directory `/usr/local/src/gdbcvs/build-nopython/gdb/gnulib'
make[1]: Leaving directory `/usr/local/src/gdbcvs/build-nopython/gdb'
gcc -gstabs+ -O0 -I. -I../../purecvs/gdb -I../../purecvs/gdb/common
-I../../pu
recvs/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H
-I../
../purecvs/gdb/../include/opcode -I../../purecvs/gdb/../readline/.. -I../bfd
-I.
./../purecvs/gdb/../bfd -I../../purecvs/gdb/../include -I../libdecnumber
-I../..
/purecvs/gdb/../libdecnumber -I../../purecvs/gdb/gnulib -Ignulib
-DMI_OUT=1 -D
TUI=1 -DGDBTK -Wall -Wdeclaration-after-statement -Wpointer-arith
-Wformat-nonl
iteral -Wno-unused -Wno-switch -Wno-char-subscripts -Werror -c -o
python-prettyp
rint.o -MT python-prettyprint.o -MMD -MP -MF .deps/python-prettyprint.Tpo
../..
/purecvs/gdb/python/python-prettyprint.c
../../purecvs/gdb/python/python-prettyprint.c:598: error: conflicting types
for
'apply_val_pretty_printer'
../../purecvs/gdb/python/python.h:33: error: previous declaration of
'apply_val_
pretty_printer' was here
../../purecvs/gdb/python/python-prettyprint.c:598: error: conflicting types
for
'apply_val_pretty_printer'
../../purecvs/gdb/python/python.h:33: error: previous declaration of
'apply_val_
pretty_printer' was here
make: *** [python-prettyprint.o] Error 1

Pierre

> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Tom Tromey
> Envoyé : Thursday, May 28, 2009 5:32 PM
> À : Pierre Muller
> Cc : gdb-patches@sourceware.org
> Objet : Re: [RFA] Build failure fix: Python troubles on non-python
> targets...
>
> >>>>> "Pierre" == Pierre Muller <muller@ics.u-strasbg.fr> writes:
>
> Pierre> On DJGPP,
> Pierre> I now get this failure:
> [...]
>
> Sorry about that.
>
> Pierre> The following two changes fixes compilation for me:
> Pierre> Is this patch OK?
>
> Nearly...
>
> Pierre> +
> Pierre> +#ifdef HAVE_PYTHON
> Pierre> +
> Pierre> #include "python.h"
> Pierre> #include "python-internal.h"
>
> This should unconditionally include python.h. So, the conditional
> needs to be moved down a few lines. It is ok to include python.h even
> if Python is not available; and in this case it is desirable so that
> the declarations are picked up (and thus checked against the
> definitions).
>
> Ok with that change. Thanks.
>
> Tom