This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDB Python extension on AIX


On Fri, Aug 19, 2016 at 1:49 AM, Joel Brobecker <brobecker@adacore.com> wrote:
>> I'm not sure what a "standard" location is on AIX.  I was using the
>> Bull Freeware installation of Python in /opt/freeware.
>>
>> Was the Python installation found and recognized on your AIX system?
>> Until some of my more recent changes, GDB configure did not consider
>> the installation correct to try to build the GDB feature.
>
> In our case, we configure GDB with --with-python=/path/to/python,
> so it doesn't need to be a location that the configury would find
> by itself. In your case, I think what's happening is that you have
> /opt/freeware/bin in your PATH, and that allows the GDB configury
> to find that python and therefore use it.

This probably relates to the original conflict between implicit and
explicit paths that you were trying to fix

Would the appended patch be an acceptable approach?

Thanks, David

gdb/
* python/python-internal.h: Don't redefine _POSIX_C_SOURCE and
_XOPEN_SOURCE on AIX.

diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
index 8545c7b..6378ccc 100644
--- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h
@@ -72,8 +72,12 @@
    To work around this, undef _POSIX_C_SOURCE before we include Python.h.

    Same problem with _XOPEN_SOURCE.  */
+
+/* A kludge to avoid overriding on AIX.  */
+#ifndef _AIX
 #undef _POSIX_C_SOURCE
 #undef _XOPEN_SOURCE
+#endif

 /* On sparc-solaris, /usr/include/sys/feature_tests.h defines
    _FILE_OFFSET_BITS, which pyconfig.h also defines.  Same work


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]