Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 670737 - =media-libs/mesa-18.2.4 breaks build of =app-emulation/wine-any-3.19[d3d9]
Summary: =media-libs/mesa-18.2.4 breaks build of =app-emulation/wine-any-3.19[d3d9]
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-09 10:20 UTC by Bernd
Modified: 2018-11-11 08:13 UTC (History)
2 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,12.41 KB, text/plain)
2018-11-09 10:20 UTC, Bernd
Details
config.log (config.log,420.55 KB, text/plain)
2018-11-09 10:21 UTC, Bernd
Details
wine-any-3.19:20181109-020139.log (wine-any-3.19:20181109-020139.log,98.73 KB, text/plain)
2018-11-09 10:22 UTC, Bernd
Details
mesa-18.2.4:20181108-232240.log (mesa-18.2.4:20181108-232240.log,960 bytes, text/plain)
2018-11-09 10:26 UTC, Bernd
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd 2018-11-09 10:20:10 UTC
Created attachment 554587 [details]
emerge-info.txt

When updating to mesa-18.2.4 during @world update, I received warnings on d3d9 and other USE flags for mesa:

* Messages for package media-libs/mesa-18.2.4:
 * Log file: /var/log/portage/build/media-libs/mesa-18.2.4:20181108-232240.log

 * Ignoring USE=d3d9       since VIDEO_CARDS does not contain r300, r600, radeonsi, nouveau, or vmware
 * Ignoring USE=vaapi      since VIDEO_CARDS does not contain r600, radeonsi, or nouveau
 * Ignoring USE=vdpau      since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau
 * Ignoring USE=xa         since VIDEO_CARDS does not contain freedreno, nouveau, or vmware
 * Ignoring USE=xvmc       since VIDEO_CARDS does not contain r600 or nouveau

Mesa was installed like

artus /etc # emerge -pqv =media-libs/mesa-18.2.4::gentoo
[ebuild   R   ] media-libs/mesa-18.2.4  USE="d3d9 dri3 egl gallium gbm gles2 llvm lm_sensors osmesa pic unwind vaapi valgrind vdpau wayland xa xvmc -classic -debug -gles1 -opencl -pax_kernel (-selinux) -test -vulkan" ABI_X86="32 (64) (-x32)" VIDEO_CARDS="(-freedreno) -i915 -i965 (-imx) -intel -nouveau -r100 -r200 -r300 -r600 -radeon -radeonsi (-vc4) -virgl (-vivante) -vmware" 

which has been working for a long time with these flags.

When portage wants to update to wine-any-3.19 it fails during configure phase with

checking for libdrm/drm.h... yes
configure: error: pkg-config couldn't find Gallium Nine module

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/app-emulation/wine-any-3.19/work/wine-3.19-abi_x86_32.x86/config.log
 * ERROR: app-emulation/wine-any-3.19::gentoo failed (configure phase):
 *   econf failed


I install wine-any like

artus ~ # emerge -pqv =app-emulation/wine-any-3.19::gentoo
[ebuild  NS   ] app-emulation/wine-any-3.19 [3.18] USE="X alsa d3d9 dos fontconfig gecko gsm gstreamer jpeg lcms mono mp3 ncurses netapi nls odbc openal opencl opengl osmesa pcap perl pipelight png pulseaudio run-exes samba ssl staging themes threads truetype udev udisks v4l vaapi vkd3d vulkan xcomposite xinerama xml -capi -cups -custom-cflags (-ffmpeg) -gphoto2 -gssapi -kerberos -ldap -oss -prelink -realtime -scanner -sdl (-selinux) -test" ABI_X86="32 64 (-x32)" 

Removing d3d9 USE flag from wine-any, finishes the configuration and let's wine-any compile.
Comment 1 Bernd 2018-11-09 10:21:09 UTC
Created attachment 554589 [details]
config.log

config.log for wine-any-3.19[d3d9] on @world update after upgrading to mesa-18.2.4
Comment 2 Bernd 2018-11-09 10:22:38 UTC
Created attachment 554591 [details]
wine-any-3.19:20181109-020139.log

