Skip to content

Add eui neo package - #4

Open
FarnaHerry wants to merge 2 commits into
mainfrom
add-eui-neo-package
Open

Add eui neo package#4
FarnaHerry wants to merge 2 commits into
mainfrom
add-eui-neo-package

Conversation

@FarnaHerry

Copy link
Copy Markdown
Owner

No description provided.

@Sunrisepeak
Sunrisepeak force-pushed the add-eui-neo-package branch 5 times, most recently from ff226c0 to 2047c79 Compare July 28, 2026 22:28
…cpplibs#134)

Five source-built packages behind the alternate GUI and network backends: the Khronos Vulkan loader + headers, libcurl (OpenSSL/Schannel), SDL2, and libglvnd's GL/glx.h.

All build from plain source lists — no CMake, no autotools, no install() hook. Verified cold on all three platforms; compat.vulkan defers windows (upstream supports a static loader only on macOS).

Design: .agents/docs/2026-07-29-add-gui-backend-packages-plan.md

Co-authored-by: SPeak Agent <248744407+speak-agent@users.noreply.github.com>
@Sunrisepeak
Sunrisepeak force-pushed the add-eui-neo-package branch 5 times, most recently from 7c20b79 to c35884e Compare July 29, 2026 00:27
…ends

EUI-NEO as a Form B compat package: the core TUs compiled into one lib, public
headers exposed via include_dirs, so consumers write `#include <eui_neo.h>`.
The C++23 module surface is out of scope — upstream ships no module interface
units.

Builds on mcpplibs#134 (compat.vulkan / sdl2 / curl), and carries two fixes to that
half that only a machine with a GPU could have found — see below.

Backend selection. Upstream compiles exactly one render backend and one window
backend, dispatching on `#if OPENGL ... #elif VULKAN` and `#if SDL2` /
else-GLFW, so defining both halves of either pair silently picks the first.
mcpp features are additive with no `default-features = false` (mcpp#242), and
all three obvious encodings fail silently: a `default` feature carrying
defines/sources/deps is inert, `default = { implies = ... }` always applies,
and a package-level define cannot be unset. Verified with probes on 0.0.109 and
2026.7.29.1. What works is resolving the choice in the preprocessor from the
-DMCPP_FEATURE_<NAME> flags mcpp already passes, via a force-included header.

That exposed a second problem: mcpp routes `cflags` to C translation units and
`cxxflags` to C++ ones. The first revision carried only
`cflags = { "-DEUI_RENDER_BACKEND_OPENGL=1" }`, so render_backend.cpp never saw
it — the package built, linked, passed its tests, and had no render backend.

REAL GUI VERIFICATION, on a workstation with an X display and an RTX 4080: all
four backend combinations open a window, create the backend and present three
frames, with no environment variables set. Getting the Vulkan half there needed
two changes, both invisible to a headless test:

  * compat.vulkan-runtime (new) — the loader found every host ICD manifest and
    then failed to dlopen any driver, because an mcpp binary runs under mcpp's
    own glibc and a bare-soname dlopen never searches the host path. This is
    the counterpart of compat.glx-runtime, which is why OpenGL already worked:
    a symlink farm plus runtime.library_dirs, no vendored driver. Instance
    extensions 4 -> 22. Versioned sonames only — library_dirs lands on the link
    line too, so a bare libxcb.so there shadows compat.xcb.

  * compat.vulkan is now kind="shared" with soname libvulkan.so.1. SDL2's
    SDL_CreateWindow(SDL_WINDOW_VULKAN) dlopens libvulkan.so.1 and resolves
    surface creation through whatever it finds; against a static loader the
    application ends up with two, and createSurface gets an instance the second
    one never saw. Shared, the application, GLFW (via glfwInitVulkanLoader) and
    SDL all converge on one object — which is what the loader is designed to be.

Also: glfwInitVulkanLoader must be called before glfwInit. Upstream's
glfw_app_main.cpp gets this right; a consumer writing its own entry point must
too.

Verified cold on all three platforms with mcpp 0.0.109, plus the local GUI
harness on Linux.

Design: .agents/docs/2026-07-29-add-eui-neo-plan.md

Co-authored-by: SPeak Agent <248744407+speak-agent@users.noreply.github.com>
@Sunrisepeak
Sunrisepeak force-pushed the add-eui-neo-package branch from c35884e to f529d54 Compare July 29, 2026 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants