Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 417363 - media-libs/mesa-8.0.2 does not compile against llvm-3.1
Summary: media-libs/mesa-8.0.2 does not compile against llvm-3.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-24 11:54 UTC by Marien Zwart (RETIRED)
Modified: 2012-06-02 12:13 UTC (History)
6 users (show)

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


Attachments
Consolidated patches from upstream (llvm31-fixes.patch,1.81 KB, patch)
2012-05-26 02:18 UTC, Brandon Penglase
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marien Zwart (RETIRED) gentoo-dev 2012-05-24 11:54:50 UTC
mesa-8.0.2 with VIDEO_CARDS="r600 radeon" fails to build if llvm is the recently released 3.1 (instead of 3.0):

gallivm/lp_bld_misc.cpp: In function ‘void lp_register_oprofile_jit_event_listener(LLVMOpaqueExecutionEngine*)’:
gallivm/lp_bld_misc.cpp:65:47: error: ‘createOProfileJITEventListener’ is not a member of ‘llvm’

The upstream commit that fixed this is http://cgit.freedesktop.org/mesa/mesa/commit/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp?id=fe34006908f1ff99ada34d52c06fd80197e452ec

Unfortunately the build then fails further on:

gallivm/lp_bld_debug.cpp: In function ‘void lp_disassemble(const void*)’:
gallivm/lp_bld_debug.cpp:240:66: error: no matching function for call to ‘llvm::Target::createMCInstPrinter(unsigned int&, const llvm::MCAsmInfo&, const llvm::MCSubtargetInfo&) const’
/usr/include/llvm/Support/TargetRegistry.h:395:20: note: candidate is: llvm::MCInstPrinter* llvm::Target::createMCInstPrinter(unsigned int, const llvm::MCAsmInfo&, const llvm::MCInstrInfo&, const llvm::MCRegisterInfo&, const llvm::MCSubtargetInfo&) const

There have been several upstream commits to this file mentioning llvm-3.1 compatibility, and I've not yet attempted to figure out which are needed.
Comment 1 Marien Zwart (RETIRED) gentoo-dev 2012-05-24 12:23:35 UTC
That was easier than I thought. Applying upstream commits 1633dcd890d97bd5e4d125d57f2f529f04d14477, 4f513002f65c629576252b34efedf3c8c4531dfd and 563489e5c922481a9a506fc5405a3dacacd6082e too got me a working (at least gnome-shell and glxgears ran) mesa.
Comment 2 Brandon Penglase 2012-05-26 02:18:56 UTC
Created attachment 313071 [details, diff]
Consolidated patches from upstream

