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.
Created attachment 687774 [details] emerge --info output
Created attachment 687777 [details] Build log
Created attachment 687780 [details] Meson log
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)
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.
(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)
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 ) ) "
Created attachment 712776 [details, diff] fix.patch Here is the above in patch form.
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.
*** Bug 802357 has been marked as a duplicate of this bug. ***
Still happens with 21.1.6.
(In reply to Rolf Eike Beer from comment #11) > Still happens with 21.1.6. For me too.
*** Bug 814158 has been marked as a duplicate of this bug. ***
IUSE=egl is gone. EGL is now always enabled.