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
GCC under macOS fails to build DOSBox #19
Comments
Will try gcc versions 8, 7, 6, and 5 per: https://formulae.brew.sh/formula/gcc Update: they all fail the same. This feels like a header problem, such as missing a critical DOSBox-X has experienced link problems with gcc on macOS here, which they solve by adding |
Someone on Vogons hit this 8 years ago. @Dominus mentioned setting environment variables but could not recall them - and searching and googling turns up nothing. Will check with Dominus to see what he thinks: |
The code does not compile, because of this: MIDIServices.h:
I've never seen this syntax before… turns out it's Apple's extension to C language, which is not available in GCC: https://en.wikipedia.org/wiki/Blocks_(C_language_extension) [edit] |
Fully agree. The fact that DOSBox relies on headers that aren't part of the C or C++ language specifications (at any past or proposed future time) appears to conflict with the simultaneous desire to avoid actual and approved C and C++ specifications, such as those ratified > circa-2000. Regardless of the above, surely anyone would agree these Apple headers are undesirable, and perhaps the cause is auto-tools or pkg-config trying to make the best of things. It seems worthwhile that DOSBox at a minimum should compile using a current GNU build stack (on the 2nd-most-popular desktop OS no less). My solution would be to excise this rubbish via detection of OSX + gcc in the build system (./configure) or ideally with #ifdefs if AppleBlocks reveal itself with some preprocessor definitions: at least that would get DOSBox compiling and give us complete GNU build-chain coverage (goodbye CoreMIDI ✂️). Given the CoreMIDI package probably boils down to C-callable symbols, a more elegant solution might be to add a C-compliant shim-header with extern prototypes for those (few?) midi calls DOSBox relies on. But that's something in which I have little person interest 🤷♂️ |
Looks like we can detect and work-around it; something like:
https://clang.llvm.org/docs/LanguageExtensions.html#blocks |
Fixed in e035f8b Will see what up-stream thinks. Closing this for now given the CI chain is once again ticking along. PS - wow.. gcc-6 detects 226 additional warnings when building under Mac: https://github.com/dreamer/dosbox-staging/runs/275764609 |
Ouch, that's a lot… It seems like most of them are |
The text was updated successfully, but these errors were encountered: