Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 669058 - >=media-libs/mesa-18.2.0[video_cards_r600 -llvm -opencl] multilib build failure requires virtual/libelf:0=[${MULTILIB_USEDEP}]
Summary: >=media-libs/mesa-18.2.0[video_cards_r600 -llvm -opencl] multilib build failu...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-20 08:49 UTC by Branko Grubic
Modified: 2018-10-31 19:10 UTC (History)
2 users (show)

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


Attachments
emerge_info (emerge_info_mesa.txt,6.03 KB, text/plain)
2018-10-20 08:49 UTC, Branko Grubic
Details
mesa_build_log_gzipped (mesa_build.log.gz,56.53 KB, application/octet-stream)
2018-10-20 08:50 UTC, Branko Grubic
Details
possible_fix (mesa_vdpau_multilib.diff,3.56 KB, patch)
2018-10-20 08:51 UTC, Branko Grubic
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Branko Grubic 2018-10-20 08:49:35 UTC
Created attachment 551930 [details]
emerge_info

Hi,

I possibly have a non-standard USE for media-libs/mesa, but since 18.2.x pre-release it fails to build for me, I finally took some time to take a look what it could be, and I'm far from someone who knows 100% what the issue is, and if my fix is right. In the end it seems on my multilib system it requires dev-libs/elfutils[abi_x86_32] as well. I created a patch which I think is right and I can provide a pull request over github if you think this is right. I'll attach build log, and emerge --info, as well as simple diff with an idea what I think solves the issue. 

Comments are welcome.
Comment 1 Branko Grubic 2018-10-20 08:50:59 UTC
Created attachment 551932 [details]
mesa_build_log_gzipped
Comment 2 Branko Grubic 2018-10-20 08:51:21 UTC
Created attachment 551934 [details, diff]
possible_fix
Comment 3 Branko Grubic 2018-10-20 08:58:32 UTC
I created a branch here at https://github.com/bitlord/gentoo/tree/media-libs/mesa

I can create a pull request if this makes sense.
Comment 4 Matt Turner gentoo-dev 2018-10-20 20:56:41 UTC
Looks like it's no vdpau that requires libelf, but the radeon drivers themselves. In meson.build we have:


if with_amd_vk or with_gallium_radeonsi or with_gallium_r600 or with_gallium_opencl
  dep_elf = dependency('libelf', required : false)
  if not dep_elf.found()
    dep_elf = cc.find_library('elf')
  endif
else
  dep_elf = null_dep
endif


But in configure.ac we have:

    if test "x$have_libelf" != xyes; then
       AC_MSG_ERROR([$2 requires libelf when using llvm])
    fi

and

    if test "x$have_libelf" != xyes; then
       AC_MSG_ERROR([Clover requires libelf])
    fi

So I think you've found a bug in the upstream Meson build system :)

Cc'ing the Meson build system maintainer. Dylan, the problem as I see it is that Meson currently requires libelf when radeonsi/r600 is built regardless of whether llvm is enabled.
Comment 5 Dylan 2018-10-22 14:22:43 UTC
Well, radeonsi and radv have a hard requirement on LLVM, so this really only applies to r600, but yeah, I think this is a bug in the meson logic. I'll send a patch.
Comment 6 Dylan 2018-10-22 14:42:54 UTC
I've sent a patch to the list, you can see it here. I've compile tested it, but I don't have an r600 card anymore, so if you could be so kind as to test that it actually works I'd appreciate that.

https://gitlab.freedesktop.org/dbaker/mesa/commits/fix-r600-libelf
Comment 7 Matt Turner gentoo-dev 2018-10-22 17:42:47 UTC
I reviewed the patch upstream. I'd expect it to be in 18.2.4.
Comment 8 Dylan 2018-10-22 18:41:55 UTC
The patch has landed in master, it should be queued for the next stable release.
Comment 9 Larry the Git Cow gentoo-dev 2018-10-31 19:10:40 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1c88664e29246fde1cf111357f33a810e75a0fe

commit d1c88664e29246fde1cf111357f33a810e75a0fe
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2018-10-31 19:08:36 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2018-10-31 19:09:54 +0000

    media-libs/mesa: Version bump to 18.2.4
    
    Closes: https://bugs.gentoo.org/669058
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 media-libs/mesa/Manifest           |   1 +
 media-libs/mesa/mesa-18.2.4.ebuild | 526 +++++++++++++++++++++++++++++++++++++
 2 files changed, 527 insertions(+)