-
Notifications
You must be signed in to change notification settings - Fork 88
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
Fix a linker error with macOS #626
base: main
Are you sure you want to change the base?
Conversation
but the reason that line is there is to attempt to keep manually built executables as predictable as possible. will mac builds consistently produce the same executable every time even with this change? |
Thats good to know. How are you comparing the binary? When I go and compile coop, put that into a SHA-256 convertor, save that, then delete only the executable file, and recompile that file, it results in the same SHA-256. Running make clean or distclean and then recompiling it and comparing the hashes results in them being different, thus not accomplishing the goal you have in mind. However. their may be metadata related to time and other info that would cause this to happen, so I don't know if that is a reliable way to compare. |
yeah that's how I test the builds are the same, and it seems that this change breaks the intended result.. the hope is to get the same build every time you make clean |
Alright, so apparently macOS' linker does not include a build id by default anyways, so something else is causing the issue (I think?). I've been unable to reproduce 2 of the same executables, they're always different. The only solution that might work (that I haven't tried as I don't want to deal with uninstalling it if it turns out it doesn't work) is getting a GNU linker that allows the build id to be passed, however this would be rather inconvenient (but doable if necessary) for us Mac users. Pretty stumped on this one other than that though unfortunately. |
@EmeraldLoc can you try using |
Running 1make clean1 in between each test, trying the flags |
During the linking stage of compilation, an error is thrown as
--build-id
appears to not exist in macOS. I've simply gone ahead and removed the added ld flags if the project is being compiled on macOS. The game appears to launch and run fine with this change.