Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 490092

Summary: =media-libs/mesa-9.2.[1,2] - Missing dependency on dev-libs/elfutils or dev-libs/libelf - configure: error: radeonsi and r600g require libelf when using LLVM
Product: Gentoo Linux Reporter: Michael Mair-Keimberger (iamnr3) <m.mairkeimberger>
Component: [OLD] LibraryAssignee: Gentoo X packagers <x11>
Status: RESOLVED FIXED    
Severity: normal CC: alexander, alex_y_xu, nikoli
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 500368    
Attachments: build.log
environment
mesa-10.0.1.patch

Description Michael Mair-Keimberger (iamnr3) 2013-11-02 09:22:12 UTC
Created attachment 362418 [details]
build.log

checking for RADEON... yes
checking for LIBUDEV... yes
checking for elf_memory in -lelf... no
configure: error: radeonsi and r600g require libelf when using LLVM

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/media-libs/mesa-9.2.1/work/Mesa-9.2.1-x86/config.log
 * ERROR: media-libs/mesa-9.2.1::gentoo failed (configure phase):
 *   econf failed
 * 
 * Call stack:
 *          ebuild.sh, line   93:  Called src_configure
 *        environment, line 4806:  Called multilib-minimal_src_configure
 *        environment, line 3519:  Called multilib_foreach_abi 'multilib-minimal_abi_src_configure'
 *        environment, line 3700:  Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure'
 *        environment, line 3364:  Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure'
 *        environment, line 3362:  Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_configure'
 *        environment, line  732:  Called multilib-minimal_abi_src_configure
 *        environment, line 3513:  Called multilib_src_configure
 *        environment, line 3891:  Called econf '--enable-dri' '--enable-glx' '--enable-shared-glapi' '--enable-texture-float' '--disable-debug' '--enable-egl' '--enable-gbm' '--disable-gles1' '--enable-gles2' '--enable-glx-tls' '--disable-osmesa' '--enable-asm' '--enable-xa' '--disable-xorg' '--with-dri-drivers=,swrast,radeon,r200' '--with-gallium-drivers=,swrast,r600' '--with-llvm-shared-libs' 'PYTHON2=/usr/bin/python2.7' '--with-egl-platforms=x11,drm' '--enable-gallium-egl' '--enable-gallium-llvm' '--enable-openvg' '--enable-r600-llvm-compiler' '--enable-vdpau' '--enable-xvmc' '--enable-opencl' '--with-opencl-libdir=/usr/lib32/OpenCL/vendors/mesa' '--with-clang-libdir=/usr/lib' '--disable-xorg' 'LLVM_CONFIG=/usr/bin/llvm-config.x86'
 *   phase-helpers.sh, line  577:  Called die
 * The specific snippet of code:
 *                      die "econf failed"
 * 
 * If you need support, post the output of `emerge --info '=media-libs/mesa-9.2.1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-libs/mesa-9.2.1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/media-libs/mesa-9.2.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-libs/mesa-9.2.1/temp/environment'.
 * Working directory: '/var/tmp/portage/media-libs/mesa-9.2.1/work/Mesa-9.2.1-x86'
 * S: '/var/tmp/portage/media-libs/mesa-9.2.1/work/Mesa-9.2.1'

I've discover this problem when building multilib mesa. Actually it says it require's libelf. However building elfutils with ABI_X86="32 62" too solved the problem for me.
Something like 
|| ( dev-libs/elfutils[${MULTILIB_USEDEP}] dev-libs/libelf[${MULTILIB_USEDEP}] )
should fix the issue. 
Note: The error message says it's only needed on ati (with llvm) hw?
I've tried both mesa-9.2.1 and mesa-9.2.2 from the x11 overlay. Both failed.



Portage 2.2.7 (default/linux/amd64/13.0, gcc-4.8.1, glibc-2.17, 3.12.0-rc6 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.12.0-rc6-x86_64-AMD_FX-tm-8350_Eight-Core_Processor-with-gentoo-2.2
KiB Mem:    16356272 total,   9230684 free
KiB Swap:    8388600 total,   8388600 free
Timestamp of tree: Sat, 26 Oct 2013 08:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5-r3, 3.2.5-r3, 3.3.2-r2
dev-util/cmake:           2.8.12
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.3
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4, 1.14
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.8.1-r1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.11 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=bdver1 -mno-movbe -mno-fma -mno-bmi -mno-tbm -mpopcnt --param l1-cache-size=16 --param l1-cache-line-size=64 --param l2-cache-size=2048 -mtune=bdver1"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=bdver1 -mno-movbe -mno-fma -mno-bmi -mno-tbm -mpopcnt --param l1-cache-size=16 --param l1-cache-line-size=64 --param l2-cache-size=2048 -mtune=bdver1"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://192.168.2.60/gentoo-portage"
USE="acl alsa amd64 avx berkdb bzip2 cli cracklib crypt cups cxx dbus dri exif flac gdbm graphite iconv icu ipv6 jpeg kde lzma mmx mmxext modules mp3 mudflap multilib ncurses nls nptl opengl openmp pam pcre png qt4 readline sdl semantic-desktop session sse sse2 sse3 sse4_1 ssl ssse3 svg tcpd threads tiff truetype unicode vdpau xinerama xv zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack 
vhost_alias" CALLIGRA_FEATURES="krita sheets words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="r600 radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON



[ebuild     UD] media-libs/mesa-9.2.1 [9.2.2] USE="classic egl gallium gbm gles2 llvm nptl opencl openvg r600-llvm-compiler vdpau xa xvmc -bindist -debug -gles1 -osmesa -pax_kernel -pic (-selinux) -wayland -xorg" ABI_X86="32* (64) (-x32)" VIDEO_CARDS="r600 radeon (-freedreno) -i915 -i965 -ilo -intel -nouveau -r100 -r200 -r300 -radeonsi -vmware"
Comment 1 Michael Mair-Keimberger (iamnr3) 2013-11-02 09:23:37 UTC
Created attachment 362420 [details]
environment
Comment 2 Michael Mair-Keimberger (iamnr3) 2013-12-21 15:47:27 UTC
Created attachment 365828 [details, diff]
mesa-10.0.1.patch

I've made a patch for latest mesa (10.0.1) to include the dependency with is needed for r600/radeonsi + llvm. Please have a look at it, would we great if we could fix this (simple?) bug. :)
Comment 3 Alex Xu (Hello71) 2014-02-08 19:41:04 UTC
Also applies to 10.0.2-r1.
Comment 4 Chí-Thanh Christopher Nguyễn gentoo-dev 2014-02-24 19:43:26 UTC
Fixed in 9.2.5-r1 and 10.0.3