[SERVER-29516] Tools build on OS X needs to set -mmacosx-version-min in CGO_{C,LD}FLAGS Created: 05/Jun/17 Updated: 30/Oct/23 Resolved: 09/Jun/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 3.0.16, 3.2.15, 3.4.6, 3.5.9 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Andrew Morrow (Inactive) | Assignee: | Andrew Morrow (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Backport Requested: |
v3.4, v3.2, v3.0
|
||||
| Sprint: | Platforms 2017-06-19 | ||||
| Participants: | |||||
| Description |
|
The OS X system on which the go tools are built may be newer than the intended minimum supported OS X version that we intend to support. Currently:
However, we are about to upgrade the macOS builders to 10.12, at which point things will look like:
To ensure that the C++ server works correctly on the older systems, even though it is built on the newer ones, we arrange for the flag -mmacosx-version-min=10.x to be provided to all C and C++ compile and link steps. However, we are not doing this for any binaries compiled by cgo as part of building the tools. As a result, the tools as built on the newer systems may not run correctly on the older systems we intend to support. The most likely solution is that we need to add -mmacosx-version-min=something to CGO_CFLAGS (and the associated link flag?) across the v3.0, v3.2, v3.4, and master branches. Also, as pointed out by gabriel.russell, there were some syscall related changes that may intersect this issue, and might constrain our actual target minima for the tools differently than they are constrained for the server component. We should investigate this situation as part of undertaking this work. |
| Comments |
| Comment by Githook User [ 09/Jun/17 ] |
|
Author: {u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}Message: (cherry picked from commit db55e668d87d66b171c310241bdbcabfa790e2cf) |
| Comment by Githook User [ 09/Jun/17 ] |
|
Author: {u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}Message: (cherry picked from commit db55e668d87d66b171c310241bdbcabfa790e2cf) |
| Comment by Githook User [ 09/Jun/17 ] |
|
Author: {u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}Message: (cherry picked from commit db55e668d87d66b171c310241bdbcabfa790e2cf) |
| Comment by Githook User [ 09/Jun/17 ] |
|
Author: {u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}Message: |
| Comment by Andrew Morrow (Inactive) [ 05/Jun/17 ] |
|
FYI this probably needs to be set in CGO_LDFLAGS as well, though I'm not 100% sure about that, since I don't know as much about go's linking model. |
| Comment by William Banfield [ 05/Jun/17 ] |
|
Research needs to be done here to determine what go's compatibility is across different versions of macOS. |