I ran into this while rebuild world. I went through the upstream commits you provided and came up with the attached consolidated patch. Compiles cleanly here, but haven't had a chance to fire anything up yet.
Comment 3 Yu Yuwei 2012-05-26 14:43:39 UTC
(In reply to comment #2)
> Created attachment 313071 [details, diff] [details, diff]
> Consolidated patches from upstream
> 
> I ran into this while rebuild world. I went through the upstream commits you
> provided and came up with the attached consolidated patch. Compiles cleanly
> here, but haven't had a chance to fire anything up yet.

patch works, thank you!
Comment 4 Philipp Richter 2012-05-27 15:52:01 UTC
(In reply to comment #2)
> Created attachment 313071 [details, diff] [details, diff]
> Consolidated patches from upstream
> 
> I ran into this while rebuild world. I went through the upstream commits you
> provided and came up with the attached consolidated patch. Compiles cleanly
> here, but haven't had a chance to fire anything up yet.

Thanks works for me too!
Comment 5 James 2012-05-27 18:50:01 UTC
I don't have the VIDEO_CARDS="r600 radeon", (I use the binary NVIDIA drivers) but I ran into this problem.  The combined patch that is listed above worked for me.
James
Comment 6 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-05-28 09:32:06 UTC
Fixed in 8.0.3.
Comment 7 Mike T. 2012-05-28 11:37:17 UTC
8.0.3 Does not seem to resolve the issue.  I just tried to emerge on an amd64 platform and got the same break.

emerge --info '=media-libs/mesa-8.0.3'
Portage 2.1.10.63 (default/linux/amd64/10.0/server, gcc-4.6.3, glibc-2.15-r2, 3.2.12-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.2.12-gentoo-x86_64-AMD_FX-tm-8120_Eight-Core_Processor-with-gentoo-2.1
Timestamp of tree: Mon, 28 May 2012 10:30:01 +0000
ccache version 3.1.7 [enabled]
app-shells/bash:          4.2_p28
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.2.3-r1
dev-util/ccache:          3.1.7
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.69
sys-devel/automake:       1.11.5
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2, 4.6.3
sys-devel/gcc-config:     1.7.1
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.4 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo
ACCEPT_KEYWORDS="amd64 ~x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -fomit-frame-pointer -march=amdfam10 -mtune=amdfam10 -mcx16 -msahf -maes -mpclmul -mpopcnt -mabm -mlwp -mavx"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -fomit-frame-pointer -march=amdfam10 -mtune=amdfam10 -mcx16 -msahf -maes -mpclmul -mpopcnt -mabm -mlwp -mavx"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=6 --load-average=6.0 --with-bdeps y"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j6 -l6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --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://rsync.gentoo.org/gentoo-portage"
USE="3dnow X Xaw3d a52 aac acl acpi adns amd64 apache2 apm avahi bash-completion bcmath berkdb bidi bindist blas bluetooth bzip2 cairo calendar canna caps cdda cddb cdparanoia cdr cjk clamav cli cracklib crypt cscope css ctype cups cupscurl curlwrappers custom-cflags cvs cxx dbi dbm dbus dbx dts dv dvb dvd dvdr encode enscript fam ffmpeg fftw flac flatfile fontconfig foomaticdb fortran ftp gd gdbm geoip glut gmp gnome gnome-keyring gnuplot gps graphviz gsl gsm gstreamer gtk gtkhtml gzip hddtemp iconv icu idn imagemagick imap imlib inifile iodbc ios ipod ipv6 jabber java java6 javascript jbig jit jpeg jpeg2k kerberos lame lapack latex lcms ldap libsamplerate libwww lm_sensors lua lzma lzo mad matroska mbox memlimit mhash migemo mime mmap mms mmx mmxext mng modules mono motif mp3 mp4 mpeg mpi mplayer mtp mudflap multilib musepack musicbrainz mysql mysqli nas ncurses nls nocd odbc offensive ofx ogg openal openexr opengl openmp pam pcntl pcre pda pdf perl php plotutils png posix ppds pppd python qt4 quicktime radius raw rdesktop readline recode rss samba sasl scanner session sharedmem shorten slang slp smp sndfile snmp snmpsoap sockets socks5 sound sox speex spell sqlite sqlite3 sse sse2 sse3 sse4a ssl subversion svg syslog sysvipc szip taglib tcl tcpd theora threads tidy tiff tk tokenizer truetype udev unicode usb vcd vhosts videos vim-syntax vnc vorbis wavpack wddx webkit wmf wxwidgets x264 xattr xcb xcomposite xft xine xinerama xinetd xml xmlrpc xmp xmpp xorg xosd xpm xsl xv xvid zlib" 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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="kexi words flow plan sheets stage tables krita karbon braindump" 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" 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, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 8 Nikos Chantziaras 2012-05-28 12:25:41 UTC
Doesn't work for me either:

gallivm/lp_bld_debug.cpp: In function 'void lp_disassemble(const void*)':
gallivm/lp_bld_debug.cpp:240:66: error: no matching function for call to 'llvm::Target::createMCInstPrinter(unsigned int&, const llvm::MCAsmInfo&, const llvm::MCSubtargetInfo&) const'
Comment 9 Marien Zwart (RETIRED) gentoo-dev 2012-05-28 12:27:59 UTC
It looks like mesa-8.0.3 applies the patches from my comment #1, but misses the one in my original report (fe34006908f1ff99ada34d52c06fd80197e452ec). That one is still needed (I should've made that a little more clear in comment #1 than just relying on the word "too").
Comment 10 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-05-28 12:46:08 UTC
Patch added, thanks.
Comment 11 Mike T. 2012-05-28 14:30:28 UTC
That fixed it.  Thanks.
Comment 12 Wilke Schwiedop 2012-06-02 12:10:48 UTC
mesa-7.11.2 (stable) also does not compile against llvm-3.1
Is it possible to backport these patches or bump mesa?
Comment 13 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-06-02 12:13:05 UTC
We try to make sure that the latest stable versions work with each other, and the latest unstable versions work with each other.

If you mix stable mesa with unstable llvm, then you are mostly on your own.