Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 291328 - dev-libs/glib-2.22.2: ImportError: No module named backtrace -> backtrace.py not provided by gdb
Summary: dev-libs/glib-2.22.2: ImportError: No module named backtrace -> backtrace.py ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: https://bugzilla.gnome.org/show_bug.c...
Whiteboard:
Keywords:
: 291545 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-10-31 17:03 UTC by DaggyStyle
Modified: 2018-06-10 09:02 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description DaggyStyle 2009-10-31 17:03:18 UTC
here is the error, it started yesterday after I've upgraded glib.

Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib64/libgobject-2.0.so.0.2200.2-gdb.py",
line 9, in <module>
    from gobject import register
  File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
ImportError: No module named backtrace
[Current thread is 1 (Thread 0x7f56706ff750 (LWP 15555))]


Reproducible: Always
Comment 1 Tiago Macedo 2009-11-01 12:11:53 UTC
I'm having this issue as well. Running x86_64 too
Comment 2 DaggyStyle 2009-11-01 12:18:06 UTC
it may be connected to the fact that the installed version of dev-python/pygobject is 2.18.0
Tiago, what version of pygobject do you have installed?
Comment 3 Tiago Macedo 2009-11-01 15:47:37 UTC
2.2.0 here, that doesn't seem to be the issue.

