Skip to content
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

HAVE_XGENERICEVENT fails even though it's supported. #12243

Open
Gpinchon opened this issue Feb 10, 2025 · 4 comments
Open

HAVE_XGENERICEVENT fails even though it's supported. #12243

Gpinchon opened this issue Feb 10, 2025 · 4 comments
Milestone

Comments

@Gpinchon
Copy link

Gpinchon commented Feb 10, 2025

Issue

When trying to build SDL2 manually, this test fails even though it compiles and runs properly when compiled manually. Meaning building SDL2 ultimately fails with XGenericEventCookie related errors.

Faulty line

https://github.com/libsdl-org/SDL/blob/7aba6c4c735a072ee019df94c5fda9057f6dbcd7/cmake/sdlchecks.cmake#L370C7-L370C30

Build options

option(SDL_SHARED "" OFF)
option(SDL_STATIC "" ON)
option(SDL2_DISABLE_SDL2MAIN  "" ON) # gets ignored by build script
option(SDL2_DISABLE_UNINSTALL "" ON) # ignored
option(SDL2_DISABLE_INSTALL   "" ON) # ignored as well

System specs

OS : Ubuntu on WSL2
Compiler : Clang 18.1.3
ToolChain : GNU
Git tag : release-2.32.0
@slouken
Copy link
Collaborator

slouken commented Feb 10, 2025

@madebr can correct me if I'm wrong here, but /usr/local by definition is not part of the standard system path and should be added manually if desired.

@slouken slouken added this to the 3.x milestone Feb 10, 2025
@madebr
Copy link
Contributor

madebr commented Feb 10, 2025

@madebr can correct me if I'm wrong here, but /usr/local by definition is not part of the standard system path and should be added manually if desired.

Yes, that's what we're currently doing for FreeBSD

job.cmake_arguments.extend((
"-DSDL_CHECK_REQUIRED_INCLUDES=/usr/local/include",
"-DSDL_CHECK_REQUIRED_LINK_OPTIONS=-L/usr/local/lib",
))

@madebr
Copy link
Contributor

madebr commented Feb 10, 2025

@Gpinchon

Let's say you want to create a pure X11 application on FreeBSD.
What does the following output when configuring with CMake?

cmake_minimum_required(VERSION 3.16)
project(x11_app C)
find_package(X11 REQUIRED)
message(STATUS "X11_INCLUDE_DIR: \"${X11_INCLUDE_DIR}\"")
message(STATUS "X11_LIBRARIES:   \"${X11_LIBRARIES}\"")

@Gpinchon
Copy link
Author

@Gpinchon

Let's say you want to create a pure X11 application on FreeBSD. What does the following output when configuring with CMake?

cmake_minimum_required(VERSION 3.16)
project(x11_app C)
find_package(X11 REQUIRED)
message(STATUS "X11_INCLUDE_DIR: "${X11_INCLUDE_DIR}"")
message(STATUS "X11_LIBRARIES: "${X11_LIBRARIES}"")

Hey, I don't have a FreeBSD on hand right now, but I encountered the issue on Ubuntu through WSL.
I switched to OpenSUSE Tumbleweed since then and everything compiles fine on there.
When I tried doing what you say on Ubuntu it gave me lots of static libraries wherease it just gives me 2 dynamic libraries (libX11.so and libXext.so) on OpenSUSE.
Also turns out the include path was not the issue for me.

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

No branches or pull requests

3 participants