-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Update COMPILING.md and Makefile w/info on OS X builds and optimization #30714
Update COMPILING.md and Makefile w/info on OS X builds and optimization #30714
Conversation
I experience slow OS X versions for some time now. The Windows builds have significantly more performance. But is disabling optimizations the right way? I think not. As a consequence this leads to a situation where you cannot play CDDA on macs with El Capitan or older, unless you accept a very laggy experience. I'm relatively new to the codebase and the makefile is fairly complex but I think that this should be fixable. Does anybody know why optimization is not possible for OSX_MIN <= 10.11? The errors could possibly be caused by linking to the wrong lib or framework versions. Or having multiple framework versions on the same computer, e.g. brew version and manually installed versions of SDL. I also had an error that libstdc++ was deprecated while trying to fix it. This I take very seriously because my feeling is that it's not SDL but the containers that are slow. Please forgive me, but using standard template libraries in game development is a common sickness. Bug fixing is often very hard and confusing. |
The app crashed when optimizations were enabled. |
According to #26564 it crashes due to a bug in older versions of clang |
As it seems CDDA is effectively killed on OSX_MIN <= 10.11 just because of using std::function. Relying on the fact that template libraries are compatible between OS versions and platforms is - to say the least - very optimistic. |
What do you suggest? Some OSX11-specific templates? |
If one decides to use STL or the like (boost) which I always try to avoid, one should use no exotic constructs like std::function instead use only the most common classes like containers. I have the suspicion that the use of template libraries in C++ game development is introduced by people that come from other fields (Web Dev) or learned it at universities. It's possible though but if something goes wrong it's hard to say what exactly and also hard to fix. Memory management is also an issue. I will try to find a way though to make a version of CDDA for El Capitan that runs with acceptable speed. Would be very sad if only Macs with the newest OS versions can play it. |
We are not using And why do you think |
I didn't intend to kick someones knees. Standards of languages change. That does not imply that it's good to use every feature of the standard in game development, which has it's special needs (performance, performance and performance). Machines double speed each year and a half or so but games do not profit the same amount from it. What do you think is the reason for that? |
I think it's time to drop support for macOS 10.11, it's two years past end-of-life from Apple now. The game is very tedious to play even on decent Mac hardware (sleeping a night takes ~5 minutes realtime). We should make the official macOS binary use -O3 and tell <=10.11 users to compile themselves. How hard would it be to support two macOS builds? One for <=10.11 and one for >10.11? |
Too hard, it's better to just drop support. |
Summary
SUMMARY: Build "Update COMPILING.md and Makefile w/info on OS X builds and optimization"
Purpose of change
Pull request #26564 made changes to what optimizations were allowed for OS X targets, but the documentation was never updated with this information.
Closes #30698
Describe the solution
Updated
COMPILING.md
andMakefile
with the missing information about how anOSX_MIN
greater than 10.11 is necessary for optimizations to be enabled for native builds, and how optimizations are always disabled for cross-compilation.