Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 202542 - valgrind 3.3.0 breaks app-emulation/wine build
Summary: valgrind 3.3.0 breaks app-emulation/wine build
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Wine Maintainers
URL: http://bugs.winehq.org/show_bug.cgi?i...
Whiteboard:
Keywords:
: 202573 203030 215465 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-12-17 00:45 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2008-04-19 22:20 UTC (History)
19 users (show)

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


Attachments
patch to fix the problem (valgrind-3.3-fix.patch,1.77 KB, patch)
2007-12-17 15:06 UTC, Rafał Mużyło
Details | Diff
/tmp/emerge--info (emerge--info,10.06 KB, text/plain)
2007-12-20 19:59 UTC, DEMAINE Benoît-Pierre, aka DoubleHP
Details
wine-valgrind fix (wine-9999-valdgrind.diff,1.49 KB, patch)
2007-12-21 01:09 UTC, Bernd Buschinski
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2007-12-17 00:45:26 UTC
signal_i386.c: In function ‘setup_exception’:
signal_i386.c:940: warning: implicit declaration of function ‘VALGRIND_MAKE_WRITABLE’
signal_i386.o: In function `setup_exception':
/var/tmp/portage/app-emulation/wine-0.9.51/work/wine-0.9.51/dlls/ntdll/signal_i386.c:940: undefined reference to `VALGRIND_MAKE_WRITABLE'
collect2: ld returned 1 exit status
winegcc: x86_64-pc-linux-gnu-gcc failed
make[2]: *** [ntdll.dll.so] Error 2
make[1]: *** [ntdll] Error 2
make: *** [dlls] Error 2
 *
 * ERROR: app-emulation/wine-0.9.51 failed.
 * Call stack:
 *               ebuild.sh, line   46:  Called src_compile
 *             environment, line 2462:  Called die
 * The specific snippet of code:
 *       emake all || diefunc "$FUNCNAME" "$LINENO" "$?" "all"
 *  The die message:
 *   all
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/log/portage/app-emulation:wine-0.9.51:20071217-002653.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/wine-0.9.51/temp/environment'.
 *

Worked fine with valgrind 3.2 before.
Comment 1 Maurice van der Pot (RETIRED) gentoo-dev 2007-12-17 01:04:17 UTC
From valgrind's NEWS:

- The following Memcheck client requests have been removed:
    VALGRIND_MAKE_NOACCESS
    VALGRIND_MAKE_WRITABLE
    VALGRIND_MAKE_READABLE
    VALGRIND_CHECK_WRITABLE
    VALGRIND_CHECK_READABLE
    VALGRIND_CHECK_DEFINED
  They were deprecated in 3.2.0, when equivalent but better-named client
  requests were added.  See the 3.2.0 release notes for more details.

from 3.2.0 release notes:

- There are some changes to Memcheck's client requests.  Some of them
  have changed names:

    MAKE_NOACCESS  --> MAKE_MEM_NOACCESS
    MAKE_WRITABLE  --> MAKE_MEM_UNDEFINED
    MAKE_READABLE  --> MAKE_MEM_DEFINED

<snip>

  The reason for the change is that the old names are subtly
  misleading.  The old names will still work, but they are deprecated
  and may be removed in a future release.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-12-17 14:41:23 UTC
*** Bug 202573 has been marked as a duplicate of this bug. ***
Comment 3 Rafał Mużyło 2007-12-17 15:06:31 UTC
Created attachment 138738 [details, diff]
patch to fix the problem

It's an upstream bug, of course.
This patch makes it compile and runs fine.
Don't know if it's correct, though.
Comment 4 Daniel Santos 2007-12-18 18:13:47 UTC
It's also missing valgrind in it'd DEPEND, maybe we can fix that while we're addressing this?
Comment 5 SpanKY gentoo-dev 2007-12-18 20:09:47 UTC
uhh, what ?  wine should never hard depend on valgrind ... no way i'm adding that
Comment 6 Dennis Schridde 2007-12-18 23:38:17 UTC
If wine links against valgrind... Makes me feel as if this could give a problem when valgrind gets removed...
Comment 7 Diego Elio Pettenò (RETIRED) gentoo-dev 2007-12-19 00:42:50 UTC
It only uses a macro out of memcheck.h, it does *not* link against valgrind.
Although a non-automagic usage would be better in any case, so that at least wine could still build with valgrind installed without having to use its macros.
Comment 8 Daniel Santos 2007-12-19 10:33:02 UTC
Personally, I don't know the code.  But go take a looksie.  valgrind 3.3 removed a bunch of deprecated macros, it looks they are only used in ntdll.

egrep -R 'VALGRIND_MAKE_NOACCESS|VALGRIND_MAKE_WRITABLE|VALGRIND_MAKE_READABLE|VALGRIND_CHECK_WRITABLE|VALGRIND_CHECK_READABLE' .
Comment 9 Daniel Santos 2007-12-19 10:34:47 UTC
oh, that was redundant info, sorry...
Comment 10 Dennis Schridde 2007-12-19 11:28:05 UTC
Ah, sorry. I only read
---
signal_i386.o: In function `setup_exception':
signal_i386.c:(.text+0x11ae): undefined reference to `VALGRIND_MAKE_WRITABLE'
collect2: ld returned 1 exit status
winegcc: x86_64-pc-linux-gnu-gcc failed
---
And didn't see that this was caused by implicit declaration magic...
Comment 11 DEMAINE Benoît-Pierre, aka DoubleHP 2007-12-20 19:59:15 UTC
Created attachment 138994 [details]
/tmp/emerge--info

