Skip to content

MangoHud-Next: compilation under elogind#2071

Open
neptuwunium wants to merge 1 commit into
flightlessmango:masterfrom
neptuwunium:elogind
Open

MangoHud-Next: compilation under elogind#2071
neptuwunium wants to merge 1 commit into
flightlessmango:masterfrom
neptuwunium:elogind

Conversation

@neptuwunium

Copy link
Copy Markdown

Allows for mangohud-next to be compiled on systems with elogind as a logind provider instead of systemd when the system does not have systemd (i.e. openrc.)

Reasoning for adding IPC module to server, metrics, render and imgui, they all consume ipc headers and under elogind the headers are not under the system include dir but instead elogind/systemd....

@neptuwunium neptuwunium changed the title MangoHud-Next: Fix elogind compilation MangoHud-Next: compilation under elogind Jun 10, 2026
Comment thread mangohud-next/ipc/meson.build
ipc_dep = declare_dependency(
link_with: ipc_lib,
include_directories: [ipc_inc],
dependencies: [systemd_dep]

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this should be needed

@neptuwunium neptuwunium Jun 15, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It tells meson that dependents of ipc_dep need to also depend on systemd_dep, which is needed because of ipc headers relying on systemd headers.

Though a more reasonable solution would be to use systemd_dep.partial_dependency(includes : true) This does not work as expected.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally render doesn't depend on ipc and so doesn't depend on systemd, which I thought it didn't, but that might be by accident

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can build current HEAD without the ipc_dep fixups and see where the offending includes are happening in a bit.

@neptuwunium neptuwunium Jun 15, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In file included from ../mangohud-9999/mangohud-next/server/metrics/metrics.cpp:1:
In file included from ../mangohud-9999/mangohud-next/server/metrics/metrics.h:11:
../mangohud-9999/mangohud-next/server/metrics/../../ipc/ipc.h:2:10: fatal error: 'systemd/sd-bus.h' file not found

In file included from ../mangohud-9999/mangohud-next/render/imgui/imgui_ctx.cpp:5:
In file included from ../mangohud-9999/mangohud-next/render/imgui/imgui_ctx.h:7:
In file included from ../mangohud-9999/mangohud-next/render/imgui/../vulkan_ctx.h:8:
../mangohud-9999/mangohud-next/render/imgui/../../ipc/client.h:11:10: fatal error: 'systemd/sd-bus.h' file not found

In file included from ../mangohud-9999/mangohud-next/render/egl_ctx.cpp:17:
In file included from ../mangohud-9999/mangohud-next/render/imgui/egl.h:7:
In file included from ../mangohud-9999/mangohud-next/render/imgui/imgui_ctx.h:7:
In file included from ../mangohud-9999/mangohud-next/render/imgui/../vulkan_ctx.h:8:
../mangohud-9999/mangohud-next/render/imgui/../../ipc/client.h:11:10: fatal error: 'systemd/sd-bus.h' file not found

In file included from ../mangohud-9999/mangohud-next/render/vulkan_ctx.cpp:4:
In file included from ../mangohud-9999/mangohud-next/render/vulkan_ctx.h:8:
../mangohud-9999/mangohud-next/render/../ipc/client.h:11:10: fatal error: 'systemd/sd-bus.h' file not found

this is with only the mangohud-next/ipc/meson.build changes

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It depends on client.h for:

In file included from ../mangohud-9999/mangohud-next/render/vulkan_ctx.cpp:4:
../mangohud-9999/mangohud-next/render/vulkan_ctx.h:29:45: error: use of undeclared identifier 'Client'
   29 |     void wait_on_semaphores(std::shared_ptr<Client> client);
      |                                             ^~~~~~
../mangohud-9999/mangohud-next/render/vulkan_ctx.h:30:36: error: use of undeclared identifier 'Client'
   30 |     void sync_wait(std::shared_ptr<Client> client);
      |                                    ^~~~~~

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