Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-29516

Tools build on OS X needs to set -mmacosx-version-min in CGO_{C,LD}FLAGS

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.0.16, 3.2.15, 3.4.6, 3.5.9
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • v3.4, v3.2, v3.0
    • Platforms 2017-06-19

      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:

      • 3.0, 3.2, and 3.4 target 10.7, and are built on 10.10
      • master targets 10.10, and is built on 10.10

      However, we are about to upgrade the macOS builders to 10.12, at which point things will look like:

      • 3.0, 3.2, and 3.4 target 10.7, and are built on 10.12
      • master targets 10.10, and targets 10.12

      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.

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: