Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 828491 - media-libs/mesa-21.3.1 - ../.../meson.build: ERROR: Problem encountered: EGL requires dri, haiku, or windows
Summary: media-libs/mesa-21.3.1 - ../.../meson.build: ERROR: Problem encountered: EGL ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-07 08:34 UTC by Toralf Förster
Modified: 2022-02-07 19:31 UTC (History)
1 user (show)

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


Attachments
emerge-info.txt (emerge-info.txt,14.28 KB, text/plain)
2021-12-07 08:34 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,18.03 KB, text/plain)
2021-12-07 08:34 UTC, Toralf Förster
Details
environment (environment,165.97 KB, text/plain)
2021-12-07 08:34 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,35.46 KB, application/x-bzip)
2021-12-07 08:34 UTC, Toralf Förster
Details
logs.tar.bz2 (logs.tar.bz2,229.58 KB, application/x-bzip)
2021-12-07 08:34 UTC, Toralf Förster
Details
media-libs:mesa-21.3.1:20211206-215132.log (media-libs:mesa-21.3.1:20211206-215132.log,4.56 KB, text/plain)
2021-12-07 08:34 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,32.88 KB, application/x-bzip)
2021-12-07 08:34 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2021-12-07 08:34:16 UTC
Host machine cpu: x86_64
../mesa-21.3.1/meson.build:389: WARNING: gbm option "true" deprecated, please use "enabled" instead.
../mesa-21.3.1/meson.build:449: WARNING: egl option "true" deprecated, please use "enabled" instead.

../mesa-21.3.1/meson.build:462:4: ERROR: Problem encountered: EGL requires dri, haiku, or windows

A full log can be found at /var/tmp/portage/media-libs/mesa-21.3.1/work/mesa-21.3.1-abi_x86_64.amd64/meson-logs/meson-log.txt
 * ERROR: media-libs/mesa-21.3.1::gentoo failed (configure phase):
 *   (no error message)

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_no_multilib-j4-20211206-200247

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-11.2.1 *
Python 3.9.9
Available Ruby profiles:
  (none found)
Available Rust versions:
  [1]   rust-bin-1.56.1 *
php cli:

  HEAD of ::gentoo
commit e16bfdc776cbbafebd96a70fbf93d585fe2c4107
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Mon Dec 6 18:51:45 2021 +0000

    2021-12-06 18:51:42 UTC

emerge -qpvO media-libs/mesa
[ebuild  N    ] media-libs/mesa-21.3.1  USE="X classic gles2 llvm zstd -d3d9 -debug -gallium -gles1 -lm-sensors -opencl -osmesa (-selinux) -test -unwind -vaapi (-valgrind) -vdpau -vulkan -vulkan-overlay -wayland -xa -xvmc -zink" CPU_FLAGS_X86="sse2" VIDEO_CARDS="-crocus (-freedreno) -i915 -i965 -intel -iris (-lima) -nouveau (-panfrost) -r100 -r200 -r300 -r600 -radeon -radeonsi (-v3d) (-vc4) -virgl (-vivante) -vmware"
Comment 1 Toralf Förster gentoo-dev 2021-12-07 08:34:17 UTC
Created attachment 757589 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2021-12-07 08:34:18 UTC
Created attachment 757590 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2021-12-07 08:34:21 UTC
Created attachment 757591 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2021-12-07 08:34:22 UTC
Created attachment 757592 [details]
etc.portage.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2021-12-07 08:34:23 UTC
Created attachment 757593 [details]
logs.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2021-12-07 08:34:24 UTC
Created attachment 757594 [details]
media-libs:mesa-21.3.1:20211206-215132.log
Comment 7 Toralf Förster gentoo-dev 2021-12-07 08:34:25 UTC
Created attachment 757595 [details]
temp.tar.bz2
Comment 8 Alexander 2022-01-19 15:42:51 UTC
> ERROR: Problem encountered: EGL requires dri

`dri` not enabled without one of «classic driver»

