From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95885 invoked by alias); 19 Aug 2016 15:36:58 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 95867 invoked by uid 89); 19 Aug 2016 15:36:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=brobeckeradacorecom, Hx-languages-length:1576, brobecker@adacore.com, our X-HELO: mail-oi0-f41.google.com Received: from mail-oi0-f41.google.com (HELO mail-oi0-f41.google.com) (209.85.218.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 19 Aug 2016 15:36:47 +0000 Received: by mail-oi0-f41.google.com with SMTP id l203so68426109oib.1 for ; Fri, 19 Aug 2016 08:36:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=YfdmmsFEd1sfj9ikFJLqtEdiagdwyiDU7ROW5ubiZ9w=; b=IA4HIK9hk0TGFckBAq7AD6VKNZiB7uDgcUxAW/wpzViiHnhPkdP8Ic3YVxTg7/pXl7 OY3tWo2Rt4G0Bh8i5hc406i6bNXVrKRKBkc6yw507+bWAidwtadJVhGAvNBEMHGSK4bK hd6BRwumb+1hgt+bQd8T6AkSDQkJJ40ZS3DcW1IXgjCogkQNuqcotTfVxldI2it2lRbP E6fLueZxc/C0g/2L5tCZb6ojtKBD84++NszxTy4WvTmp0fY1RHE0IbdM2qHNa1V5Ls60 LDTPstOJFwoOb8IIr/J8Yl5LQmIjUKkfLkg3dPbz8k99G0Zi+SXAAJX9AdC+Exog2Tc1 Bhjg== X-Gm-Message-State: AEkooutUtrv5xesxzsz9zA1NaHlYQvzOwLBclMa9LEl1NrYR9dUveezVBiamUGG4GrOGSsCnm3kTT1oT8NsPRg== X-Received: by 10.157.3.212 with SMTP id f78mr5707574otf.70.1471621005310; Fri, 19 Aug 2016 08:36:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.60.50 with HTTP; Fri, 19 Aug 2016 08:36:44 -0700 (PDT) In-Reply-To: <20160819054928.GB2983@adacore.com> References: <20160818072133.GB3037@adacore.com> <20160819054928.GB2983@adacore.com> From: David Edelsohn Date: Fri, 19 Aug 2016 15:36:00 -0000 Message-ID: Subject: Re: GDB Python extension on AIX To: Joel Brobecker Cc: Andreas Schwab , "gdb@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2016-08/txt/msg00044.txt.bz2 On Fri, Aug 19, 2016 at 1:49 AM, Joel Brobecker 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