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

SFML fails to build with GCC on macOS #2790

Open
eXpl0it3r opened this issue Nov 16, 2023 · 0 comments
Open

SFML fails to build with GCC on macOS #2790

eXpl0it3r opened this issue Nov 16, 2023 · 0 comments

Comments

@eXpl0it3r
Copy link
Member

eXpl0it3r commented Nov 16, 2023

Describe your issue here

SFML currently actively prevents the usage of GCC on macOS, due to issues within the macOS SDK.

We currently don't see a way to fix this on our side and have to wait for either GCC or Apple to get this sorted.
Additionally, Apple-Clang seems to be the better alternative in most cases anyways, as such we don't see this as a priority.

This issue exist mainly as a catch-all for all the report we got overtime and in case someone is looking for an explanation.

In case someone can provide a fix in any capacity, we'd be more than happy to add support for GCC.
Note that by default gcc and g++ are just aliases for clang and clang++ respectively.

Steps to reproduce

Build SFML with GCC (not just the Clang aliases)

Expected behavior

Compilation succeedes

Actual behavior

Compilation fails

[ 19%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Joystick.cpp.o
cd /Users/eijkhout/Installation/sfml/build-2.6.0-macbookair-gcc12/src/SFML/Window && /opt/local/bin/g++ -DSFML_WINDOW_EXPORTS -I/Users/eijkhout/Installation/sfml/sfml-2.6.0/include -I/Users/eijkhout/Installation/sfml/sfml-2.6.0/src -I/Users/eijkhout/Installation/sfml/sfml-2.6.0/extlibs/headers/vulkan -isystem /Users/eijkhout/Installation/sfml/sfml-2.6.0/extlibs/headers/glad/include -iframework /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/System/Library/Frameworks -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk -mmacosx-version-min=13.0 -fPIC -fvisibility=hidden -stdlib=libc++  -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wcast-align -Wunused -Woverloaded-virtual -Wconversion -Wsign-conversion -Wdouble-promotion -Wformat=2 -Wnull-dereference -Wold-style-cast -Wpedantic -Wmisleading-indentation -Wduplicated-cond -Wlogical-op -Wduplicated-branches -MD -MT src/SFML/Window/CMakeFiles/sfml-window.dir/Joystick.cpp.o -MF CMakeFiles/sfml-window.dir/Joystick.cpp.o.d -o CMakeFiles/sfml-window.dir/Joystick.cpp.o -c /Users/eijkhout/Installation/sfml/sfml-2.6.0/src/SFML/Window/Joystick.cpp
In file included from /Users/eijkhout/Installation/sfml/sfml-2.6.0/src/SFML/Window/OSX/JoystickImpl.hpp:35,
                 from /Users/eijkhout/Installation/sfml/sfml-2.6.0/src/SFML/Window/JoystickImpl.hpp:102,
                 from /Users/eijkhout/Installation/sfml/sfml-2.6.0/src/SFML/Window/JoystickManager.hpp:32,
                 from /Users/eijkhout/Installation/sfml/sfml-2.6.0/src/SFML/Window/Joystick.cpp:29:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/IOKit.framework/Headers/hid/IOHIDDevice.h:273:34: error: 'dispatch_block_t' has not been declared
  273 |                                  dispatch_block_t               handler)
      |                                  ^~~~~~~~~~~~~~~~
make[3]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/Joystick.cpp.o] Error 1
make[2]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant