Skip to content

Linux: Fix build with dbus=no or threads=no #106175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

akien-mga
Copy link
Member

No description provided.

@akien-mga akien-mga added this to the 4.5 milestone May 8, 2025
@akien-mga akien-mga requested a review from a team as a code owner May 8, 2025 14:57
@akien-mga
Copy link
Member Author

BTW, I found this while testing an editor build with threads=no, and finding that platform/linuxbsd/freedesktop_at_spi_monitor.h requires threads but doesn't check THREADS_ENABLED. CC @bruvzg

Overall using the editor single-threaded on desktop is not really a use case we want to actively support, but if we can make it build without too much hassle, it's a convenient way to test behavior for the single-threaded web editor on desktop.

@bruvzg
Copy link
Member

bruvzg commented May 8, 2025

requires threads but doesn't check THREADS_ENABLED

Same for freedesktop_portal.

@Riteo
Copy link
Contributor

Riteo commented May 8, 2025

BTW, I found this while testing an editor build with threads=no, and finding that platform/linuxbsd/freedesktop_at_spi_monitor.h requires threads but doesn't check THREADS_ENABLED.

The Wayland backend depends on a thread for its event handling, should it check for that too?

Edit: I think that the X11 backend also handles certain events in a thread.

@bruvzg
Copy link
Member

bruvzg commented May 8, 2025

Windows and macOS display servers use threads as well, not sure if this flag is meaningful for anything except Web.

@akien-mga akien-mga force-pushed the linux-build-no-dbus branch from bc9cc62 to e9e8ddc Compare May 9, 2025 13:26
@akien-mga akien-mga requested a review from a team as a code owner May 9, 2025 13:26
@akien-mga
Copy link
Member Author

Windows and macOS display servers use threads as well, not sure if this flag is meaningful for anything except Web.

It's not, as I mentioned above. But it used to compile and work fine as of #85939, and it's useful occasionally to test how the editor behaves on a single-thread without having to use the Web Console for debugging, which is less convenient than a native app/debugger. It's not meant to be a supported configuration but if it's not hard to keep it working, I see no harm in doing so. For Windows/macOS, I agree we can just ignore it.

I've amended the commit to disable dbus when threads is off for Linux.

@akien-mga akien-mga changed the title Linux: Fix build with dbus=no Linux: Fix build with dbus=no or threads=no May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants