From: "Pierre Muller" <muller@ics.u-strasbg.fr>
To: <gdb-patches@sourceware.org>
Subject: [RFA] Build failure fix: Python troubles on non-python targets...
Date: Thu, 28 May 2009 10:03:00 -0000 [thread overview]
Message-ID: <001001c9df7b$8f2a3810$ad7ea830$@u-strasbg.fr> (raw)
On DJGPP,
I now get this failure:
gcc -gstabs+ -O0 -I../../purecvs/gdb/config/djgpp \
-o gdb.exe gdb.o libgdb.a \
../readline/libreadline.a ../opcodes/libopcodes.a ../bfd/libbfd.a
..
/libiberty/libiberty.a ../libdecnumber/libdecnumber.a -ldbg -lm
../libiberty/
libiberty.a gnulib/libgnu.a
libgdb.a(valprint.o): In function `val_print':
e:/cygwin/usr/local/src/gdbcvs/djcvsbuild2/gdb/../../purecvs/gdb/valprint.c:
292:
undefined reference to `_apply_val_pretty_printer'
libgdb.a(valprint.o): In function `value_print':
e:/cygwin/usr/local/src/gdbcvs/djcvsbuild2/gdb/../../purecvs/gdb/valprint.c:
383:
undefined reference to `_apply_val_pretty_printer'
libgdb.a(cp-valprint.o): In function `cp_print_value':
e:/cygwin/usr/local/src/gdbcvs/djcvsbuild2/gdb/../../purecvs/gdb/cp-valprint
.c:4
28: undefined reference to `_apply_val_pretty_printer'
collect2: ld returned 1 exit status
python-prettyprint.o does not seem to be added to libgdb.a...
But if I try to compile it by hand I get this:
In file included from ../../purecvs/gdb/python/python-prettyprint.c:27:
../../purecvs/gdb/python/python-internal.h:49:2: #error "Unable to find
usable Python.h"
In file included from ../../purecvs/gdb/python/python-prettyprint.c:27:
../../purecvs/gdb/python/python-internal.h:66: error: parse error before '*'
token
The HAVE_PYTHON conditional is not at the right position.
It seems like python-prettyprint.o should be added
to CONFIG_OBS if no python is found or
The following two changes fixes compilation for me:
Is this patch OK?
Pierre
2009-05-28 Pierre Muller <muller@ics.u-strasbg.fr>
* configure.ac (!have_libpython): Add python-prettyprint source
and object files.
* configure: Regenerate.
* python/python-prettyprint.c: Move "#ifdef HAVE_PYTHON" before
python headers.
Index: configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/configure.ac,v
retrieving revision 1.101
diff -u -p -r1.101 configure.ac
--- configure.ac 23 Apr 2009 21:28:19 -0000 1.101
+++ configure.ac 28 May 2009 09:57:53 -0000
@@ -685,8 +685,8 @@ if test "${have_libpython}" = yes; then
else
# Even if Python support is not compiled in, we need to have these files
# included in order to recognize the GDB command "python".
- CONFIG_OBS="$CONFIG_OBS python.o python-value.o"
- CONFIG_SRCS="$CONFIG_SRCS python/python.c python/python-value.c"
+ CONFIG_OBS="$CONFIG_OBS python.o python-value.o python-prettyprint.o"
+ CONFIG_SRCS="$CONFIG_SRCS python/python.c python/python-value.c
python/python-prettyprint.c"
fi
AC_SUBST(PYTHON_CFLAGS)
Index: python/python-prettyprint.c
===================================================================
RCS file: /cvs/src/src/gdb/python/python-prettyprint.c,v
retrieving revision 1.2
diff -u -p -r1.2 python-prettyprint.c
--- python/python-prettyprint.c 28 May 2009 01:09:20 -0000 1.2
+++ python/python-prettyprint.c 28 May 2009 09:57:53 -0000
@@ -23,10 +23,12 @@
#include "symtab.h"
#include "language.h"
#include "valprint.h"
+
+#ifdef HAVE_PYTHON
+
#include "python.h"
#include "python-internal.h"
-#ifdef HAVE_PYTHON
/* Helper function for find_pretty_printer which iterates over a list,
calls each function and inspects output. This will return a
next reply other threads:[~2009-05-28 10:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-28 10:03 Pierre Muller [this message]
2009-05-28 14:56 ` Paul Pluzhnikov
2009-05-28 15:38 ` Tom Tromey
2009-05-28 16:22 ` Pierre Muller
2009-05-28 16:23 ` Paul Pluzhnikov
2009-05-28 16:37 ` Tom Tromey
2009-05-28 16:31 ` Paul Pluzhnikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001001c9df7b$8f2a3810$ad7ea830$@u-strasbg.fr' \
--to=muller@ics.u-strasbg.fr \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox