<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>214065</bug_id>
          
          <creation_ts>2008-03-20 17:32 0000</creation_ts>
          <short_desc>dev-util/valgrind-3.3.0 @ ppc64: fatal startup error</short_desc>
          <delta_ts>2008-04-30 10:15:54 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Development</component>
          <version>unspecified</version>
          <rep_platform>PPC64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>maik@cs.vu.nl</reporter>
          <assigned_to>griffon26@gentoo.org</assigned_to>
          <cc>ppc64@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>maik@cs.vu.nl</who>
            <bug_when>2008-03-20 17:32:29 0000</bug_when>
            <thetext>When I run valgrind 3.3.0 on my ppc64 processor (PlayStation 3 with Cell processor), I get an error message. The error message is the same regardless of the command I use behind &apos;valgrind&apos;.

Reproducible: Always

Steps to Reproduce:
1.valgrind /bin/echo
2.
3.

Actual Results:  
==31213== Memcheck, a memory error detector.
==31213== Copyright (C) 2002-2007, and GNU GPL&apos;d, by Julian Seward et al.
==31213== Using LibVEX rev 1804, a library for dynamic binary translation.
==31213== Copyright (C) 2004-2007, and GNU GPL&apos;d, by OpenWorks LLP.
==31213== Using valgrind-3.3.0, a dynamic binary instrumentation framework.
==31213== Copyright (C) 2000-2007, and GNU GPL&apos;d, by Julian Seward et al.
==31213== For more details, rerun with: -v
==31213== 

valgrind:  Fatal error at startup: a function redirection
valgrind:  which is mandatory for this platform-tool combination
valgrind:  cannot be set up.  Details of the redirection are:
valgrind:  
valgrind:  A must-be-redirected function
valgrind:  whose name matches the pattern:      strlen
valgrind:  in an object with soname matching:   ld64.so.1
valgrind:  was not found whilst processing
valgrind:  symbols from the object with soname: ld64.so.1
valgrind:  
valgrind:  Possible fix: install glibc&apos;s debuginfo package on this machine.
valgrind:  
valgrind:  Cannot continue -- exiting now.  Sorry.


Expected Results:  
Run echo and show there are no memory leaks :-)

I couldn&apos;t find any glibc debuginfo package in gentoo.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2008-03-20 17:41:35 0000</bug_when>
            <thetext>emerge --info please...
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>griffon26@gentoo.org</who>
            <bug_when>2008-03-20 19:59:08 0000</bug_when>
            <thetext>Also please locate ld64.so.1 and post the output of: nm /path/to/ld64.so.1|grep strlen
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>maik@cs.vu.nl</who>
            <bug_when>2008-03-21 08:26:34 0000</bug_when>
            <thetext>Portage 2.1.4.4 (default-linux/ppc/ppc64/2007.0/64bit-userland, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23-rc8-gf7767dc7 ppc64)
=================================================================
System uname: 2.6.23-rc8-gf7767dc7 ppc64 Cell Broadband Engine, altivec supported
Timestamp of tree: Wed, 19 Mar 2008 15:46:01 +0000
app-shells/bash:     3.2_p17
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS=&quot;ppc64&quot;
CBUILD=&quot;powerpc64-unknown-linux-gnu&quot;
CFLAGS=&quot;-O2 -pipe -mcpu=970 -mtune=970 -mabi=altivec&quot;
CHOST=&quot;powerpc64-unknown-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc /usr/share/X11/xkb&quot;
CONFIG_PROTECT_MASK=&quot;/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo&quot;
CXXFLAGS=&quot;-O2 -pipe -mcpu=970 -mtune=970 -mabi=altivec&quot;
DISTDIR=&quot;/tmp/portage/distfiles&quot;
FEATURES=&quot;autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch&quot;
GENTOO_MIRRORS=&quot;http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://ftp.easynet.nl/mirror/gentoo/ http://gentoo.oregonstate.edu/ http://www.ibiblio.org/pub/Linux/distributions/gentoo&quot;
LINGUAS=&quot;en nl&quot;
MAKEOPTS=&quot;-j2&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_RSYNC_OPTS=&quot;--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages&quot;
PORTAGE_TMPDIR=&quot;/tmp/portage&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/usr/portage/local/layman/toolchain /usr/portage/local/layman/cell /usr/local/overlays/lu_zero /usr/local/overlays/maik&quot;
SYNC=&quot;rsync://rsync.nl.gentoo.org/gentoo-portage&quot;
USE=&quot;X a52 acl altivec bash-completion bluetooth cli cracklib crypt dri dts dvd dvdread fbcon ftp gpm iconv ipv6 isdnlog live midi mudflap ncurses nls nptl nptlonly offensive openmp pam pcre perl ppc64 pppd profile readline reflection session slang spl ssl stroke symlink tcpd threads tiff unicode usb webdav x264 xorg xvid zlib&quot; ALSA_PCM_PLUGINS=&quot;adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol&quot; APACHE2_MODULES=&quot;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&quot; ELIBC=&quot;glibc&quot; INPUT_DEVICES=&quot;keyboard mouse evdev&quot; KERNEL=&quot;linux&quot; LCD_DEVICES=&quot;bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text&quot; LINGUAS=&quot;en nl&quot; USERLAND=&quot;GNU&quot; VIDEO_CARDS=&quot;dummy fbdev mach64 mga nv r128 radeon vega&quot;
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

