Bug 823576 - user set pythonhome env variable interfere's with GDB
user set pythonhome env variable interfere's with GDB
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: gdb (Show other bugs)
6.2
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Jan Kratochvil
qe-baseos-tools
:
Depends On:
Blocks: 782183 787802
  Show dependency treegraph
 
Reported: 2012-05-21 10:57 EDT by Travis Gummels
Modified: 2012-07-24 09:51 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-24 09:51:54 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Python 14956 None None None 2012-07-24 09:51:55 EDT

  None (edit)
Description Travis Gummels 2012-05-21 10:57:10 EDT
Description of problem:

Python developer tries to run gdb, doesn't work. Tries another program, doesn't work. After several iterations he tries it on on hello_world and it doesn't work. It is not obvious why it doesn't work.  Further investigation finds that some of the programmers are using python 3.x and they do not want to use the default system python libraries since they are incompatible. Therefore, they set their own PYTHONHOME so that they point at the directories which have the python math and physics libraries for their particular application.

At the absolute minimum there needs to be a better error message than:

    > gdb hello
    gdb: symbol lookup error: gdb: undefined symbol:
    PyUnicodeUCS4_FromEncodedObject

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
0. set PYTHONHOME in env to point to non default location
1. compile generic hello_world c program
2. execute gdb against a.out

Actual results:
    > gdb hello
    gdb: symbol lookup error: gdb: undefined symbol:
    PyUnicodeUCS4_FromEncodedObject

Expected results:
No Problemo!

Additional info:
LLNL Requests that this BZ is open to the public.
Comment 14 RHEL Product and Program Management 2012-07-10 04:34:43 EDT
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 15 RHEL Product and Program Management 2012-07-10 19:15:36 EDT
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.
Comment 16 Jan Kratochvil 2012-07-24 09:51:54 EDT
Upstream Python said they will not fix it:
http://bugs.python.org/issue14956#msg161959

Therefore RHEL should not fork.

There is easy site local workaround with /usr/local/gdb:
http://post-office.corp.redhat.com/archives/tools/2012-May/msg00057.html

#! /usr/bin/perl
use strict;
use warnings;
for my $v (qw(PYTHONHOME PYTHONPATH)) {
  next if !exists $ENV{$v};
  unshift @ARGV,"-ex","set environment $v=".$ENV{$v};
  delete $ENV{$v};
}
exec "/usr/bin/gdb",@ARGV;

Note You need to log in before you can comment on or make changes to this bug.