From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15007 invoked by alias); 23 Nov 2010 09:29:18 -0000 Received: (qmail 14994 invoked by uid 22791); 23 Nov 2010 09:29:16 -0000 X-SWARE-Spam-Status: No, hits=-4.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.35) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 23 Nov 2010 09:29:10 +0000 Received: from kpbe17.cbf.corp.google.com (kpbe17.cbf.corp.google.com [172.25.105.81]) by smtp-out.google.com with ESMTP id oAN9T7w2011533 for ; Tue, 23 Nov 2010 01:29:08 -0800 Received: from qwd7 (qwd7.prod.google.com [10.241.193.199]) by kpbe17.cbf.corp.google.com with ESMTP id oAN9T6Vp002089 for ; Tue, 23 Nov 2010 01:29:06 -0800 Received: by qwd7 with SMTP id 7so71283qwd.29 for ; Tue, 23 Nov 2010 01:29:05 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.181.141 with SMTP id by13mr6251261qab.98.1290504545772; Tue, 23 Nov 2010 01:29:05 -0800 (PST) Received: by 10.220.185.203 with HTTP; Tue, 23 Nov 2010 01:29:05 -0800 (PST) In-Reply-To: <20101123030037.GA19962@host0.dyn.jankratochvil.net> References: <1290474202-885-1-git-send-email-brobecker@adacore.com> <20101123030037.GA19962@host0.dyn.jankratochvil.net> Date: Tue, 23 Nov 2010 09:29:00 -0000 Message-ID: Subject: Re: [RFA] ignore PYTHONHOME environment variable. From: Doug Evans To: Jan Kratochvil Cc: Joel Brobecker , gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-System-Of-Record: true 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/msg00345.txt.bz2 On Mon, Nov 22, 2010 at 7:00 PM, Jan Kratochvil wrote: > 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.) Hi. I'm not sure I understand the objection. AIUI, if gdb is linked with the system python then Joel's patch is essentially a nop (i.e. PYTHONHOME=/usr would still work). [Right?]