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

Compiling from source on macOS: clang must be used and not gcc #152

Open
saxbophone opened this issue Jul 28, 2022 · 9 comments
Open

Compiling from source on macOS: clang must be used and not gcc #152

saxbophone opened this issue Jul 28, 2022 · 9 comments

Comments

@saxbophone
Copy link

The requirement to "use native compilers" is only mentioned in the instructions for cmake-gui, a tool which is not available on macOS, therefore this build requirement may be missed by those looking to build SFML on macOS with gcc: SFML/SFML#1229 (comment)

This won't trip up anyone who just runs cmake from command-line without deliberately overriding the compilers, however overriding the compilers by setting variables CC and CXX is common with cmake, there is no reason to expect it to not work when switching clang to gcc, two compilers which maintain a high degree of interface-compatibility with eachother as far as the build system is concerned (mostly identical option flags). So it will be useful to document that SFML is tied to clang on macOS.

@eXpl0it3r
Copy link
Member

I believe it would make sense to have an info box or similar hinting that GCC isn't fully supported.

Doesn't help that /usr/bin/gcc and /usr/bin/g++ are just aliases for AppleClang... 😄

See also the discussions here:

Do you want to make a PR to add such a messaging?

@saxbophone
Copy link
Author

Do you want to make a PR to add such a messaging?

Alas, I would but I've had a look at the documentation codebase and I'm a little lost on what file I need to edit. It appears to be a mixture of Doxygen-generated HTML and handwritten PHP. Guidance would be welcome.

@barracuda156
Copy link

What should be done instead is to fix building with GCC.

@eXpl0it3r
Copy link
Member

You don't need to comment on all related issues 😄

We haven't found a fix for the issues, so we're just trying to be transparent with the additional documentation.
If you find a fix, then we're more than happy to merge it. 🙂

@saxbophone
Copy link
Author

saxbophone commented Aug 10, 2023

so we're just trying to be transparent with the additional documentation.

Talking of which, did you end up documenting this requirement additionally in the "compiling from source" section, as I you suggested? I'd do it myself but I can't grok your docs build!

@eXpl0it3r
Copy link
Member

No, I haven't gotten around to it. 😓

The tutorials are really just HTML, the PHP at the top and bottom can be ignored, nothing exotic to grok 😀

@saxbophone
Copy link
Author

The tutorials are really just HTML, the PHP at the top and bottom can be ignored, nothing exotic to grok 😀

Ahhhh! Good to know, I thought it was some auto-generated Doxygen stuff or something more complex and difficult...

@eXpl0it3r
Copy link
Member

Well, if it's part of the documentation, then yes, it's generated, you'd have to edit the C++ code. But the tutorials are HTML sprinkled with a bit of PHP

@saxbophone
Copy link
Author

Well, if it's part of the documentation, then yes, it's generated, you'd have to edit the C++ code. But the tutorials are HTML sprinkled with a bit of PHP

Sounds like the documentation needs documentation 😅😜

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

3 participants