Reproducible build for osx is stuck on SDK 10.11

Our current reproducible build script downloads OSX SDK 10.11 from s3.dockerproject.org. The coarsetime crate uses the clock_gettime_nsec_np() API, which (like the other clock_gettime APIs) was added in OSX SDK 10.12. This causes the build-repro task to fail: https://gitlab.torproject.org/tpo/core/arti/-/jobs/48984 .

Possible solutions:

  • Can we get SDK 10.12 from anywhere legitimate? If so, we could feed that into our script and we'd be done with this.
  • Could we add a feature to coarsetime so it supports older OSX versions, probably via some mach_* call? The upstream coarsetime developer was very responsive to my last set of patches, but they were less kludgey than this would be.
  • Should we back out of coarsetime (conditionally or unconditionally) for the purpose of these cross-compiled builds? (I believe that @eta favors an approach where we just have a background thread that updates a shared AtomicU64; we could also call some mach_* function directly.)

For reference:

cc @trinity-1686a for possible ideas, since they figured out how to make this cross-compilation work in the first place.