Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 544596 - x11-libs/libdrm-2.4.60[valgrind] multilib build fails due to valgrind not being multilib
Summary: x11-libs/libdrm-2.4.60[valgrind] multilib build fails due to valgrind not bei...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-26 20:07 UTC by David Watzke
Modified: 2017-01-18 02:56 UTC (History)
4 users (show)

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


Attachments
patch that fixed build with USE=valgrind (libdrm-2.4.60-valgrind.patch,324 bytes, patch)
2015-03-26 20:07 UTC, David Watzke
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Watzke 2015-03-26 20:07:55 UTC
Created attachment 399832 [details, diff]
patch that fixed build with USE=valgrind

hi, the build of x11-libs/libdrm-2.4.60 fails if USE=valgrind is enabled

the problem is this:

#ifdef HAVE_VALGRIND
#include <valgrind.h>
#include <memcheck.h>

in xf86drmMode.c

if you change it to

#ifdef HAVE_VALGRIND
#include <valgrind/valgrind.h>
#include <valgrind/memcheck.h>

then it compiles fine

please apply the attached patch (-p0 in $S)
Comment 1 Andrei Slavoiu 2015-03-26 20:23:17 UTC
The actual problem is that the valgrind ebuild is not multilib so there is no pkgconfig file for 32bit. So configure fails to detect valgrind. However, the code actually ends up including the valgrind files because the sed in the ebuild changes have_valgrind=no to yes.
Comment 2 Peter Asplund 2015-03-31 21:51:02 UTC
Is valgrind really a requirement to use libdrm?
Comment 3 Matt Turner gentoo-dev 2015-03-31 21:54:18 UTC
(In reply to Peter Asplund from comment #2)
> Is valgrind really a requirement to use libdrm?

No.
Comment 4 SpanKY gentoo-dev 2015-04-01 02:49:02 UTC
(In reply to Peter Asplund from comment #2)

that's why it's behind USE=valgrind
Comment 5 Peter Asplund 2015-04-11 10:34:45 UTC
I assumed so, but I was just thinking about:

"However, the code actually ends up including the valgrind files because the sed in the ebuild changes have_valgrind=no to yes."

Will this get fixed by making valgrind multilib, or can we just use the patch above as a work around?
Comment 6 Matt Turner gentoo-dev 2015-07-02 00:35:06 UTC
I patched libdrm upstream to add a configurable flag.

In the 2.4.62 ebuild I've used

        --enable-valgrind=$(usex valgrind auto no)

to allow valgrind to be enabled for the primary ABI and silently disable on other ABIs.

Valgrind only installs its pc file to the pkgconfig directory for the primary ABI, which causes the issue.
Comment 7 Peter Asplund 2016-09-23 18:36:15 UTC
Is this fixed then?
Comment 8 Matt Turner gentoo-dev 2017-01-18 02:56:23 UTC
(In reply to Peter Asplund from comment #7)
> Is this fixed then?

Yes, but you don't get valgrind support in the 32-bit build. That's not a big deal, because valgrind doesn't support lots of new instructions in 32-bit so it's not very useful anyway.