From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 125408 invoked by alias); 11 Aug 2016 13:56:37 -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 125386 invoked by uid 89); 11 Aug 2016 13:56:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=GDB's, GDBs, intervene, court X-HELO: mail-oi0-f53.google.com Received: from mail-oi0-f53.google.com (HELO mail-oi0-f53.google.com) (209.85.218.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 11 Aug 2016 13:56:26 +0000 Received: by mail-oi0-f53.google.com with SMTP id f189so5726095oig.3 for ; Thu, 11 Aug 2016 06:56:25 -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=T2PcHhMSdtPPQjz+UbKXcpMNvBq6mwvu8CpL9W6jtIk=; b=M5EEadV9Y5V6K6ZiYHT3BicrerXMOnxBCV3q6/kFVY7uzpPW8zuDTH+lj+dFzNUf0x 8LE9FZmjvv9X63YkvKriXjXy8fwNN59Cpo4jY6ZJbcYCwbNnmWRHIcl18uipEKbbI9Qh 23Q3dYkwEDfPhL3efhKc2qwIrVlU+mVtD9/M0SvaDNrHsOsiqGXqRSHwPtiJivLkuQcb Taz4NFqBl+bqOUb93txQxMCjjvPOL4v4jb5WirCe29IRK6aVu+WfmjVPGj4GTtct18MP K2hxTQw8F9ch4UjrPz+IE8kecgKNBrW9dCebONJnqScd/aaev7Bw2Lj83/DAuZOE1EjF 6taw== X-Gm-Message-State: AEkooutnp9cXRLb6BeRp1Y9OpWpIoC5BgSrgCz9idr3QDczFtNTELoRrOCV7spCCQYvfxcDmWbc9REhTG8DvxA== X-Received: by 10.157.9.39 with SMTP id 36mr1946158otp.138.1470923784141; Thu, 11 Aug 2016 06:56:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.60.50 with HTTP; Thu, 11 Aug 2016 06:56:23 -0700 (PDT) In-Reply-To: References: From: David Edelsohn Date: Thu, 11 Aug 2016 13:56:00 -0000 Message-ID: Subject: Re: GDB Python extension on AIX To: Andreas Schwab , Joel Brobecker Cc: "gdb@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2016-08/txt/msg00016.txt.bz2 On Thu, Aug 11, 2016 at 3:29 AM, Andreas Schwab wrote: > On Aug 11 2016, David Edelsohn wrote: > >> What is the preferred way to address this? > > The preferred way is to arrange to include before any > system headers. And file a bug with python that their use of feature > test macros makes this necessary. Python already is aware of the problem https://bugs.python.org/issue17120 GDB chose to manipulate the feature test macros further to avoid build warnings instead of re-arranging the order of headers: commit aac63f0f2626a3fce5ee936f07ecb48ab7b12ca8 Author: Joel Brobecker Date: Wed Jun 30 23:12:04 2010 +0000 Fix build failure with Python installed in non-system location. The debugger fails to build when configure with --python-python= where is a non-system location. The reason is a warning made fatal due to the definition of _XOPEN_SOURCE inside pyconfig.h. This is exactly the same problem as with _POSIX_C_SOURCE, handled in python-internal.h as follow: | /* /usr/include/features.h on linux systems will define _POSIX_C_SOURCE | if it sees _GNU_SOURCE (which config.h will define). | pyconfig.h defines _POSIX_C_SOURCE to a different value than | /usr/include/features.h does causing compilation to fail. | To work around this, undef _POSIX_C_SOURCE before we include Python.h. */ | #undef _POSIX_C_SOURCE This patch fixes this problem the same way. 2010-06-30 Joel Brobecker * python/python-internal.h (_XOPEN_SOURCE): Undefine before including Python.h. I think the ball is in GDB's court. If GDB is going to intervene in these macros for some systems and configuratino, I request a method to disable this for AIX. Thanks, David