I have 2 broken machines, I'm powering a third one that doesn't have this issue to see if I can figure out which package the backtrace module belongs to.
Comment 4 Tiago Macedo 2009-11-01 18:59:31 UTC
Compiling gdb without python support fixes this one
Comment 5 Jean-Baptiste Rouault 2009-11-02 16:25:49 UTC
The file gobject.py comes from glib-2.22.2, here's the glib bug related to the commit : https://bugzilla.gnome.org/show_bug.cgi?id=595619
The problem here is that they seems to use some gdb python modules which are not present in stable gdb, but only in some branch of the project archer (http://sourceware.org/gdb/wiki/PythonGdb)
Maybe a bug should be filed upstream about this ?

Seems that https://bugs.gentoo.org/show_bug.cgi?id=291545 is a duplicate of this bug
Comment 6 Sebastian Luther (few) 2009-11-02 19:57:12 UTC
*** Bug 291545 has been marked as a duplicate of this bug. ***
Comment 7 Franz Trischberger 2009-11-02 20:43:47 UTC
(In reply to comment #5)

> Seems that https://bugs.gentoo.org/show_bug.cgi?id=291545 is a duplicate of
> this bug

sry when i ask: what else then building a python-gdb-module is the python-USE-Flag  for?
If it really is something no present in current gdb, why not entirely remove the python-USE-flag? If there was no python-USE-Flag I would (probably ;)) not have posted this duplicate report.
Comment 8 Franz Trischberger 2009-11-03 07:03:49 UTC
BTW:
glib does not crash your application! It is an error within the appcode itself (or probably its dependencies). Your application will still crash under the same circumstances as it did the last time.

This message arises, because you built Qt with glib-support, and it seems as glib also catches the crash and now tries to load the backtrace on it's own - with python trying to load gdb.backtrace.
Comment 9 Jean-Baptiste Rouault 2009-11-03 11:57:16 UTC
(In reply to comment #7)

> 
> sry when i ask: what else then building a python-gdb-module is the
> python-USE-Flag  for?
> If it really is something no present in current gdb, why not entirely remove
> the python-USE-flag? If there was no python-USE-Flag I would (probably ;)) not
> have posted this duplicate report.
> 

In fact there is some python support in gdb, if you compile it with python useflag, you can use the "python" command in gdb and write some python scripts.
Comment 10 Gilles Dartiguelongue gentoo-dev 2009-12-09 22:56:53 UTC
I've seen the traceback messages in regular crashes too so I don't think this is related at all to the original problem. Of course not having a real gdb backtrace of the failing programs and no emerge --info does not help.
Comment 11 DaggyStyle 2009-12-10 06:30:16 UTC
(In reply to comment #10)
> I've seen the traceback messages in regular crashes too so I don't think this
> is related at all to the original problem. Of course not having a real gdb
> backtrace of the failing programs and no emerge --info does not help.
> 
like said before, emerging gdb without python support fixes it, not sure how I can get a real gdb backtrace in this situation, still here is the emerge --info:
Portage 2.1.6.13 (default/linux/amd64/10.0/desktop, gcc-4.4.2, glibc-2.11-r1, 2.6.31-tuxonice x86_64)                                                           
=================================================================               
System uname: Linux-2.6.31-tuxonice-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T8100_@_2.10GHz-with-gentoo-1.12.13                                                       
Timestamp of tree: Thu, 10 Dec 2009 06:00:01 +0000                              
app-shells/bash:     4.0_p35                                                    
dev-java/java-config: 2.1.9-r1                                                  
dev-lang/python:     2.6.4                                                      
dev-util/cmake:      2.6.4-r3                                                   
sys-apps/baselayout: 1.12.13                                                    
sys-apps/sandbox:    1.6-r2                                                     
sys-devel/autoconf:  2.13, 2.63-r1                                              
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.2                                 
sys-devel/binutils:  2.20                                                       
sys-devel/gcc-config: 1.4.1                                                     
sys-devel/libtool:   2.2.6b                                                     
virtual/os-headers:  2.6.30-r1                                                  
ACCEPT_KEYWORDS="amd64"                                                         
CBUILD="x86_64-pc-linux-gnu"                                                    
CFLAGS="-march=core2 -O2 -pipe -msse4.1"                                        
CHOST="x86_64-pc-linux-gnu"                                                     
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"                                        
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"                                          
CXXFLAGS="-march=core2 -O2 -pipe -msse4.1"                                      
DISTDIR="/usr/portage/distfiles"                                                
FEATURES="collision-protect distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"                                
GENTOO_MIRRORS="http://gentoo.llarian.net/ ftp://gentoo.llarian.net/pub/gentoo http://pandemonium.tiscali.de/pub/gentoo/ ftp://pandemonium.tiscali.de/pub/gentoo/ http://linuv.uv.es/mirror/gentoo/ http://gentoo.blueyonder.co.uk ftp://mirrors.blueyonder.co.uk/mirrors/gentoo "                                              
LANG="en_US.UTF-8"                                                              
LDFLAGS="-Wl,-O1"                                                               
LINGUAS="en he es"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=180"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/enlightment"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi aio alsa amd64 amr audiofile berkdb bidi bluetooth branding bzip2 cairo cdparanoia cdr cjk cli consolekit cracklib crypt cups curl cxx dbus dri dts dv dvb dvd dvdr dvdread edb eds emboss encode evo fam ffmpeg ffmpeg-mt firefox flac fortran ftp gdbm gif gphoto2 gpm gtk hal iconv icq id3tag ieee1394 imagemagick irda java javascript joystick jpeg jpeg2k kde lame ldap lirc lua lzma mad matroska mikmod mmx modules mono mp3 mp4 mpeg mtp mudflap multilib nas ncurses nls nptl nptlonly nsplugin ogg openexr opengl openmp oss pam pcre pdf perl php png policykit ppds pppd python qt3support qt4 quicktime readline reflection samba sdl session smp sndfile spell spl srt sse sse2 sse3 ssl ssse3 startup-notification svg sysfs tcpd theora threads thunar tiff truetype unicode usb v4l v4l2 vcd vorbis wavpack wifi wma x264 xine xml xorg xosd xulrunner xv xvid xvmc zlib" ALSA_CARDS="hda-intel usb-audio" ALSA_PCM_PLUGINS="multi asym rate dmix dshare dsnoop softvol plug extplug ioplug hooks empty route file" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="mouse synaptics keyboard evdev joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en he es" LIRC_DEVICES="serial sir dev atiusb" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vesa v4l radeonhd radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 12 Dennis Schridde 2010-04-05 08:41:07 UTC
What information exactly is needed (NEEDINFO) here?
Comment 13 Dennis Schridde 2010-04-05 08:42:36 UTC
[I] dev-libs/glib (2.22.5(2)@29/03/10): The GLib library of C routines
[I] sys-devel/gdb (7.1@20/03/10): GNU debugger
[I] x11-libs/qt-core (4.6.2-r1(4)@20/02/10): The Qt toolkit is a comprehensive C++ application development framework


Portage 2.2_rc67 (default/linux/amd64/10.0/desktop/kde, gcc-4.4.3, glibc-2.11-r1, 2.6.33-gentoo x86_64)
=================================================================
System uname: Linux-2.6.33-gentoo-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_5000+-with-gentoo-2.0.1
Timestamp of tree: Mon, 05 Apr 2010 07:45:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:     4.1_p2-r1
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.5-r1, 3.1.2-r1
dev-python/pycrypto: 2.1.0
dev-util/cmake:      2.8.1
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1
sys-devel/gcc:       4.4.3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.33
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -O2 -march=athlon64-sse3 -fstack-protector -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-pipe -O2 -march=athlon64-sse3 -fstack-protector -ftree-vectorize"
DISTDIR="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="assume-digests distlocks fixpackages metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
GENTOO_MIRRORS="ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ http://distfiles.gentoo.org"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
LINGUAS="de"
MAKEOPTS="-j3"
PKGDIR="/var/cache/portage/packages"
PORTAGE_COMPRESS="xz"
PORTAGE_CONFIGROOT="/"                                                                                                                                                                                              
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"                      
PORTAGE_TMPDIR="/var/tmp"                                                                                                                                                                                           
PORTDIR="/var/cache/portage/gentoo"                                                                                                                                                                                 
PORTDIR_OVERLAY="/var/cache/portage/layman/java-overlay /var/cache/portage/layman/kde /var/cache/portage/layman/oss-overlay /var/cache/portage/layman/pcsx2 /var/cache/portage/layman/sunrise /var/cache/portage/local"                                                                                                                                                                                                                 
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"                                                                                                                                                               
[...]
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 14 bartoz 2010-04-30 10:03:54 UTC
Same problem here with kcminit crashing when starting a kde session.
'm re-emergind gdb without the python USE FLAG; hope it fixes the issue for me too..
Comment 15 Pacho Ramos gentoo-dev 2010-04-30 10:20:26 UTC
What gdb version do you have? 7.0 should be enough per:
http://git.gnome.org/browse/glib/commit/?id=a830fbd62c05193982c72a375251b2202986152f
Comment 16 DaggyStyle 2010-05-17 15:55:11 UTC
now that kdevelop is the tree and the4 forces gdb to be compiled with python flag. what info is needed?
Comment 17 Pacho Ramos gentoo-dev 2010-05-17 16:33:56 UTC
(In reply to comment #15)
> What gdb version do you have? 7.0 should be enough per:
> http://git.gnome.org/browse/glib/commit/?id=a830fbd62c05193982c72a375251b2202986152f
> 

Comment 18 DaggyStyle 2010-05-17 20:53:53 UTC
(In reply to comment #17)
> (In reply to comment #15)
> > What gdb version do you have? 7.0 should be enough per:
> > http://git.gnome.org/browse/glib/commit/?id=a830fbd62c05193982c72a375251b2202986152f
> > 
> 


[I] sys-devel/gdb
     Available versions:  6.6-r2 6.7.1-r3 6.8-r1 (~)6.8-r2 **6.8.50.20090811.2.12 7.0 (~)7.0.1 (~)7.1 {expat multitarget nls python test vanilla}                                       
     Installed versions:  7.1(11:37:12 PM 05/15/2010)(multitarget nls python -expat -test -vanilla)                                                                                     
     Homepage:            http://sources.redhat.com/gdb/
     Description:         GNU debugger
Comment 19 Pacho Ramos gentoo-dev 2010-06-11 15:19:22 UTC
Reopening
Comment 20 Pacho Ramos gentoo-dev 2010-06-11 15:30:51 UTC
/usr/share/gdb/python/gdb/command/backtrace.py should be provided by sys-devel/gdb
Comment 21 Pacho Ramos gentoo-dev 2010-06-11 15:36:41 UTC
Reviewing gdb config.log I can see the following:

Configured with: /var/tmp/portage/sys-devel/gcc-4.4.3-r2/work/gcc-4.4.3/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.4.3 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.3 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.3/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.3/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --disable-nls --with-system-zlib --disable-checking --disable-werror --enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.4.3/python --enable-java-awt=gtk --enable-languages=c,c++,java,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.4.3-r2 p1.2'
Thread model: posix


That looks to my like a strange value for "python-dir", maybe ebuild should set --with-python-dir=/usr/share/gdb/python/gdb/command (as mandriva and fedora seem to do)
Comment 22 Xake 2010-06-11 16:07:33 UTC
(In reply to comment #21)
> Reviewing gdb config.log I can see the following:
> 
> Configured with:
> /var/tmp/portage/sys-devel/gcc-4.4.3-r2/work/gcc-4.4.3/configure --prefix=/usr

I think you are looking at the wrong config.log, from my build.log for gdb:

./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --with-pkgversion=Gentoo 7.1 p1 --with-bugurl=http://bugs.gentoo.org/ --disable-werror --with-expat --enable-nls --with-python

Also it does not seem to distribute files for backtrace.py here.
Comment 23 SpanKY gentoo-dev 2010-07-04 21:35:09 UTC
says who ?  just because one random distro (i.e. Fedora) is shipping experimental gdb branches that include random python files doesnt mean we should be or that random upstream projects (like glib) should be hard requiring them.

any project that requires gdb provide backtrace.py (simply because gdb itself supports the python scripting language) is broken.  i.e. nothing for toolchain to do with the gdb package here.
Comment 24 Nirbheek Chauhan (RETIRED) gentoo-dev 2010-07-08 15:28:39 UTC
+*glib-2.24.1-r1 (08 Jul 2010)
+
+  08 Jul 2010; Nirbheek Chauhan <nirbheek@gentoo.org>
+  +glib-2.24.1-r1.ebuild, +files/glib-2.24-assert-test-failure.patch,
+  +files/glib-2.24-punt-python-check.patch:
+  Don't check for python, and don't install gdb python scripts, bug 291328.
+  Also, fix test failure in assert-msg-test, bug 323667
+

Let's handle the rest of the business on the upstream bug. Closing FIXED.
Comment 25 cilly 2010-08-04 07:40:27 UTC
The issue is resolved, but not in my opinion, it isn't done correctly, since:

The punt-python-check.patch:
# Don't check for python, hence removing the build-time python dep.
    # We remove the gdb python scripts in src_install due to bug 291328
    epatch "${FILESDIR}/${PN}-2.24-punt-python-check.patch"
needs:


    # Needed for the punt-python-check patch.
    # Also needed to prevent croscompile failures, see bug #267603
    eautoreconf

Which will need:

>=dev-util/gtk-doc-am-1.11 as dependency

The result:

gtk-doc-am inherits doc xml packages even if USE="-doc" is set.

Expected behaviour:

If USE="-doc" is set, no gtk-doc or doc xml package should be inherited.

Please reopen bug and fix.
Comment 26 Diego Augusto Molina 2011-07-05 13:31:38 UTC
Hi, I recently switched from python-2.6 to python-2.7 and run python-updater successfully. Then I tried to install a package I built of dev-libs/glib-2.28.8 using the old version of python but it failed claiming python-2.6 was not defined. I read the ebuild and got to this bug, and I think that python should still be a build dependency or dev-libs/glib added to the manual checks list of python-updater.
Comment 27 Diego Augusto Molina 2011-07-05 13:32:54 UTC
Check http://forums.gentoo.org/viewtopic-p-6744418.html#6744418 for a discussion.
Comment 28 Pacho Ramos gentoo-dev 2011-07-05 13:47:48 UTC
(In reply to comment #26)
> Hi, I recently switched from python-2.6 to python-2.7 and run python-updater
> successfully. Then I tried to install a package I built of dev-libs/glib-2.28.8
> using the old version of python but it failed claiming python-2.6 was not
> defined. I read the ebuild and got to this bug, and I think that python should
> still be a build dependency or dev-libs/glib added to the manual checks list of
> python-updater.

grepping in glib sources after applying all patches, looks like it still needs python at buildtime... but the dependency is ok (it's pulled in by python.eclass as we are setting PYTHON_DEPEND="2").

As you are suffering that problems with binpkgs, I think that is caused by bug 337320