Changes between Initial Version and Version 5 of Ticket #61775
- Timestamp:
- Dec 8, 2020, 1:06:52 AM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #61775
-
Property
Priority
changed from
High
toNormal
-
Property
Summary
changed from
mame: 0.226 build fails on 10.8, due to host libstdc++ bug (_DARWIN_C_SOURCE needs to be defined)
tomame: 0.226 build fails on 10.8; libc++ issue?
-
Property
Priority
changed from
-
Ticket #61775 – Description
initial v5 16 16 }}} 17 17 18 In short, the issue relates to a bug in the host libstdc++: When '_XOPEN_SOURCE' is defined, certain items aren't declared unless '_DARWIN_C_SOURCE' is also defined. So far, this bug seems to be isolated to MacOS 10.8.x.18 The issue appears to relate to the libc++ headers: When '_XOPEN_SOURCE' is defined, certain items aren't declared unless '_DARWIN_C_SOURCE' is also defined. So far, this bug seems to be isolated to MacOS 10.8.x. 19 19 20 Proposed immediate-term solution: Patch the source file(s) in question, adding the following at the appropriate place: 20 Note that the Mame port is presently using MacPorts Clang 9. However, the same failures also occur with MacPorts Clang 10. 21 22 Potential solution: Patch the source file(s) in question, adding the following at the appropriate place: 21 23 22 24 {{{ 23 // MacPorts: Fix for lib stdc++ bug in MacOS 10.8.x, which causes compilation errors25 // MacPorts: Fix for libc++ compilation errors on MacOS 10.8 24 26 #if defined(__APPLE__) 25 27 #define _DARWIN_C_SOURCE … … 27 29 }}} 28 30 29 In parallel, I'll also discuss the fixes with the Mame project. And ultimately submit a pull request, to permanently fix this for future releases. 30 31 Note: While we could certainly define '_DARWIN_C_SOURCE' globally, that seems more risky. And unnecessary, if only a small number of source files are involved. 31 While we could certainly define '_DARWIN_C_SOURCE' globally, that seems more risky. And unnecessary, if only a small number of source files are involved. 32 32 33 33 Currently building on a 10.8 VM, to verify the latter.