# nm /lib64/ld64.so.1
nm: /lib64/ld64.so.1: no symbols

(btw: Valgrind 3.2.3 works fine)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>grobian@gentoo.org</who>
            <bug_when>2008-03-21 18:32:11 0000</bug_when>
            <thetext>with patch I get things like this:

/gentoo/prefix-tree//eclass/java-utils-2.eclass: line 2603: expected `)&apos;
/usr/lib/portage/bin/ebuild.sh: /gentoo/prefix-tree//eclass/java-utils-2.eclass: 603: syntax error near `=~&apos;

Two things here:

/usr/lib/portage/bin/ebuild.sh isn&apos;t prefix, and because of that, it doesn&apos;t use a prefix shell (hence an old bash)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>grobian@gentoo.org</who>
            <bug_when>2008-03-21 19:10:28 0000</bug_when>
            <thetext>sorry folks, wrong tab ;)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>griffon26@gentoo.org</who>
            <bug_when>2008-03-21 19:53:45 0000</bug_when>
            <thetext>Toolchain: what do you think should happen?

I&apos;ll explain the problem:

On ppc32 &amp; ppc64 valgrind needs to redirect the highly optimized strlen in ld*.so, because otherwise it will result in so many false positives that the results are unusable.
If ld is stripped (and splitdebug is not in FEATURES I guess) then valgrind cannot find strlen and will refuse to run altogether.

So basically, valgrind cannot be used on ppc if ld has been stripped.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2008-03-23 16:21:00 0000</bug_when>
            <thetext>sounds like you already have a solution: stick a warning into the ebuild.  i&apos;d say the warning valgrind already emits is sufficient:
valgrind:  Possible fix: install glibc&apos;s debuginfo package on this machine.

but apparently whoever filed the bug didnt think so</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>maik@cs.vu.nl</who>
            <bug_when>2008-03-24 11:12:52 0000</bug_when>
            <thetext>After adding splitdebug to my FEATURES, and recompiling glibc and valgrind 3.3.0, valgrind runs fine now. Thanks for your help!

So please make sure that the ebuild for valgrind will give a message that glibc should be built with splitdebug in the FEATURES when this is not the case on the ppc64 architecture.

Since many users do not know all FEATURES by heart, it is insufficient to only mention that the glibc debuginfo package should be installed, without telling that this should be done using a FEATURES flag.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>corsair@gentoo.org</who>
            <bug_when>2008-03-24 15:45:06 0000</bug_when>
            <thetext>Is ppc64 the only arch suffering from this problem.

I think the error message from valgrind is sufficient.

griffion26: what do you think?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>griffon26@gentoo.org</who>
            <bug_when>2008-03-24 19:44:59 0000</bug_when>
            <thetext>It&apos;s ppc32 &amp; ppc64. I&apos;ll put a warning in the ebuild for those platforms.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>griffon26@gentoo.org</who>
            <bug_when>2008-04-30 10:15:54 0000</bug_when>
            <thetext>This was fixed 25 March, I just forgot to mark this bug RESOLVED.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>