* Fwd: GDB/Python conflicts between HEAD and Fedora [not found] <CAPftXUKL9Qst0057rU9SVwiUp=otsVO_Y3h1KGNP+NVBYGVJ0w@mail.gmail.com> @ 2012-10-24 15:05 ` Kevin Pouget 2012-10-24 15:17 ` Joel Brobecker 0 siblings, 1 reply; 3+ messages in thread From: Kevin Pouget @ 2012-10-24 15:05 UTC (permalink / raw) To: gdb Hello, It looks like I have a conflict in my system (Fedora 17) between the package provided GDB and the version I build from the tree, am I the only one ? > ./gdb/gdb #from up-to-date git tree > Python Exception <type 'exceptions.NameError'> name 'os' is not defined: > > warning: Could not load the Python gdb module from `/usr/share/gdb/python'. > > warning: Limited Python support is available from the _gdb module. > [...license details ...] > Couldn't load Python: name 'os' is not defined > Traceback (most recent call last): > [local python file imported from .gdbinit] > import gdb > File "/usr/share/gdb/python/gdb/__init__.py", line 25, in <module> > 'gdb.function': os.path.join(gdb.PYTHONDIR, 'gdb', 'function'), > NameError: name 'os' is not defined /usr/share/gdb/python/gdb/__init__.py is provided by Fedora, and 'os' is indeed not imported On the other hand, the GDB version provided by fedora package works as expected, with my Python scripts taken into account. So, do you have any clue why gdb tries to load these system files, and certainly bugs because of a version mismatch ? Just for information the two versions I use are : GNU gdb (GDB) Fedora (7.4.50.20120120-52.fc17) GNU gdb (GDB) 7.5.50.20121024-cvs Cordially, Kevin ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Fwd: GDB/Python conflicts between HEAD and Fedora 2012-10-24 15:05 ` Fwd: GDB/Python conflicts between HEAD and Fedora Kevin Pouget @ 2012-10-24 15:17 ` Joel Brobecker 2012-10-25 7:41 ` Kevin Pouget 0 siblings, 1 reply; 3+ messages in thread From: Joel Brobecker @ 2012-10-24 15:17 UTC (permalink / raw) To: Kevin Pouget; +Cc: gdb > > warning: Could not load the Python gdb module from `/usr/share/gdb/python'. > > > > warning: Limited Python support is available from the _gdb module. This is the important clue. You need to install the GDB you built in order for it to work properly. This was a recent change to the way the gdb module is constructed, to make it more pythonic. I am guessing that you configured GDB with the default --prefix, and so it's finding the system ones from an older version of GDB. If you're not going to install it in a system area, I'd configure with a different prefix. -- Joel ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Fwd: GDB/Python conflicts between HEAD and Fedora 2012-10-24 15:17 ` Joel Brobecker @ 2012-10-25 7:41 ` Kevin Pouget 0 siblings, 0 replies; 3+ messages in thread From: Kevin Pouget @ 2012-10-25 7:41 UTC (permalink / raw) To: Joel Brobecker; +Cc: gdb On Wed, Oct 24, 2012 at 5:17 PM, Joel Brobecker <brobecker@adacore.com> wrote: >> > warning: Could not load the Python gdb module from `/usr/share/gdb/python'. >> > >> > warning: Limited Python support is available from the _gdb module. > > This is the important clue. You need to install the GDB you built > in order for it to work properly. This was a recent change to the way > the gdb module is constructed, to make it more pythonic. > > I am guessing that you configured GDB with the default --prefix, > and so it's finding the system ones from an older version of GDB. > If you're not going to install it in a system area, I'd configure > with a different prefix. Hello, thanks for your answer, `make install` did solve the problem :) > I am guessing that you configured GDB with the default --prefix, > and so it's finding the system ones from an older version of GDB. just for the record, I think that you're not right on this point: > cd $BUILD_DIR > $SRC_DIR/configure --prefix=$INST_DIR > make > gdb/gdb # from $BUILD_DIR, this don't work yet > make install > gdb/gdb # from $BUILD_DIR, this work now > $INST_DIR/bin/gdb # obviously works correctly Thanks, Kevin ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-25 7:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CAPftXUKL9Qst0057rU9SVwiUp=otsVO_Y3h1KGNP+NVBYGVJ0w@mail.gmail.com>
2012-10-24 15:05 ` Fwd: GDB/Python conflicts between HEAD and Fedora Kevin Pouget
2012-10-24 15:17 ` Joel Brobecker
2012-10-25 7:41 ` Kevin Pouget
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox