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

Bug 372927

Summary: [overlay] mesa-9999 egl USE flag needs shared-glapi configure option set
Product: Gentoo Linux Reporter: Angelo Arrifano (RETIRED) <miknix>
Component: Current packagesAssignee: Gentoo X packagers <x11>
Severity: normal CC: crazymykl, darkbasic, firedt, jan.bednar, jeremy.william.murphy, kingyes1, Marc-Antoine, raimue, realnc, robink
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Attachments: build.log

Description Angelo Arrifano (RETIRED) gentoo-dev 2011-06-24 23:43:56 UTC
Created attachment 278057 [details]

I'm not really into the mesa development but it seems a new "shared-glapi" configure flag was introduced in the repository. USE="egl" now depends on this flag, without much more background on it, I propose this patch:

--- /usr/local/portage/layman/x11/media-libs/mesa/mesa-9999.ebuild	2011-06-17 14:29:42.123732122 +0200
+++ mesa-9999.ebuild	2011-06-25 01:33:17.180951510 +0200
@@ -45,7 +45,8 @@
-	bindist +classic d3d debug +egl +gallium gles +llvm motif +nptl openvg pic selinux shared-dricore wayland kernel_FreeBSD"
+	bindist +classic d3d debug +egl +gallium gles +llvm motif +nptl openvg pic
+	selinux shared-dricore shared-glapi wayland kernel_FreeBSD"
 # not a runtime dependency of this package, but dependency of packages which
@@ -211,7 +212,10 @@
 		$(use_enable openvg)
 		$(use_enable gallium)
-	use egl && myconf+="--with-egl-platforms=$(use wayland && echo "wayland,")drm,x11"
+	if use egl; then
+		use shared-glapi || die "egl needs shared-glapi. Please either enable shared-glapi or disable the egl use flag ."
+		myconf+="--with-egl-platforms=$(use wayland && echo "wayland,")drm,x11"
+	fi
 	if use !gallium && use !classic; then
 		ewarn "You enabled neither classic nor gallium USE flags. No hardware"
@@ -272,6 +276,7 @@
 		$(use_enable nptl glx-tls) \
 		$(use_enable !pic asm) \
 		$(use_enable shared-dricore) \
+		$(use_enable shared-glapi) \
 		--with-dri-drivers=${DRI_DRIVERS} \
Comment 1 Jeremy Murphy 2011-06-26 11:34:25 UTC
Yeah, I just hit this bug, but even with enabling shared-glapi, it is still not building for me.  I will keep mucking around with it, but any other ideas?
Comment 2 Angelo Arrifano (RETIRED) gentoo-dev 2011-06-26 12:19:25 UTC
I builds fine here, the git HEAD is at 42e7a13e7bc9def0bcdede2d3a34dad1718e105c

This live ebuild needs some serious rework cause the --enable-gallium-nouveau et al. flags disappeared: is not built anymore. The ebuild needs to set --with-dri-drivers=nouveau,...
Comment 3 Angelo Arrifano (RETIRED) gentoo-dev 2011-06-26 12:21:31 UTC
Correction: --with-dri-drivers has been there all along, I meant --with-gallium-drivers. Sorry for the spam.
Comment 4 Angelo Arrifano (RETIRED) gentoo-dev 2011-06-26 13:02:46 UTC
Created attachment 278233 [details]

Fixes the ebuild to use the new --with-gallium-drivers logic. I only tested with nouveau..
Comment 5 Angelo Arrifano (RETIRED) gentoo-dev 2011-06-26 14:08:53 UTC
Created attachment 278239 [details]

Prevent being renamed to, the xserver expects it to be named it seems.
Comment 6 Angelo Arrifano (RETIRED) gentoo-dev 2011-06-26 14:09:52 UTC
Created attachment 278241 [details]

Add nouveau gallium and classic implementations to eselect-mesa
Comment 7 Chí-Thanh Christopher Nguyễn gentoo-dev 2011-06-26 14:29:19 UTC
Adding nouveau to eselect-mesa does not make any sense, as there is no chipset which is supported by both the classic and the gallium driver.
Comment 8 Angelo Arrifano (RETIRED) gentoo-dev 2011-06-26 14:34:17 UTC
(In reply to comment #7)
> Adding nouveau to eselect-mesa does not make any sense, as there is no chipset
> which is supported by both the classic and the gallium driver.

You are right :D That's what happens when you do stuff without a clue.
Anyway, I'll step out and leave the changes for you to review...
Comment 9 Yakir 2011-06-27 07:03:20 UTC
Hey all.
Anyone know when its work on the overlay? I just can't see movies now for this error (Don't know why), So i'm really need this patch.

Thanks for your support.
Comment 10 nm (RETIRED) gentoo-dev 2011-06-27 08:12:58 UTC
*** Bug 372875 has been marked as a duplicate of this bug. ***
Comment 11 Chris Bandy 2011-06-29 05:07:01 UTC
(In reply to comment #5)
> Created attachment 278239 [details]
> mesa-9999.ebuild

Almost. The gallium_enable lines for intel and radeon should depend on specific chips (i915, i965, r300, r600) and fallback to the vendor (intel, radeon) only when no chips are set.

With these small tweaks, this ebuild with USE="shared-glapi" gave me a working
Comment 12 Chí-Thanh Christopher Nguyễn gentoo-dev 2011-06-30 23:50:31 UTC
Thanks for the ebuild, I pushed a fix based on it into the x11 overlay.