Skip to content

Make building SDL without X11 or Wayland harder#11310

Merged
madebr merged 1 commit intolibsdl-org:mainfrom
madebr:make-building-sdl-without-x11-or-wayland-harder
Oct 23, 2024
Merged

Make building SDL without X11 or Wayland harder#11310
madebr merged 1 commit intolibsdl-org:mainfrom
madebr:make-building-sdl-without-x11-or-wayland-harder

Conversation

@madebr
Copy link
Copy Markdown
Contributor

@madebr madebr commented Oct 23, 2024

It's still possible to build SDL by configuring with -DSDL_NO_UNIX_DESKTOP_SANITY_CHECK=ON

The error message is:

CMake Error at cmake/macros.cmake:404 (message):
  SDL could not find X11 or Wayland development libraries on your system.
  This means SDL will not be able to create windows on a typical *nix
  operating system.  Most likely, this is not wanted.

  On Linux, install the packages listed at
  https://github.com/libsdl-org/SDL/blob/main/docs/README-linux.md#build-dependencies


  If you really don't need desktop windows, the documentation tells you how
  to skip this check.
  https://github.com/libsdl-org/SDL/blob/main/docs/README-cmake.md#cmake-fails-to-build-without-x11-or-wayland-support

Error on ci:
https://github.com/madebr/SDL/actions/runs/11485462451/job/31965601937#step:23:533

The reason for this change is that we were receiving lots of support questions about why linux apps were not displaying a window.
I hope breaking the build and providing links to locations where to fix the build is enough. SDL_NO_UNIX_DESKTOP_SANITY_CHECK is explicitly NOT mentioned in the error message to avoid people blindly copying it.

Description

Existing Issue(s)

@madebr madebr force-pushed the make-building-sdl-without-x11-or-wayland-harder branch 4 times, most recently from 5b25e35 to dcab543 Compare October 23, 2024 18:45
It's still possible to build SDL by configuring with -DSDL_NO_UNIX_DESKTOP_SANITY_CHECK=ON
@madebr madebr force-pushed the make-building-sdl-without-x11-or-wayland-harder branch from dcab543 to ed02977 Compare October 23, 2024 19:04
@slouken
Copy link
Copy Markdown
Collaborator

slouken commented Oct 23, 2024

Looks good, thanks!

@madebr madebr merged commit e8b69b0 into libsdl-org:main Oct 23, 2024
@madebr madebr deleted the make-building-sdl-without-x11-or-wayland-harder branch October 23, 2024 20:19
@sezero
Copy link
Copy Markdown
Contributor

sezero commented Oct 23, 2024

Where does kmsdrm fit into this equation?

@slouken
Copy link
Copy Markdown
Collaborator

slouken commented Oct 23, 2024

Where does kmsdrm fit into this equation?

It's one of the use cases where you might define SDL_UNIX_CONSOLE_BUILD.

@madebr
Copy link
Copy Markdown
Contributor Author

madebr commented Oct 23, 2024

Just confirming the urls at https://github.com/libsdl-org/SDL/actions/runs/11485676931/job/31966322812#step:23:502 work.

RTFM :)

klukaszek pushed a commit to klukaszek/SDL that referenced this pull request Nov 17, 2024
…-org#11310)

It's still possible to build SDL by configuring with -DSDL_NO_UNIX_DESKTOP_SANITY_CHECK=ON
@madebr
Copy link
Copy Markdown
Contributor Author

madebr commented Jan 6, 2025

@slouken @sezero
Should SDL2 also get this warning/error?
In fe54687, I removed an error message that causes X11 support to be disabled instead.

SDL's CMake behavior will be the same before/after when neither x11 or wayland is found: a CMake error

@slouken
Copy link
Copy Markdown
Collaborator

slouken commented Jan 6, 2025

@slouken @sezero Should SDL2 also get this warning/error? In fe54687, I removed an error message that causes X11 support to be disabled instead.

SDL's CMake behavior will be the same before/after when neither x11 or wayland is found: a CMake error

I'm inclined not to change build behavior in SDL2, since people may have automated scripts set up for it at this point.

@madebr
Copy link
Copy Markdown
Contributor Author

madebr commented Jan 6, 2025

I'm inclined not to change build

Aight, I'll revert my patch.

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.

3 participants