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)
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.
Is valgrind really a requirement to use libdrm?
(In reply to Peter Asplund from comment #2) > Is valgrind really a requirement to use libdrm? No.
(In reply to Peter Asplund from comment #2) that's why it's behind USE=valgrind
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?
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.
Is this fixed then?
(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.