Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 348128 - sys-devel/gcc-4.5 installs libstdcxx pretty printers that dont work quite right
Summary: sys-devel/gcc-4.5 installs libstdcxx pretty printers that dont work quite right
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-08 09:52 UTC by Dennis Schridde
Modified: 2011-03-01 00:14 UTC (History)
3 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 Dennis Schridde 2010-12-08 09:52:55 UTC
When running a C++ program in GDB:

Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib64/gcc/x86_64-pc-linux-gnu/4.5.1/libstdc++.so.6.0.14-gdb.py", line 59, in <module>
    from libstdcxx.v6.printers import register_libstdcxx_printers
ImportError: No module named libstdcxx.v6.printers

The files exist though:

/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.1/gcc-4.5.1/python/libstdcxx
/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.1/gcc-4.5.1/python/libstdcxx/__init__.py
/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.1/gcc-4.5.1/python/libstdcxx/v6
/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.1/gcc-4.5.1/python/libstdcxx/v6/__init__.py
/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.1/gcc-4.5.1/python/libstdcxx/v6/printers.py

So probably just the path there is not setup properly.

Reproducible: Always
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2010-12-09 18:20:17 UTC
Please post your `emerge --info' in a comment.
Comment 2 Dennis Schridde 2010-12-10 00:27:20 UTC
Portage 2.2.0_alpha7 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.1, glibc-2.12.1-r3, 2.6.36-gentoo-r3 x86_64)
=================================================================
System uname: Linux-2.6.36-gentoo-r3-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_5000+-with-gentoo-2.0.1
Timestamp of tree: Wed, 08 Dec 2010 07:45:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r2
dev-lang/python:     2.7.1, 3.1.3
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.6.8
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.68
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.5.1-r1, 4.6.0_alpha20101127::toolchain
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.4-r1
sys-devel/make:      3.82
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)
Repositories: gentoo kde pcsx2 oss-overlay sunrise gamerlay-stable toolchain local
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -O2 -march=athlon64-sse3 -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/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 -ftree-vectorize"
DISTDIR="/var/cache/portage/distfiles"                                                                                                                                                                              
EMERGE_DEFAULT_OPTS="--with-bdeps y --keep-going"                                                                                                                                                                   
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"                                                                                                                                                                                                
GENTOO_MIRRORS="ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ http://distfiles.gentoo.org"                                                                      
LANG="en_GB.UTF-8"                                                                                                                                                                                                  
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--hash-style=gnu"                                                                                                                                         
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/kde /var/cache/portage/layman/pcsx2 /var/cache/portage/layman/oss-overlay /var/cache/portage/layman/sunrise /var/cache/portage/layman/gamerlay /var/cache/portage/layman/toolchain /var/cache/portage/local"
[...]
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 SpanKY gentoo-dev 2010-12-14 16:20:02 UTC
odd as the libstdc++.so.6.0.14-gdb.py helper does include the full path:
pythondir = '/usr/share/gcc-data/x86_64-gentoo-linux-uclibc/4.5.1/gcc-4.5.1/python'
Comment 4 Dennis Schridde 2011-02-11 12:07:04 UTC
I inserted 
print("pythondir: %s" % pythondir)
into
/usr/share/gdb/auto-load/usr/lib64/gcc/x86_64-pc-linux-gnu/4.5.2/libstdc++.so.6.0.14-gdb.py

It prints:
"pythondir: share/gcc-data/x86_64-pc-linux-gnu/4.5.2/gcc-4.5.2/python"
Comment 5 Dennis Schridde 2011-02-11 12:16:57 UTC
Figured it out, the initial libdir is wrong.

It was: /usr/lib/../lib64
This yields:
---
objfile: /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/libstdc++.so.6
dir: /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/../share/gcc-data/x86_64-pc-linux-gnu/4.5.2/gcc-4.5.2/python
path: ['/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/../share/gcc-data/x86_64-pc-linux-gnu/4.5.2/gcc-4.5.2/python', '/usr/share/gdb/python', '/usr/lib64/python27.zip', '/usr/lib64/python2.7', '/usr/lib64/python2.7/plat
-linux2', '/usr/lib64/python2.7/lib-tk', '/usr/lib64/python2.7/lib-old', '/usr/lib64/python2.7/lib-dynload', '/usr/lib64/python2.7/site-packages', '/usr/lib64/python2.7/site-packages/gtk-2.0', '/usr/lib64/python2
.7/site-packages/wx-2.8-gtk2-unicode', '/usr/lib64/portage/pym']
pythondir: share/gcc-data/x86_64-pc-linux-gnu/4.5.2/gcc-4.5.2/python
---

Correct is: /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2
Which results in the correct values:
---
objfile: /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/libstdc++.so.6
dir: /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/../../../../share/gcc-data/x86_64-pc-linux-gnu/4.5.2/gcc-4.5.2/python
path: ['/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/../../../../share/gcc-data/x86_64-pc-linux-gnu/4.5.2/gcc-4.5.2/python', '/usr/share/gdb/python', '/usr/lib64/python27.zip', '/usr/lib64/python2.7', '/usr/lib64/python2.7/plat-linux2', '/usr/lib64/python2.7/lib-tk', '/usr/lib64/python2.7/lib-old', '/usr/lib64/python2.7/lib-dynload', '/usr/lib64/python2.7/site-packages', '/usr/lib64/python2.7/site-packages/gtk-2.0', '/usr/lib64/python2.7/site-packages/wx-2.8-gtk2-unicode', '/usr/lib64/portage/pym']
pythondir: share/gcc-data/x86_64-pc-linux-gnu/4.5.2/gcc-4.5.2/python
---
Comment 6 Ryan Hill (RETIRED) gentoo-dev 2011-02-13 12:11:06 UTC
Thanks for tracking this down.  Fixed.

http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain.eclass?r1=1.449&r2=1.450
Comment 7 Martin von Gagern 2011-02-24 10:07:44 UTC
(In reply to comment #6)
> Thanks for tracking this down.  Fixed.

As this fix affects run time behaviour, perhaps you should revbump all affected ebuilds.
Comment 8 SpanKY gentoo-dev 2011-03-01 00:14:24 UTC
sorry, but no can do