build log for wine-any-3.19[d3d9]
Comment 3 Bernd 2018-11-09 10:26:11 UTC
Created attachment 554593 [details]
mesa-18.2.4:20181108-232240.log

info log about ignored USE flags with mesa-18.2.4
Comment 4 Bernd 2018-11-09 10:45:50 UTC
Unfortunately, I can't upload mesa build log. I get an access denied error on https://bugs.gentoo.org/attachment.cgi
Comment 5 Matt Turner gentoo-dev 2018-11-10 01:17:07 UTC
(In reply to Bernd from comment #0)
> Created attachment 554587 [details]
> emerge-info.txt
> 
> When updating to mesa-18.2.4 during @world update, I received warnings on
> d3d9 and other USE flags for mesa:
> 
> * Messages for package media-libs/mesa-18.2.4:
>  * Log file:
> /var/log/portage/build/media-libs/mesa-18.2.4:20181108-232240.log
> 
>  * Ignoring USE=d3d9       since VIDEO_CARDS does not contain r300, r600,
> radeonsi, nouveau, or vmware
>  * Ignoring USE=vaapi      since VIDEO_CARDS does not contain r600,
> radeonsi, or nouveau
>  * Ignoring USE=vdpau      since VIDEO_CARDS does not contain r300, r600,
> radeonsi, or nouveau
>  * Ignoring USE=xa         since VIDEO_CARDS does not contain freedreno,
> nouveau, or vmware
>  * Ignoring USE=xvmc       since VIDEO_CARDS does not contain r600 or nouveau
> 
> Mesa was installed like
> 
> artus /etc # emerge -pqv =media-libs/mesa-18.2.4::gentoo
> [ebuild   R   ] media-libs/mesa-18.2.4  USE="d3d9 dri3 egl gallium gbm gles2
> llvm lm_sensors osmesa pic unwind vaapi valgrind vdpau wayland xa xvmc
> -classic -debug -gles1 -opencl -pax_kernel (-selinux) -test -vulkan"
> ABI_X86="32 (64) (-x32)" VIDEO_CARDS="(-freedreno) -i915 -i965 (-imx) -intel
> -nouveau -r100 -r200 -r300 -r600 -radeon -radeonsi (-vc4) -virgl (-vivante)
> -vmware" 
> 
> which has been working for a long time with these flags.

You're not building any driver...? How do you hope to use d3d9?
Comment 6 Bernd 2018-11-10 11:11:05 UTC
(In reply to Matt Turner from comment #5)
> You're not building any driver...? How do you hope to use d3d9?

How did it compile in the past? I never had trouble compiling like this and never compiled a driver. The USE flag says nothing, about being driver dependant.

Just for the record: I do not need mesa, but wine-any does. And I always had d3d9 support in wine, since the USE flag was introduced. On the other hand, I haven't used wine actively for quite some time, due to not having much time for gaming.

My issue here is, that mesa ignores the USE flag, telling the user, but it says nothing about the impact on other packages like wine. I check the output of emerge -pv for USE flag changes and other possible issues, but apparently this does not pop up as a USE flag change to other packages or the user, so that they can error out early on dep checking. 

Plus, wine-any does not have any VIDEO_CARDS setting. So enabling this feature in wine, which is what I was doing, is totally driver independant at first. The d3d9 USE flag on mesa is just enabled as a dependancy for wine-any.

Furthermore, Ixit's website tell's nothing about not working with binary nvidia driver. They say it works by natively passing D3DX9 commands to the GPU, which is clearly supported by NVidia cards.

If the ebuild has been changed to check for enabled drivers when using d3d9 USE flag, this is IMO a good move to improve the quality of the ebuild. But it would be better, if portage somehow would recognize the disabling of the USE flag, so it can error out early when it sees, wine has the same USE flag set and will likely fail to build if it remains set. Just having a warning printed out in pkg_pretend is not enough I think, as the user might not know the exact meaning and impact of any single USE flag to any single package installed. I expect such semantic checking to be handled by the package manager.
Comment 7 Matt Turner gentoo-dev 2018-11-10 17:52:42 UTC
I think I understand what's going on here.

I believe you are mistaken that the d3d9 USE flag in wine is usable with the proprietary NVIDIA drivers. WINE makes use of the d3d9 Gallium state tracker in Mesa, which is only usable with some Gallium drivers (also in Mesa).

Why this worked before:

Mesa has a lot of configuration options and many of them are driver dependent. For instance USE=vaapi for instance is only for Gallium drivers. i965 is not a Gallium driver and has vaapi support provided by a separate package. Previously we had a system of REQUIRED_USE that prevented users from building such configurations, and asking the user to understand all of this is a lot. 

In 18.1 we were using the autotools build system. For 18.2 we switched to the new Meson build system. The Meson build system is written as to throw an error when the user requests a configuration that doesn't make sense, necessitating some change on our part.

So we changed to ignore those configuration options, so as to (1) not provoke Meson into erroring out in configure, and (2) to avoid making users micromanage a bunch of flags for Mesa that they might not really understand.

To the earlier example: now if a user has VIDEO_CARDS=i965 USE=vaapi set system-wide the vaapi flag on Mesa will not do anything. The new system of ignoring nonsensical USE flags has been a success.

The thing I didn't consider is that there is a reverse dependency that depends on media-libs/mesa[d3d9].

WINE maintainers: there's no way to avoid the dependency on media-libs/mesa[d3d9], right?

I think that since mesa[d3d9] is a provider of an API, rather than a just a driver implementation like the others (vaapi, xa, xvmc, etc), we probably do need a REQUIRED_USE for it...

Bernd: please link me to the Ixit page that you referenced. I'd like to see if it has any incorrect information. As far as your immediate problem goes (WINE not building), you should disable the d3d9 USE flag if you are using the NVIDIA proprietary drivers since they do not work together.
Comment 8 Nick Sarnie gentoo-dev 2018-11-10 17:58:54 UTC
Hi all,

I'm currently the only active WINE maintainer. I've also worked on the Gallium Nine project since near the beginning.

Matt is correct, you cannot use Gallium Nine with a non-Gallium driver. The NVIDIA binary driver definitely does not work. 

Also, wine-any should not depend on mesa[d3d9] unless you set +d3d9 for wine-any. I've just double checked the ebuild and confirmed that.

Bernd, I recommend setting -d3d9 for wine-any since it is not really valid with your system configuration.

Thanks,
Sarnex
Comment 9 Larry the Git Cow gentoo-dev 2018-11-10 18:47:08 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d352ccbca4ba4e136efdee4ac5962724ee6294c

commit 4d352ccbca4ba4e136efdee4ac5962724ee6294c
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2018-11-10 18:33:36 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2018-11-10 18:46:56 +0000

    media-libs/mesa: Add REQUIRED_USE For USE=d3d9
    
    The new Meson build requires a suitable driver to be enabled, and
    ignoring the d3d9 USE flag isn't safe since WINE has a dependency on
    mesa[d3d9].
    
    Closes: https://bugs.gentoo.org/670737
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 media-libs/mesa/mesa-18.2.4.ebuild | 13 +------------
 media-libs/mesa/mesa-9999.ebuild   | 13 +------------
 2 files changed, 2 insertions(+), 24 deletions(-)
Comment 10 Bernd 2018-11-11 08:13:38 UTC
Hi all,

thanks for your detailed feedback. I already compiled wine-any without the d3d9 USE flag, as mentioned in the first post.

Nick, wine-any does not depend on mesa[d3d9] if the USE flag isn't set for wine-any too.

Matt, the page I was referring to is at https://wiki.ixit.cz/d3d9. From what I can tell, it doesn't provide incorrect information, but is not very precise in communcating, that it works ONLY with mesa enabled drivers. But this might also be a misunderstanding on my side, due to non-native english writer meets non-native english reader :)

Thanks for your time in investigating this!