MangoHud-Next: compilation under elogind#2071
Conversation
| ipc_dep = declare_dependency( | ||
| link_with: ipc_lib, | ||
| include_directories: [ipc_inc], | ||
| dependencies: [systemd_dep] |
There was a problem hiding this comment.
Not sure this should be needed
There was a problem hiding this comment.
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 This does not work as expected.systemd_dep.partial_dependency(includes : true)
There was a problem hiding this comment.
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
There was a problem hiding this comment.
I can build current HEAD without the ipc_dep fixups and see where the offending includes are happening in a bit.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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);
| ^~~~~~
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....