On Tue, 26 Jan 2021 at 01:38, Joelle van Dyne <j...@getutm.app> wrote: > > macOS 11/iOS 14 added preadv/pwritev APIs. Due to weak linking, configure > will succeed with CONFIG_PREADV even when targeting a lower OS version.
I just ran into this this afternoon. It turns out that all our OSX CI configs pass --enable-werror or equivalent to configure, which means that when the configure test provokes the warning that "'preadv' is only available on macOS 11.0 or newer", that is a compile error due to -Werror, and configure decides preadv is not available. But if you do a configure for the default setup that doesn't add -Werror then the test passes and then the binaries fail at runtime... and this is the first time I'd happened to do a build with the newer XCode SDK and without -Werror enabled. So I think that leaves two points for this patch: (1) we need to fix the configure test so that it either succeeds without warnings or fails, so that --enable-werror and --disable-werror configures make the same decision about preadv support. (2) we need to decide whether we want to support the OSX idea that you can compile in support for a function like preadv() and then find that it's not present at runtime, or if we just want to make the choice at configure time. I'm on the fence about this. I'm going to send out a patch which converts the configure test to a meson.build one-liner -- this fixes (1) and (by default) leaves the answer to (2) at "no" (you get preadv() only if you built on macOS 11 for macOS 11; if you build with 10.x support then you dont' get it). I'm agnostic about the final answer to (2) -- we do have the support for the runtime preadv_present flag in this file already, after all -- so I guess I'll leave that to the block maintainers. In the meantime we can fix the non-controversial part. thanks -- PMM