Bug 68544

Summary: cannot build mesa 9.2 without llvm
Product: Mesa Reporter: Xavier Miller <xavier.miller>
Component: Drivers/Gallium/i915gAssignee: Matt Turner <mattst88>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: dri-devel, email
Version: 9.2   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Fix order of "and"/"or" for AM_CONDITIONAL

Description Xavier Miller 2013-08-25 20:10:39 UTC
See https://bugs.gentoo.org/show_bug.cgi?id=482134

Using Gentoo on a x86/i915 configuration, LLVM is disabled.

emerge -pv1 mesa

These are the packages that would be merged, in order:

Calculating dependencies                  ... done!                    
[ebuild     U  ] media-libs/mesa-9.2.0_rc1 [9.1.6] USE="classic egl gallium nptl -bindist -debug -gbm -gles1 -gles2 -llvm -opencl% -openvg -osmesa -pax_kernel -pic -r600-llvm-compiler (-selinux) -vdpau -wayland -xa -xorg -xvmc (-shared-glapi%*)" PYTHON_SINGLE_TARGET="python2_7 -python2_6" PYTHON_TARGETS="python2_7 -python2_6" VIDEO_CARDS="intel (-freedreno) -i915 -i965 -ilo% -nouveau -r100 -r200 -r300 -r600 -radeon -radeonsi -vmware" 0 kB

In file included from ../../../../src/gallium/auxiliary/gallivm/lp_bld_type.h:42:0,
                 from lp_bld_blend.c:31:
../../../../src/gallium/auxiliary/gallivm/lp_bld.h:49:27: fatal error: llvm-c/Core.h: No such file or directory
compilation terminated.
gmake[3]: *** [lp_bld_blend.lo] Erreur 1
gmake[3]: *** Attente des tâches non terminées....
In file included from ../../../../src/gallium/auxiliary/gallivm/lp_bld_type.h:42:0,
                 from lp_bld_blend_aos.c:50:
../../../../src/gallium/auxiliary/gallivm/lp_bld.h:49:27: fatal error: llvm-c/Core.h: No such file or directory
compilation terminated.
gmake[3]: *** [lp_bld_blend_aos.lo] Erreur 1
In file included from ../../../../src/gallium/auxiliary/gallivm/lp_bld_type.h:42:0,
                 from lp_bld_alpha.c:37:
../../../../src/gallium/auxiliary/gallivm/lp_bld.h:49:27: fatal error: llvm-c/Core.h: No such file or directory
compilation terminated.
Comment 1 Kris 2013-08-25 21:18:29 UTC
Created attachment 84625 [details] [review]
Fix order of "and"/"or" for AM_CONDITIONAL

Seems to be problem within configure.ac,
occuring since:

http://cgit.freedesktop.org/mesa/mesa/commit/configure.ac?id=0d3b1b0e

Added possible patch, needs testing.
Comment 2 Emil Velikov 2013-08-26 00:15:20 UTC
Seems like test always priorities the _and_ over _or_ :)

Kris' patch does the right thing, although it can be simplified to either:

test "x$HAVE_GALLIUM_I915" = xyes -o "x$HAVE_GALLIUM_SOFTPIPE" = xyes && test "x$MESA_LLVM" = x1

or

test "x$HAVE_GALLIUM_I915" = xyes -a "x$MESA_LLVM" = x1 -o
"x$HAVE_GALLIUM_SOFTPIPE" = xyes -a "x$MESA_LLVM" = x1

Feel free to test either one(all three :P) and send the git patch to the ML mesa-dev@lists.freedesktop.org

Thanks for spotting this :)
Comment 3 Xavier Miller 2013-08-26 16:20:50 UTC
The proposed patch worked for me (Gentoo Linux, mesa-9.2.0_rc2)
Comment 4 Chí-Thanh Christopher Nguyễn 2013-08-26 21:47:43 UTC
Patch sent: http://lists.freedesktop.org/archives/mesa-dev/2013-August/043891.html
Comment 5 Kris 2013-08-26 21:56:39 UTC
Cleaner patch already in mailing list:

http://lists.freedesktop.org/archives/mesa-dev/2013-August/043882.html
Comment 6 Chí-Thanh Christopher Nguyễn 2013-08-26 22:20:57 UTC
Ah sorry, I missed that somehow.
Comment 7 Matt Turner 2013-08-27 05:13:43 UTC
Committed, thanks! Should get picked to the 9.2 branch before release.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.