Page MenuHomeFreeBSD

x11-toolkits/wlroots: Add mesa-dri to RUN_DEPEND
ClosedPublic

Authored by manu on Feb 27 2020, 4:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 2, 7:19 AM
Unknown Object (File)
Thu, May 2, 7:18 AM
Unknown Object (File)
Thu, May 2, 7:18 AM
Unknown Object (File)
Thu, May 2, 12:02 AM
Unknown Object (File)
Feb 17 2024, 10:25 AM
Unknown Object (File)
Feb 11 2024, 3:02 AM
Unknown Object (File)
Jan 31 2024, 12:49 PM
Unknown Object (File)
Jan 17 2024, 4:58 AM

Details

Summary

wlroots will try to create a GBM device and this need the gbm libs from mesa.

Test Plan

On a fresh install ' pkg install sway alacritty' and start sway.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

wlroots is not a direct consumer of mesa-dri. OpenGL/EGL/Vulkan/etc simply don't work without drivers as even software renderer is part of mesa-dri. This affects all mesa-libs consumers that don't have a fallback. No other port adds mesa-dri to RUN_DEPENDS.

Apply to Mk/Uses/gl.mk instead.

Example consumer without fallback:

$ alacritty
libEGL warning: DRI2: failed to authenticate
libEGL warning: MESA-LOADER: failed to open swrast (search paths /usr/local/lib/dri)

libEGL warning: MESA-LOADER: failed to open swrast (search paths /usr/local/lib/dri)

libEGL warning: DRI2: failed to authenticate
libEGL warning: MESA-LOADER: failed to open swrast (search paths /usr/local/lib/dri)

libEGL warning: MESA-LOADER: failed to open swrast (search paths /usr/local/lib/dri)

Alacritty encountered an unrecoverable error:

        Error creating GL context; Received multiple errors. Errors: `[OsError("eglInitialize failed"), OsError("`glXQueryExtensionsString` found no glX extensions")]`

Do people get mesa-dri just by installing xorg, or xorg-server, or a desktop environment? (If so, how?)

In D23853#524704, @greg_unrelenting.technology wrote:

Do people get mesa-dri just by installing xorg, or xorg-server, or a desktop environment? (If so, how?)

USES=xorg-cat:xserver adds RUN_DEPENDS on mesa-dri. x11/xorg also adds RUN_DEPENDS on mesa-dri (duplicate?).

wlroots is not a direct consumer of mesa-dri. OpenGL/EGL/Vulkan/etc simply don't work without drivers as even software renderer is part of mesa-dri. This affects all mesa-libs consumers that don't have a fallback. No other port adds mesa-dri to RUN_DEPENDS.

Apply to Mk/Uses/gl.mk instead.

What do you mean by fallback ?

Given X11 server depends on mesa-dri it makes sense to make Wayland compositor(s) depend on mesa-dri as well. For running regular GUI applications in a jail gfx drivers are required less often.

Sorry for the initial confusion.

In D23853#524811, @manu wrote:

What do you mean by fallback ?

Non-accelerated wl_shm on Wayland, MIT-SHM on X11. wlroots only supports EGL (Vulkan is slated until renderer is refactored) and requires GBM (not supported by proprietary NVIDIA driver) to run from console.

This revision is now accepted and ready to land.Feb 28 2020, 10:52 AM

wlroots will try to create a GBM device and this need the gbm libs from mesa.

"gbm libs" are part of mesa-libs package. In commit message better include error excerpt to avoid ambiguity.

This revision was automatically updated to reflect the committed changes.