When switching from using autotools to meson, we get an error in building Mesa for macOS. This is happening in Nixpkgs master. These are the flags:
Full log is available here: https://hydra.nixos.org/build/95553754
We want to build "appledri" which provides GLX symbols around Apple's OpenGL.framework. As far as I can tell, this is fully supported with autotools, but appears broken in Meson. The error comes from this line in Mesa:
As far as I know, there are no OpenGL drivers for macOS available from Mesa, so enabling any of those does not appear to be an option. GLX is the main thing we want to build here, so I think the above condition is incorrect. I can't find any other way to do this (macports is still on an older).
> As far as I know, there are no OpenGL drivers for macOS available from Mesa, so enabling any of those does not appear to be an option
The three software rasterizers (swrast, softpipe/llvmpipe, and swr) work on macos. This configuraiton looks really strange though, because you're going to end up with gallium state trackers (vdpau and xvmc), as well as a libgles, but no drivers.
Out of curiosity, what were the autotools options you were using on macos?
> The three software rasterizers (swrast, softpipe/llvmpipe, and swr) work on macos. This configuraiton looks really strange though, because you're going to end up with gallium state trackers (vdpau and xvmc), as well as a libgles, but no drivers.
Ah ok! I did not realize that those worked on macOS. The configure flags do look incorrect, and might be the source of this issue. Some of this code is shared between Linux and macOS so that is where those values are coming from. Looking at it now, we should probably rely on the auto setting which will do the correct thing in most of these cases.
> Out of curiosity, what were the autotools options you were using on macos?
Here are the flags for autotools, which I have verified works:
Full log: https://hydra.nixos.org/build/95461472
Macports flags are:
For reference, the flags we pass today on master are at https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/mesa/default.nix#L98-L132 . Generally speaking, nixpkgs errs on the side of more explicit flags rather than leaving up to configure's defaults, but yes the first priority if making it work, even if it means making a lot more of those flags platform-specific.
I've proposed a fix here for the glx bits:
You really should turn off xvmc and vdpau, as even if those happen to compile (which meson should error on) they're useless. Those are state trackers that have a hard requirement on a gallium driver (for macos swrast), and are useless without one. I don't think that glvnd doesn't work on macos either, but I could be wrong
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/120.