From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 587 invoked by alias); 3 Jun 2013 12:50:06 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 436 invoked by uid 89); 3 Jun 2013 12:50:00 -0000 X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,MSGID_FROM_MTA_HEADER,RCVD_IN_DNSWL_MED,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.1 Received: from e06smtp14.uk.ibm.com (HELO e06smtp14.uk.ibm.com) (195.75.94.110) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 03 Jun 2013 12:49:58 +0000 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 3 Jun 2013 13:43:17 +0100 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 3 Jun 2013 13:43:15 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id AFA6D2190023 for ; Mon, 3 Jun 2013 13:53:03 +0100 (BST) Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps4074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r53CngHU56230100 for ; Mon, 3 Jun 2013 12:49:42 GMT Received: from d06av02.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r53CnqhS018803 for ; Mon, 3 Jun 2013 06:49:53 -0600 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with SMTP id r53Cnp4I018753; Mon, 3 Jun 2013 06:49:51 -0600 Message-Id: <201306031249.r53Cnp4I018753@d06av02.portsmouth.uk.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 03 Jun 2013 14:49:51 +0200 Subject: Python 2.4 compile failure (Re: [PATCH 24/28] introduce gdb_pymodule_addobject) To: tromey@redhat.com (Tom Tromey) Date: Mon, 03 Jun 2013 12:50:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <8761ziy43f.fsf@fleche.redhat.com> from "Tom Tromey" at Apr 19, 2013 08:42:12 AM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13060312-1948-0000-0000-000005530521 X-SW-Source: 2013-06/txt/msg00013.txt.bz2 Tom Tromey wrote: > +int > +gdb_pymodule_addobject (PyObject *module, const char *name, PyObject *object) > +{ > + int result; > + > + Py_INCREF (object); > + result = PyModule_AddObject (module, name, object); > + if (result < 0) > + Py_DECREF (object); > + return result; > +} This causes compile failures on one of our build servers which is still using RHEL5 (which has Python 2.4 installed by default): /home/kwerner/dailybuild/spu-tc-2013-06-02/gdb-head/src/gdb/python/py-utils.c: In function 'gdb_pymodule_addobject': /home/kwerner/dailybuild/spu-tc-2013-06-02/gdb-head/src/gdb/python/py-utils.c:439: warning: passing argument 2 of 'PyModule_AddObject' discards qualifiers from pointer target type The problem seems to be that in Python 2.4, gdb_pymodule_addobject takes a "char *" instead of a "const char *": /usr/include/python2.4/modsupport.h:PyAPI_FUNC(int) PyModule_AddObject(PyObject *, char *, PyObject *); Now I guess 2.4 is quite old, but it is still supported according to GDB documentation (and there are some special cases in the sources) ... Should this be fixed? Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com