In mesa-21.2.6.ebuild in `multilib_src_configure()` function in first `classic` section the array `DRI_DRIVERS` is being filled if the appropriate driver is USED.
 
Checking in:
`meson.build:169 dri_drivers = get_option('dri-drivers')`
`meson.build:198 with_dri = dri_drivers.length() != 0`

Need one more check
In `pkg_pretent()` ebuild function like this:
```
	if use egl then
		if ! video_cards_intel &&
		  ! video_cards_i915 &&
		  ! video_cards_i965 &&
		  ! video_cards_nouveau &&
		  ! video_cards_radeon &&
		  ! video_cards_r100 &&
		  ! video_cards_r200; then
			eerror "EGL requires dri"
		fi
	fi
```
and\or
In `REQUIRED_USE` section like this:
```
egl? ( || ( video_cards_intel video_cards_i915 video_cards_i965 video_cards_nouveau video_cards_radeon video_cards_r100 video_cards_r200 ) )
```

I use discrete nvidia-based videocard with proprietary driver. And have onboard Intel video, that not used. Its help to me compile mesa-21.2.6 with USE="egl" by enabling `video_cards_intel` USE flag for them.

--
Best regards,
alex
Comment 9 Rolf Eike Beer archtester 2022-01-24 16:42:45 UTC
Same with 21.3.4.
Comment 10 ahudson.news 2022-01-25 17:37:56 UTC
Basically this commit is to blame:
https://gitweb.gentoo.org/repo/gentoo.git/commit/media-libs/mesa?id=4dd59fa7fb6e80db150d9d754cda4fd43e2a594d

@MattTurner: since this has come up multiple times and will inevitably end up in your hands again, and you'll likely close it as "won't fix" same as #771759, could you maybe provide some background to help understand why disabling egl is not sensible?

For your reference, in my case, mesa +X is only there as a build dependency for virtual/opengl for virtualbox (since about a year ago? according to comments in my local package.use, +X wasn't required before), and it all seemed to work fine with -egl. My server doesn't use any of the video cards mentioned two comments up (c8), so dri isn't enabled either. My previously working use flags:
media-libs/mesa-21.2.6::gentoo  USE="X classic test zstd -d3d9 -debug -egl -gallium -gbm -gles1 -gles2 -llvm -lm-sensors -opencl -osmesa (-selinux) -unwind -vaapi -valgrind -vdpau -vulkan -vulkan-overlay -wayland -xa -xvmc -zink" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="sse2" VIDEO_CARDS="-crocus (-freedreno) -i915 -i965 -intel -iris (-lima) -nouveau (-panfrost) -r100 -r200 -r300 -r600 -radeon -radeonsi (-v3d) (-vc4) -virgl (-vivante) -vmware"
Comment 11 Tom Gillespie 2022-01-27 16:47:28 UTC
Echoing the frustration that this breaks every couple of months. I have used mesa without egl on servers where some software needs X to be able to render jpg and png files (don't ask why someone (java) wrote it that way, I just have to run the darned thing). Those servers have no graphics, and building with -egl is the only way to get the ebuild to compile.
Comment 12 Matt Turner gentoo-dev 2022-02-03 00:37:17 UTC
Sorry for this. I didn't recognize that USE=egl required a driver to be enabled.

This is resolved in mesa-22.0.0_rc1. I think I'll have to put IUSE=egl back in mesa-21.3.x.
Comment 13 Larry the Git Cow gentoo-dev 2022-02-07 19:03:27 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43aaa07b64432fdc21b5a2f68716189f7991a592

commit 43aaa07b64432fdc21b5a2f68716189f7991a592
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2022-02-07 18:34:28 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2022-02-07 19:02:50 +0000

    media-libs/mesa: Readd IUSE="egl gbm" to 21.3.5
    
    Closes: https://bugs.gentoo.org/828491
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 media-libs/mesa/mesa-21.3.5.ebuild | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)
Comment 14 ahudson.news 2022-02-07 19:31:10 UTC
Thank you :)