Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 56622 - Valgrind-2.0.0 fails to compile: union has no member named `__m_count`
Summary: Valgrind-2.0.0 fails to compile: union has no member named `__m_count`
Status: RESOLVED DUPLICATE of bug 32966
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High blocker
Assignee: solar (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-10 10:51 UTC by Stephen Torri
Modified: 2005-07-17 13:06 UTC (History)
1 user (show)

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


Attachments
Config.log file for valgrind-2.0.0 emerge (config.log,31.59 KB, text/plain)
2004-07-12 20:05 UTC, Stephen Torri
Details
Error report from emerge of valgrind. (valgrind-nptl.patch-16166.out,11.99 KB, text/plain)
2004-07-13 17:36 UTC, Stephen Torri
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Torri 2004-07-10 10:51:56 UTC
When I emerge Valgrind-2.0.0 it fails to compile saying that there was a error that the variable __m_count is not a part of a union. I have included the full information below.

Reproducible: Always
Steps to Reproduce:
1. sudo emerge -v valgrind


Actual Results:  
gcc -I.. -I.. -I./demangle -I../include -mpreferred-stack-boundary=2 -c `test -f
'vg_dispatch.S' || echo './'`vg_dispatch.S
if gcc -DHAVE_CONFIG_H -I. -I. -I..  -I./demangle -I../include
-DVG_LIBDIR="\"/usr/lib"\"   -Winline -Wall -Wshadow -O -fomit-frame-pointer
-mpreferred-stack-boundary=2 -g -mpreferred-stack-boundary=2 -MT vg_errcontext.o
-MD -MP -MF ".deps/vg_errcontext.Tpo" \
  -c -o vg_errcontext.o `test -f 'vg_errcontext.c' || echo './'`vg_errcontext.c; \
then mv -f ".deps/vg_errcontext.Tpo" ".deps/vg_errcontext.Po"; \
else rm -f ".deps/vg_errcontext.Tpo"; exit 1; \
fi
vg_scheduler.c: In function `release_one_thread_waiting_on_mutex':
vg_scheduler.c:2340: error: union has no member named `__m_owner'
vg_scheduler.c:2345: error: union has no member named `__m_count'
vg_scheduler.c:2346: error: union has no member named `__m_owner'
vg_scheduler.c:2352: error: union has no member named `__m_owner'
vg_scheduler.c:2352: error: `_pthread_descr' undeclared (first use in this function)
vg_scheduler.c:2352: error: (Each undeclared identifier is reported only once
vg_scheduler.c:2352: error: for each function it appears in.)
vg_scheduler.c:2352: error: syntax error before "i"
vg_scheduler.c: In function `do_pthread_mutex_lock':
vg_scheduler.c:2396: error: union has no member named `__m_kind'
vg_scheduler.c:2406: error: union has no member named `__m_count'
vg_scheduler.c:2415: error: union has no member named `__m_count'
vg_scheduler.c:2417: error: union has no member named `__m_owner'
vg_scheduler.c:2420: error: union has no member named `__m_owner'
vg_scheduler.c:2422: error: union has no member named `__m_kind'
vg_scheduler.c:2424: error: union has no member named `__m_count'
vg_scheduler.c:2428: error: union has no member named `__m_count'
vg_scheduler.c:2461: error: union has no member named `__m_owner'
vg_scheduler.c:2466: error: union has no member named `__m_count'
vg_scheduler.c:2467: error: union has no member named `__m_owner'
vg_scheduler.c:2467: error: `_pthread_descr' undeclared (first use in this function)
vg_scheduler.c:2467: error: syntax error before "tid"
vg_scheduler.c: In function `do_pthread_mutex_unlock':
vg_scheduler.c:2501: error: union has no member named `__m_kind'
vg_scheduler.c:2502: error: union has no member named `__m_kind'
vg_scheduler.c:2503: error: union has no member named `__m_owner'
vg_scheduler.c:2504: error: union has no member named `__m_owner'
vg_scheduler.c:2508: error: union has no member named `__m_kind'
vg_scheduler.c:2518: error: union has no member named `__m_count'
vg_scheduler.c:2528: error: union has no member named `__m_count'
vg_scheduler.c:2536: error: union has no member named `__m_owner'
vg_scheduler.c:2546: error: union has no member named `__m_count'
vg_scheduler.c:2547: error: union has no member named `__m_kind'
vg_scheduler.c:2548: error: union has no member named `__m_count'
vg_scheduler.c:2555: error: union has no member named `__m_count'
vg_scheduler.c:2556: error: union has no member named `__m_owner'
vg_scheduler.c: In function `do_pthread_cond_timedwait_TIMEOUT':
vg_scheduler.c:2610: error: union has no member named `__m_owner'
vg_scheduler.c:2612: error: union has no member named `__m_count'
vg_scheduler.c:2617: error: union has no member named `__m_owner'
vg_scheduler.c:2617: error: `_pthread_descr' undeclared (first use in this function)
vg_scheduler.c:2617: error: syntax error before "tid"
vg_scheduler.c:2618: error: union has no member named `__m_count'
vg_scheduler.c:2630: error: union has no member named `__m_count'
vg_scheduler.c: In function `release_N_threads_waiting_on_cond':
vg_scheduler.c:2681: error: union has no member named `__m_owner'
vg_scheduler.c:2683: error: union has no member named `__m_count'
vg_scheduler.c:2687: error: union has no member named `__m_owner'
vg_scheduler.c:2687: error: `_pthread_descr' undeclared (first use in this function)
vg_scheduler.c:2687: error: syntax error before "i"
vg_scheduler.c:2688: error: union has no member named `__m_count'
vg_scheduler.c:2701: error: union has no member named `__m_count'
vg_scheduler.c: In function `do_pthread_cond_wait':
vg_scheduler.c:2750: error: union has no member named `__m_kind'
vg_scheduler.c:2760: error: union has no member named `__m_count'
vg_scheduler.c:2770: error: union has no member named `__m_count'
vg_scheduler.c:2771: error: union has no member named `__m_owner'
if gcc -DHAVE_CONFIG_H -I. -I. -I..  -I./demangle -I../include
-DVG_LIBDIR="\"/usr/lib"\"   -Winline -Wall -Wshadow -O -fomit-frame-pointer
-mpreferred-stack-boundary=2 -g -mpreferred-stack-boundary=2 -MT vg_execontext.o
-MD -MP -MF ".deps/vg_execontext.Tpo" \
  -c -o vg_execontext.o `test -f 'vg_execontext.c' || echo './'`vg_execontext.c; \
then mv -f ".deps/vg_execontext.Tpo" ".deps/vg_execontext.Po"; \
else rm -f ".deps/vg_execontext.Tpo"; exit 1; \
fi
vg_scheduler.c: In function `scheduler_sanity':
vg_scheduler.c:3570: error: union has no member named `__m_count'
vg_scheduler.c:3571: error: union has no member named `__m_owner'
vg_scheduler.c:3572: error: union has no member named `__m_owner'
make[3]: *** [vg_scheduler.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory
`/var/tmp/portage/valgrind-2.0.0/work/valgrind-2.0.0/coregrind'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/var/tmp/portage/valgrind-2.0.0/work/valgrind-2.0.0/coregrind'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/valgrind-2.0.0/work/valgrind-2.0.0'
make: *** [all] Error 2

!!! ERROR: dev-util/valgrind-2.0.0 failed.
!!! Function src_compile, Line 40, Exitcode 2
!!! (no error message)


Expected Results:  
Valgrind compiles and is merged.

Portage 2.0.50-r8 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3.20040420-r0,
2.6.7-gentoo-r9)
=================================================================
System uname: 2.6.7-gentoo-r9 i686 Pentium III (Katmai)
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -pipe"
DISTDIR="/home/portage/distfiles"
FEATURES="autoaddcvs buildpkg ccache fixpackages sandbox strict userpriv"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/home/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/home/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X alsa apm arts avi berkdb bonobo cdr crypt cups dga doc dvd emacs encode
esd foomaticdb gdbm gif gimpprint gnome gpm gtk gtk2 gtkhtml guile imap imlib
jack java jpeg kde libg++ libwww mad maildir mbox mikmod mmx motif mozilla mpeg
mysql ncurses nls nntp nptl oggvorbis opengl oss pam pdflib perl pic png ppds
python qt quicktime readline samba sasl sdl slang speex spell ssl svga tcltk
tcpd tetex theora tiff truetype x86 xml xml2 xmms xv zlib"
Comment 1 Andrew Ross (RETIRED) gentoo-dev 2004-07-12 19:46:58 UTC
Works fine for me with same CFLAGS, MAKEOPTS, FEATURES, and {glib,gcc,autoconf,automake} version.

Please post your config.log as an attachment, and I will compare with mine. Perhaps configure is autodetecting something present on your system and missing on mine (or vice versa).

You can find config.log in /var/tmp/portage/valgrind-2.0.0/work/valgrind-2.0.0

I also suggest you change this bug's severity from "normal" to "blocker".

Portage 2.0.50-r9 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6.7-gentoo-r8)
=================================================================
System uname: 2.6.7-gentoo-r8 i686 Intel(R) Pentium(R) M processor 1.70GHz
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs buildpkg ccache fixpackages sandbox strict userpriv"
GENTOO_MIRRORS="ftp://ftp.monash.edu.au/pub/linux/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="X acpi alsa apache2 avi bcmath berkdb cdr crypt cups doc dvd encode esd fam gd gdbm gif gnome gpm gtk gtk2 imap imlib java jikes jpeg libwww mad memlimit mmx motif mozilla mpeg mysql ncurses offensive oggvorbis opengl pam pdflib perl png python quicktime readline samba sdl slang spell sse ssl svg svga theora tiff truetype x86 xml2 xmms xv zlib"

Comment 2 Stephen Torri 2004-07-12 20:05:20 UTC
Created attachment 35273 [details]
Config.log file for valgrind-2.0.0 emerge

This file hopefully contains why valgrind does build. Here you go agross.
Comment 3 Stephen Torri 2004-07-12 20:05:51 UTC
Changing bug severity to blocker.
Comment 4 Andrew Ross (RETIRED) gentoo-dev 2004-07-12 20:43:32 UTC
Thanks Stephen. A diff between our config.logS shows that the only difference is NTPL, which is turned on for you and off for me.

Looks like this problem has been reported and addressed upstream - see:

http://bugs.kde.org/show_bug.cgi?id=69616

Please try the suggested patch  (http://bugs.kde.org/attachment.cgi?id=4618&action=view) - the 2.0.0 ebuild should probably be modified to apply it.
Comment 5 Stephen Torri 2004-07-12 20:55:33 UTC
Grabbing the patch is not an issue. What do I edit in the ebuild file? I have not made time to learn how to build my own.
Comment 6 solar (RETIRED) gentoo-dev 2004-07-12 20:56:44 UTC
I don't actually use 2.6-nptl so I can't test or verify said patch 
resolves anything, but if you need me to add this or another patch from
cvs please attach said patch and an ebuild diff that's been tested on
on 2.4.x and 2.6.x w & w/o nptl
Comment 7 Stephen Torri 2004-07-13 17:36:11 UTC
Created attachment 35359 [details]
Error report from emerge of valgrind.
Comment 8 Stephen Torri 2004-07-13 17:36:51 UTC
I have downloaded what I believe is the patch from bugs.kde.org for valgrind-2.0.0. I edited the valgrind-2.0.0.ebuild file as follows:

src_unpack() {
        unpack ${A}
        cd ${S}
#       if [ `uname -r | awk -F . '{print $2}'` == 6 ]; then
#               epatch ${FILESDIR}/${PN}-configure.in-2.6.diff
#               autoconf || die "error while running autoconf"
#       fi
        epatch ${FILESDIR}/${PN}-nptl.patch
}

This should have applied it. Now believe is the result of this when I tried to emerge valgrind-2.0.0:

bash-2.05b$ sudo emerge -v valgrind
Calculating dependencies ...done!
>>> emerge (1 of 1) dev-util/valgrind-2.0.0 to /
>>> md5 src_uri ;-) valgrind-2.0.0.tar.bz2
>>> Unpacking source...
>>> Unpacking valgrind-2.0.0.tar.bz2 to /var/tmp/portage/valgrind-2.0.0/work
 * Applying valgrind-nptl.patch...

 * Failed Patch: valgrind-nptl.patch!
 *
 * Include in your bugreport the contents of:
 *
 *   /var/tmp/portage/valgrind-2.0.0/temp/valgrind-nptl.patch-16166.out


!!! ERROR: dev-util/valgrind-2.0.0 failed.
!!! Function epatch, Line 322, Exitcode 0
!!! Failed Patch: valgrind-nptl.patch!

Attached is the result file: 
Comment 9 solar (RETIRED) gentoo-dev 2004-07-15 15:12:00 UTC
From looking at the failed error report of patching I assume that patch is to cvs and 2.0.0 is just to far off with offsets for it to patch correctly. 
So... maybe fixed in 2.0.1 whenever that will be released.
Comment 10 Andrew Ross (RETIRED) gentoo-dev 2004-07-15 16:00:53 UTC
In that case, should the current ebuild at least be modified to abort (eg. with error) when users have nptl in their USE? Otherwise, users may start reporting duplicates of this bug.
Comment 11 solar (RETIRED) gentoo-dev 2004-07-24 05:44:13 UTC
Andrew, 
It probably should, but unfortunately the package lacks a proper enthusiastic maintainer and I'd just assume wait for the next release before I have to go poking around in the internals of the ebuild for one last revision.
Comment 12 SpanKY gentoo-dev 2004-07-24 22:36:11 UTC
fixed long ago; upgrade your valgrind

*** This bug has been marked as a duplicate of 32966 ***
Comment 13 Andrew Ross (RETIRED) gentoo-dev 2004-07-25 00:20:13 UTC
Thanks for pointing out the dupe, vapier. I erroneously assumed that searching open bugs would be sufficient, since any resolved bug would obviously result in a working ebuild (or appropriate warning, as suggested by myself in this bug).

However, I am puzzled by your curt dismissal of this issue. Your comment of "update your valgrind" is suggesting that users update not only to an unstable ebuild, but an unstable upstream release. According to http://valgrind.kde.org/downloads.html, the current stable version of valgrind is 2.0.0
Comment 14 solar (RETIRED) gentoo-dev 2004-07-25 01:13:28 UTC
clearly what upstream calls stable and reality of the matter differ as this bug here proves.