From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9548 invoked by alias); 23 Nov 2010 03:01:10 -0000 Received: (qmail 9538 invoked by uid 22791); 23 Nov 2010 03:01:09 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 23 Nov 2010 03:01:03 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oAN30nOU023012 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 22 Nov 2010 22:00:49 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oAN30hDu005059 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 22 Nov 2010 22:00:48 -0500 Received: from host0.dyn.jankratochvil.net (localhost.localdomain [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id oAN30fEU020491; Tue, 23 Nov 2010 04:00:41 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id oAN30ctH020488; Tue, 23 Nov 2010 04:00:38 +0100 Date: Tue, 23 Nov 2010 03:01:00 -0000 From: Jan Kratochvil To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [RFA] ignore PYTHONHOME environment variable. Message-ID: <20101123030037.GA19962@host0.dyn.jankratochvil.net> References: <1290474202-885-1-git-send-email-brobecker@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1290474202-885-1-git-send-email-brobecker@adacore.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 X-SW-Source: 2010-11/txt/msg00341.txt.bz2 On Tue, 23 Nov 2010 02:03:22 +0100, Joel Brobecker wrote: > This is something I hinted during one of our discussion at this year's > GCC Summit. > > If PYTHONHOME is defined in the environment, then Py_SetProgramName > does not use the program-name location to find the python library. > Instead, it follows the PYTHONHOME, which can cause problems if > it points to a different Python installation, particularly if that > installation is from a different version of Python. On standard Fedora 14 ./configure (no python options given) I get: #define HAVE_LIBPYTHON2_7 1 #define HAVE_PYTHON 1 #define PYTHON_PATH_RELOCATABLE 0 #define WITH_PYTHON_PATH "/usr" I am not a Python expect but I believe for GDB linked with the only regular system Python $PYTHONHOME should work, even for GDB-Python. Maybe it should be overriden only for the case of PYTHON_PATH_RELOCATABLE? Or maybe only if --with-python=SPECIFIC-PATH has been given? (I do not have an opinion what it should do in such case, just I think I know what it should do in the default system Python case.) Thanks, Jan