@@ -53,9 +53,9 @@ answer: the whole chain, done the recommended way, declaring dependencies.
5353[target .'cfg(linux)' .dependencies .compat ]
5454libdrm = " 2.4.134"
5555libgbm = " 25.0.7"
56- egl = " 1.7.0"
5756
5857[target .'cfg(linux)' .dependencies .freedesktop ]
58+ egl = " 1.7.0"
5959wayland = " 1.26.0"
6060wayland-server = " 1.26.0"
6161```
@@ -85,37 +85,53 @@ BIN=target/x86_64-linux-gnu/*/bin/graphics-stack
8585
8686```
8787<project>/bin/libdrm.so.2 <- built by this build
88+ <project>/bin/libEGL.so.1 <- built by this build
89+ <project>/bin/libGLdispatch.so.0 <- built by this build
8890<project>/bin/libwayland-client.so.0 <- built by this build
8991<project>/bin/libwayland-server.so.0 <- built by this build
9092<project>/bin/libffi.so.8 <- built by this build
9193compat-x-libgbm/25.0.7/…/libgbm.so.1
92- compat-x-egl/1.7.0/…/libEGL.so.1
9394xim-x-expat/2.6.2/lib/libexpat.so.1
9495xim-x-gcc/16.1.0/lib64/libgcc_s.so.1
9596xim-x-gcc/16.1.0/lib64/libstdc++.so.6
9697xim-x-glibc/2.44/lib64/libc.so.6
9798xim-x-glibc/2.44/lib64/libm.so.6
98- xim-x-libglvnd/1.7.0.1/lib/libGLdispatch.so.0
9999```
100100
101- Nothing is under ` /usr/lib ` or ` /lib64 ` . Two things there are worth reading
101+ Nothing is under ` /usr/lib ` or ` /lib64 ` . Three things there are worth reading
102102closely.
103103
104- ** The first four lines.** They are this project's own build output, not the
104+ ** The first six lines.** They are this project's own build output, not the
105105ecosystem's copies — including ` libdrm.so.2 ` , even though Mesa's ` libgbm.so.1 `
106106has a DT_NEEDED on that soname and an absolute RUNPATH into the payload. The
107107consumer links them directly, so they are mapped first, and Mesa binds to them:
108108the ` gbm_bo_create ` above ran through this libdrm.
109109
110+ ** ` libEGL.so.1 ` and ` libGLdispatch.so.0 ` are on that list.** The ecosystem's
111+ ` xim:libglvnd ` carries both under the same sonames, and it is installed on this
112+ machine — but only one library per soname is ever mapped and nothing warns
113+ about the loser, so "EGL worked" is not evidence that * this* EGL worked. The
114+ index's test member pins it from the other direction with ` dladdr ` , and this
115+ example prints ` EGL 1.5, vendor Mesa Project ` through the build above.
116+
110117** ` libffi ` and ` libGLdispatch ` .** Nothing in ` mcpp.toml ` names either.
111118` libffi.so.8 ` is what ` libwayland-client ` dispatches protocol messages through,
112119` libGLdispatch ` is what libEGL's vendor dispatch needs — the cascade a directly
113120linked library pulls behind it, which is exactly what a host ` -L/usr/lib `
114121cannot resolve from inside a private loader.
115122
123+ ** Verified with the host present, not absent.** The same program was built and
124+ run from scratch inside ` xlings subos use … --sandbox --gpu ` , in a synthetic
125+ home where none of this machine's checkouts or caches reach — and where ` /usr `
126+ is still the host's, so ` /usr/lib/x86_64-linux-gnu/libEGL.so.1 ` ,
127+ ` libgbm.so.1 ` , ` libdrm.so.2 ` and ` libwayland-client.so.0 ` are all present and
128+ reachable. Every graphics library still resolved to the project's own output or
129+ the ecosystem payload. "Nothing from the host" is a claim about what * wins* ,
130+ not about what exists.
131+
116132## The packages
117133
118- Three are built from source and two bind the ecosystem's Mesa, and the split is
134+ Four are built from source and one binds the ecosystem's Mesa, and the split is
119135not arbitrary. A library is built from source when upstream ships it as a
120136** separable unit** ; it is bound when it is an internal build target of a project
121137the ecosystem already owns, where building it would mean forking that project.
@@ -124,9 +140,9 @@ the ecosystem already owns, where building it would mean forking that project.
124140| ---| ---| ---|
125141| ` compat.libdrm ` | source | ` drmModeGetResources ` , ` drmModeAddFB2 ` , ` drmModeSetCrtc ` — the KMS side |
126142| ` compat.libgbm ` | binds ` xim:mesa ` | ` gbm_create_device ` , ` gbm_bo_create ` — buffers out of a DRM device |
127- | ` freedesktop.egl ` | source | ` eglGetPlatformDisplay(EGL_PLATFORM_GBM_KHR, …) ` — rendering onto them, and ` import egl; ` |
128- | ` freedesktop.wayland ` | source | ` libwayland-client.so.0 ` , and ` import wayland.client; ` |
129- | ` freedesktop.wayland-server ` | source | ` libwayland-server.so.0 ` , and ` import wayland.server; ` |
143+ | ` freedesktop.egl ` | source | ` eglGetPlatformDisplay(EGL_PLATFORM_GBM_KHR, …) ` — rendering onto them, and ` import khronos. egl; ` |
144+ | ` freedesktop.wayland ` | source | ` libwayland-client.so.0 ` , and ` import freedesktop. wayland.client; ` |
145+ | ` freedesktop.wayland-server ` | source | ` libwayland-server.so.0 ` , and ` import freedesktop. wayland.server; ` |
130146
131147** Four of the five are source builds.** GBM is the only binding, and the
132148paragraphs below are about why the line falls where it does.
@@ -207,7 +223,7 @@ package's sources — so one package cannot emit two libraries with disjoint
207223contents. A client-only program drops the second line and links only
208224` libwayland-client.so.0 ` .
209225
210- Both also ship a C++23 module wrapper. ` import wayland.client; ` in place of
226+ Both also ship a C++23 module wrapper. ` import freedesktop. wayland.client; ` in place of
211227` #include <wayland-client.h> ` changes nothing else — every exported name is
212228upstream's, spelled upstream's way — so this file could switch one line at a
213229time. It uses the headers here because that is what a ported project looks like
0 commit comments