same

i686-pc-linux-gnu-gcc -c -I. -I. -I../../include -I../../include  -D__WINESRC__ -D_OLE32_ -DCOM_NO_WINDOWS_H -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith  -O2 -march=athlon-mp -pipe  -o ole2stubs.o ole2stubs.c
../../tools/winebuild/winebuild -D_REENTRANT -fPIC --as-cmd "i686-pc-linux-gnu-as" -o relay32.o --relay32
i686-pc-linux-gnu-gcc -c -I. -I. -I../../include -I../../include  -D__WINESRC__ -D_OLE32_ -DCOM_NO_WINDOWS_H -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith  -O2 -march=athlon-mp -pipe  -o ole2impl.o ole2impl.c
../../tools/wrc/wrc --nostdinc -I. -I. -I../../include -I../../include  -D__WINESRC__ -D_NTSYSTEM_  -foversion.res version.rc
../../tools/winegcc/winegcc -B../../tools/winebuild -shared ./ntdll.spec    actctx.o atom.o cdrom.o critsection.o debugbuffer.o debugtools.o directory.o env.o error.o exception.o file.o handletable.o heap.o large_int.o loader.o loadorder.o misc.o nt.o om.o path.o process.o reg.o relay.o resource.o rtl.o rtlbitmap.o rtlstr.o sec.o serial.o server.o signal_i386.o signal_powerpc.o signal_sparc.o signal_x86_64.o string.o sync.o tape.o thread.o threadpool.o time.o version.o virtual.o wcstring.o    relay32.o version.res -Wl,--image-base,0x7bc00000 -o ntdll.dll.so     ../../libs/port/libwine_port.a
signal_i386.o: In function `setup_exception':
signal_i386.c:(.text+0x119e): undefined reference to `VALGRIND_MAKE_WRITABLE'
collect2: ld returned 1 exit status
winegcc: i686-pc-linux-gnu-gcc failed
make[2]: *** [ntdll.dll.so] Error 2
make[2]: Leaving directory `/var/tmp/portage/app-emulation/wine-0.9.51/work/wine-0.9.51/dlls/ntdll'
make[1]: *** [ntdll] Error 2
make[1]: *** Waiting for unfinished jobs....
Comment 12 DEMAINE Benoît-Pierre, aka DoubleHP 2007-12-20 21:26:12 UTC
maybe valgrind is used when/if detected by ./configure ; Daniel: do not assume anything. Your your compile logs, emerge -V valgrind, and test yoursef about your doubts. Even if you were right, one day some one will meet the bug and report, or, you reproduce it yourself now and confirm.

Patch worked for me.
Comment 13 Diego Elio Pettenò (RETIRED) gentoo-dev 2007-12-20 21:30:38 UTC
Two hundreds confirmations are _not_ needed. The bug is known, patch was provided, now it's just a matter of time till it's fixed in tree. In the mean time, if your comment is just going to be a "me too", please _avoid_ it.
Comment 14 Bernd Buschinski 2007-12-21 01:09:52 UTC
Created attachment 139016 [details, diff]
wine-valgrind fix

I have no clue why you want to patch valgrind, these macros are obsolete and finally deleted.
And as there is no valgrind <3.2.0 in portage there is no problem to just update the macros in wine, even through I have no idea what they do.
Comment 15 DEMAINE Benoît-Pierre, aka DoubleHP 2007-12-21 02:03:16 UTC
(In reply to comment #14)
> Created an attachment (id=139016) [edit]
> wine-valgrind fix
> 
> I have no clue why you want to patch valgrind, these macros are obsolete and
> finally deleted.

Which patch in this page would be against valgrind ? my success story was using attachment 138738 [details, diff] proposed by Rafat against Wine. I have put this patch in the files directory of Wine ebuild. And I dont see any other patch proposed before your own comment. So, by "patching valgrind", what do you refer to ?

Diego, I thought _one_ confirmation would be nice. I understand that more than 3 confirmations could be ennoying.
Comment 16 Bernd Buschinski 2007-12-21 11:39:06 UTC
Oh looks like I missunderstood something, there is no patch against valgrind.
But provoding the old Macros is unnessary, because the is no there is no valdgrind older than 3.2.0 in portage
Comment 17 SpanKY gentoo-dev 2007-12-22 07:38:04 UTC
ive added Rafal's patch to cvs ... has anyone taken this upstream ?  i dont see any open reports in their bugzilla and git is still broken ...
Comment 18 Didier Link 2007-12-22 10:53:16 UTC
Merged and run successfully this morning on ~amd64, thanks for the good work !
Comment 19 Jakub Moc (RETIRED) gentoo-dev 2007-12-22 16:25:07 UTC
*** Bug 203030 has been marked as a duplicate of this bug. ***
Comment 20 Daniel Santos 2007-12-25 07:14:54 UTC
(In reply to comment #17)
> ive added Rafal's patch to cvs ... has anyone taken this upstream ?  i dont see
> any open reports in their bugzilla and git is still broken ...
> 
Yea, I reported it yesterday http://bugs.winehq.org/show_bug.cgi?id=10881.
Comment 21 SpanKY gentoo-dev 2007-12-27 21:23:18 UTC
thanks
Comment 22 SpanKY gentoo-dev 2008-04-19 22:20:55 UTC
*** Bug 215465 has been marked as a duplicate of this bug. ***