Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 771759 - media-libs/mesa-21.0.0_rc3 configuring source fails with error "EGL requires dri"
Summary: media-libs/mesa-21.0.0_rc3 configuring source fails with error "EGL requires ...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords: PATCH
: 802357 814158 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-02-20 19:22 UTC by Stephen Mollett
Modified: 2021-12-07 21:46 UTC (History)
9 users (show)

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


Attachments
emerge --info output (emerge-info.txt,6.87 KB, text/plain)
2021-02-20 19:23 UTC, Stephen Mollett
Details
Build log (build.log,5.83 KB, text/x-log)
2021-02-20 19:24 UTC, Stephen Mollett
Details
Meson log (meson-log.txt,14.04 KB, text/plain)
2021-02-20 19:24 UTC, Stephen Mollett
Details
fix.patch (0001-media-libs-mesa-enforce-USE-requirements-for-EGL.patch,2.49 KB, patch)
2021-05-31 14:12 UTC, David Michael
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Mollett 2021-02-20 19:22:26 UTC
When attempting to build media-libs/mesa 21.0.0_rc3, the build fails within seconds of starting the configuring source phase with the message:

"
../mesa-21.0.0-rc3/meson.build:436:4: ERROR: Problem encountered: EGL requires dri

A full log can be found at /var/tmp/portage/media-libs/mesa-21.0.0_rc3/work/mesa-21.0.0-rc3-abi_x86_32.x86/meson-logs/meson-log.txt
"

USE flags for mesa as follows:

[ebuild     U  ] media-libs/mesa-21.0.0_rc3::gentoo [20.3.2::gentoo] USE="X classic dri3 egl gbm gles2 zstd -d3d9 -debug -gallium -gles1 -llvm -lm-sensors -opencl -osmesa (-selinux) -test -unwind -vaapi -valgrind -vdpau -vulkan -vulkan-overlay -wayland -xa -xvmc -zink" ABI_X86="32 (64) (-x32)" VIDEO_CARDS="(-freedreno) -i915 -i965 -intel -iris (-lima) -nouveau (-panfrost) -r100 -r200 -r300 -r600 -radeon -radeonsi (-v3d) (-vc4) -virgl (-vivante) -vmware" 0 KiB

DRI (at least DRI3) appears to be enabled.

Hunting around online finds a similar problem some years back which was related to the switch to the meson build system but I don't know if this is at all relevant here. I'll attach meson-log.txt in addition to build.log and `emerge --info`.

Reproducible: Always

Steps to Reproduce:
1. emerge -1 media-libs/mesa
Actual Results:  
Emerge will run for a few seconds then stop with the error.

Expected Results:  
Emerge should proceed to completion.

I'm using nVidia binary drivers (390.141) so mesa's configuration is somewhat minimal.
Comment 1 Stephen Mollett 2021-02-20 19:23:04 UTC
Created attachment 687774 [details]
emerge --info output
Comment 2 Stephen Mollett 2021-02-20 19:24:19 UTC
Created attachment 687777 [details]
Build log
Comment 3 Stephen Mollett 2021-02-20 19:24:46 UTC
Created attachment 687780 [details]
Meson log
Comment 4 Ionen Wolkens gentoo-dev 2021-02-20 19:40:06 UTC
Lot of mesa's flags don't make much sense with nvidia, e.g. mesa's egl wouldn't even be usable with VIDEO_CARDS=nvidia, but libglvnd+nvidia-drivers' egl works (which often makes little sense when packages depend on mesa[egl] directly).

Those USE choices would build with say, VIDEO_CARDS=nouveau

As a workaround, and if want minimal'ish flags that still build with VIDEO_CARDS=nvidia while satisfying egl deps, try USE="X gallium gbm egl" (classic disabled)
Comment 5 Stephen Mollett 2021-02-21 11:41:40 UTC
Changing the USE flags for mesa to just USE="X gallium gbm egl" as suggested by Ionen (thanks!) allows it to compile.

I agree that setting USE flags for mesa when using nvidia-drivers is a bit confusing, knowing that most if not all of them are effectively irrelevant to what is actually used on the system, which is provided by the nVidia binaries. I'd deliberately turned off gallium as it seemed like quite a lot of complex stuff to build for no real purpose.

Maybe it would be worth looking at either some USE dependencies (either static or in the form of "passthrough" USE flags) for x11-drivers/nvidia-drivers or even just suggestions/pointers in its messages, although these might not be seen if the merge doesn't get far enough.
Comment 6 Ionen Wolkens gentoo-dev 2021-02-23 02:18:11 UTC
(In reply to Stephen Mollett from comment #5)
> I agree that setting USE flags for mesa when using nvidia-drivers is a bit
> confusing, knowing that most if not all of them are effectively irrelevant
> to what is actually used on the system, which is provided by the nVidia
> binaries.
gbm is sometime useful given some binary-only games link with it and won't start if not found, and also need 1 header from mesa to build xorg-server (dri-interface.h), but that's it now that have libglvnd, e.g. can build+use mesa-progs[egl,gles2] without even having mesa installed.

In the future USE=zink will be usable with nvidia-drivers though, so that's something (might be useful to do OpenGL->Vulkan on wayland)
Comment 7 David Michael 2021-05-28 04:58:20 UTC
I hit this build failure after the stabilization, and judging by https://gitlab.freedesktop.org/mesa/mesa/-/blob/mesa-21.0.3/meson.build the following could be added to REQUIRED_USE to address it.

REQUIRED_USE="
	egl? (
		|| (
			classic? (
				|| (
					video_cards_i915
					video_cards_i965
					video_cards_intel
					video_cards_nouveau
					video_cards_r100
					video_cards_r200
					video_cards_radeon
				)
			)
			gallium
		)
	)
"
Comment 8 David Michael 2021-05-31 14:12:34 UTC
Created attachment 712776 [details, diff]
fix.patch

Here is the above in patch form.
Comment 9 Leho Kraav (:macmaN @lkraav) 2021-06-05 12:25:13 UTC
Possibly related https://bugs.gentoo.org/760546

I ran into this when www-client/google-chrome started requiring mesa[gbm] suddenly, but on virtual machines there is no 3D available, so was looking to minimize mesa build.

USE="X dri3 egl gallium gbm zstd" seems to allow building mesa-21.
Comment 10 Preston Crow 2021-07-18 01:34:16 UTC
*** Bug 802357 has been marked as a duplicate of this bug. ***
Comment 11 Rolf Eike Beer archtester 2021-08-12 07:21:12 UTC
Still happens with 21.1.6.
Comment 12 Dmitry Grigoriev 2021-08-14 11:58:51 UTC
(In reply to Rolf Eike Beer from comment #11)
> Still happens with 21.1.6.

For me too.
Comment 13 Ionen Wolkens gentoo-dev 2021-09-21 07:27:16 UTC
*** Bug 814158 has been marked as a duplicate of this bug. ***
Comment 14 Matt Turner gentoo-dev 2021-12-05 22:41:45 UTC
IUSE=egl is gone. EGL is now always enabled.