Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure with 0.11.0 release on MacOS #373

Closed
gi0baro opened this issue Mar 5, 2021 · 34 comments
Closed

Build failure with 0.11.0 release on MacOS #373

gi0baro opened this issue Mar 5, 2021 · 34 comments

Comments

@gi0baro
Copy link
Contributor

gi0baro commented Mar 5, 2021

It seems that latest release broke building targets on MacOS.

Context:

  • pyoxidizer 0.11.0
  • rust 1.50.0
  • macOS 10.14.6

The build target succeed with release 0.10.3.

Output (truncated):

pyoxidizer build --release --target-triple=x86_64-apple-darwin
resolving 1 targets
resolving target install
resolving target exe
resolving target dist
resolving Python distribution Url { url: "https://github.com/indygreg/python-build-standalone/releases/download/20210303/cpython-3.8.8-x86_64-apple-darwin-pgo-20210303T0937.tar.zst", sha256: "b87aba6f6c6abed1365cee5b73e120fc1beca35414b535ffe944136943bdc8a3" }
Python distribution available at /Users/giovanni/Development/ProntoPro/cd-tool/./build/python_distributions/cpython-3.8.8-x86_64-apple-darwin-pgo-20210303T0937.tar.zst
reading data from Python distribution...

[...]

building with Rust 1.50.0
    Updating crates.io index
   Compiling memchr v2.3.4
   Compiling once_cell v1.7.2
   Compiling regex-syntax v0.6.22
   Compiling cc v1.0.67
   Compiling libc v0.2.87
   Compiling fs_extra v1.2.0
   Compiling byteorder v1.4.2
   Compiling anyhow v1.0.38
   Compiling encoding_rs v0.8.28
   Compiling proc-macro-hack v0.5.19
   Compiling cfg-if v1.0.0
   Compiling autocfg v1.0.1
   Compiling lazy_static v1.4.0
   Compiling smallvec v1.6.1
   Compiling either v1.6.1
   Compiling same-file v1.0.6
   Compiling quoted_printable v0.4.2
   Compiling base64 v0.12.3
   Compiling pyembed v0.11.0
   Compiling cpython v0.5.2
   Compiling tugger-file-manifest v0.1.0
   Compiling dunce v1.0.1
   Compiling thread_local v1.1.3
   Compiling base64 v0.10.1
   Compiling walkdir v2.3.1
   Compiling itertools v0.10.0
   Compiling embed-resource v1.6.1
   Compiling num-traits v0.2.14
   Compiling aho-corasick v0.7.15
   Compiling python-packed-resources v0.5.0
   Compiling jemalloc-sys v0.3.2
   Compiling alfred v0.1.0 (/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/alfred)
   Compiling memmap v0.7.0
   Compiling paste-impl v0.1.18
   Compiling charset v0.1.2
   Compiling mailparse v0.13.2
   Compiling regex v1.4.3
   Compiling paste v0.1.18
   Compiling spdx v0.3.6
   Compiling tugger-licensing v0.1.0
   Compiling python-packaging v0.4.0
   Compiling python3-sys v0.5.2
   Compiling jemallocator v0.3.2
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-m64" "-arch" "x86_64" "-L" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.0.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.1.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.10.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.11.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.2.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.3.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.4.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.5.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.6.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.7.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.8.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.9.rcgu.o" "-o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/alfred" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/alfred.4vn6ezcmupjx8p50.rcgu.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/release/deps" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/build/jemalloc-sys-cc97a8e57aa21db6/out/build/lib" "-L" "/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/lib/darwin" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizer-build-exe-packaging1w160a" "-L" "/Users/giovanni/Development/ProntoPro/cd-tool/./build/python_distributions/python.b87aba6f6c6a/python/build/lib" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/artifacts" "-L" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libjemallocator-f37943904cb00a9d.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libpyembed-b9a6fb91cb9a3657.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libmemmap-c8c285284c6a0932.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libjemalloc_sys-d9a3757db5f656db.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libdunce-c5e9b78ee82be9f9.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libcpython-e765973583055114.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libpaste-d38ce5b5784be175.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libnum_traits-cf66d0025fde9c0d.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libpython_packaging-1f0435f87ba8cf06.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libitertools-a57eec996a8cc945.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libeither-7639319a24c1ce6b.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libwalkdir-3274d4d3dec30549.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libsame_file-312b7c3f4db734a3.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libpython_packed_resources-77130fe057d6663e.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libmailparse-d81cbb87b0580c26.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libquoted_printable-76fd619fe8e7b795.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libcharset-7b45e18ee5f18914.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libencoding_rs-3eb6f7d3e915f5c3.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libcfg_if-2c09d33489315c6b.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libbase64-b1a9e17536c5510e.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libbase64-fdf9c4e974d9166a.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libtugger_licensing-402ca77557399c61.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libspdx-19c36274f2b04fa3.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libregex-3dea78d0190721fd.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libthread_local-f0ed3e184ee41f51.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libonce_cell-2677ce9b9e668579.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libregex_syntax-8cbaaf8fb94140ae.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libaho_corasick-57a5daf663859cea.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libmemchr-512039b4256b8b78.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/liblazy_static-be02bd543b1a672a.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libsmallvec-bf2bbad9b17c20a6.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libtugger_file_manifest-e421c134bef57653.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libbyteorder-79457a5cbc751dc5.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libanyhow-19c0706a53df082e.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/libpython3_sys-c0c3d622228c777c.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizervKSqLu/build/target/x86_64-apple-darwin/release/deps/liblibc-6a12c3f69f3b87c2.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libstd-1356eb4a7f983e16.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-8ae047be503d7619.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libobject-ab8fafc452749532.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-f75e34ad235373a3.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libgimli-ed4b8c38c97ddcd6.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-9ca625a2899d3719.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-64c7f86b25c47576.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-4d1eb83250258253.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libunwind-46e0e02619331401.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-71dbab27ef745144.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/liblibc-8425a559f49d7df9.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/liballoc-3b6462f38288b0eb.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-820a42893aa0c85f.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libcore-cfb9ec37e32acc9c.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-36c5611c149fc184.rlib" "-framework" "AppKit" "-framework" "ApplicationServices" "-framework" "Carbon" "-framework" "CoreFoundation" "-framework" "CoreGraphics" "-framework" "CoreServices" "-framework" "IOKit" "-framework" "SystemConfiguration" "-ldl" "-lncurses" "-lclang_rt.osx" "-lpthread" "-liconv" "-lSystem" "-lresolv" "-lc" "-lm" "-rdynamic"
  = note: ld: warning: directory not found for option '-L/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizer-build-exe-packaging1w160a'
          Undefined symbols for architecture x86_64:
            "___darwin_check_fd_set_overflow", referenced from:
                _seq2set in libpyembed-b9a6fb91cb9a3657.rlib(selectmodule.o)
                _set2list in libpyembed-b9a6fb91cb9a3657.rlib(selectmodule.o)
                _QueueFileEvents in libpyembed-b9a6fb91cb9a3657.rlib(tclMacOSXNotify.o)
                _Tcl_CreateFileHandler in libpyembed-b9a6fb91cb9a3657.rlib(tclMacOSXNotify.o)
                _Tcl_DeleteFileHandler in libpyembed-b9a6fb91cb9a3657.rlib(tclMacOSXNotify.o)
                _TclUnixWaitForFile in libpyembed-b9a6fb91cb9a3657.rlib(tclMacOSXNotify.o)
                _NotifierThreadProc in libpyembed-b9a6fb91cb9a3657.rlib(tclMacOSXNotify.o)
                ...
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)


error: aborting due to previous error

I'm not able to test this on MacOS 11, it might be working.
Also, same target on linux works.

@ryancinsight
Copy link
Contributor

ryancinsight commented Mar 5, 2021

Can you try one of the other allocators? I believe there is a jemallocator issue on 10.15 so may be the same for 10.14

@gi0baro
Copy link
Contributor Author

gi0baro commented Mar 5, 2021

Can you try one of the other allocators? I believe there is a jemallocator issue on 10.15 so may be the same for 10.14

@ryancinsight tried both with mimalloc and default, same result.

@ryancinsight
Copy link
Contributor

Strange...I put a pull request in last night and it appears to use macOS 10.15 and it should build bare packages for tests...

@indygreg
Copy link
Owner

indygreg commented Mar 5, 2021 via email

@gi0baro
Copy link
Contributor Author

gi0baro commented Mar 5, 2021

As a workaround, you can probably use an older Python distribution found from https://github.com/indygreg/python-build-standalone/releases using https://pyoxidizer.readthedocs.io/en/stable/config_type_python_distribution.html#config-python-distribution-init instead of default_python_distribution(). If you tell me the last working release, that could potentially help narrow my search!

So, apparently the last working distribution on MacOS 10.14 is this one: https://github.com/indygreg/python-build-standalone/releases/tag/20201020

@indygreg in case you need more tests, just ask :)

@indygreg
Copy link
Owner

indygreg commented Mar 5, 2021

That ___darwin_check_fd_set_overflow symbol was introduced into libSystem in the 11.0 SDK. So the presence of that symbol (unless weakly linked) is troublesome. It looks like there is a reference to it in both Python's selectmodule.c and tclMacOSXNotify.c from tcl. Either is likely sufficient to cause the failure you are seeing.

The build environment is supposed to target SDK 10.9+. And the Python 3.8 build environment in CI is supposed to use the 10.15 SDK (Python 3.9 uses the 11.1 SDK). That creates the question: where is the reference to the 11.0 SDK coming from? I do know the problem is on my end because nm -u python/install/lib/libpython3.8.dylib clearly shows the undefined symbol reference in the bad build but not the good one. I just don't know how it is being introduced because the macOS 11 SDK shouldn't come into play at all during the build, as we explicitly point everything at the 10.15 SDK.

Out of curiosity, what happens when you use the new default 3.9.2 distribution? If you get an Undefined symbols for architecture x86_64: message, could you please paste it? If it isn't exactly the same, there are more issues to tackle...

@indygreg
Copy link
Owner

indygreg commented Mar 5, 2021

Here's an example log line for the build of selectmodule.c in CI:

2021-03-04T16:59:25.4673210Z cpython-3.8> clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -mmacosx-version-min=10.9 -Wno-nullability-completeness -Wno-expansion-to-defined -Wno-undef-prefix -isysroot /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -fPIC -I/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmppdwlzo5b/tools/deps/include -I/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmppdwlzo5b/tools/deps/include/ncursesw -I/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmppdwlzo5b/tools/deps/include/uuid -Werror=unguarded-availability-new   -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fprofile-instr-generate -I./Include/internal  -I. -I./Include -arch x86_64 -mmacosx-version-min=10.9 -Wno-nullability-completeness -Wno-expansion-to-defined -Wno-undef-prefix -isysroot /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -fPIC -I/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmppdwlzo5b/tools/deps/include -I/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmppdwlzo5b/tools/deps/include/ncursesw -I/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmppdwlzo5b/tools/deps/include/uuid -Werror=unguarded-availability-new   -DPy_BUILD_CORE_BUILTIN  -c ./Modules/selectmodule.c -o Modules/selectmodule.o

As we can see -mmacosx-version-min=10.9 + -isysroot /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk should be using the 10.15 SDK targeting 10.9+. selectmodule.c is likely pulling in the symbol from the FD_ZERO and FD_SET #defines.

But even if we are getting the 11.0 SDK, sys/_types/_fd_def.h declares the offending symbol as conditional on the SDK version:

int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));

So, uh, the rabbit hole goes deeper.

@indygreg
Copy link
Owner

indygreg commented Mar 5, 2021

I taught the distribution validator in python-build-standalone to sniff for this symbol and the results are peculiar:

validating dist/cpython-3.8.6-x86_64-apple-darwin-pgo-20201020T0626.tar.zst
dist/cpython-3.8.6-x86_64-apple-darwin-pgo-20201020T0626.tar.zst OK
validating dist/cpython-3.8.8-x86_64-apple-darwin-pgo-20210303T0937.tar.zst
error: python/build/Modules/readline.o references unallowed symbol ___darwin_check_fd_set_overflow
error: python/build/Modules/selectmodule.o references unallowed symbol ___darwin_check_fd_set_overflow
error: python/install/lib/libpython3.8.dylib references unallowed symbol ___darwin_check_fd_set_overflow
validating dist/cpython-3.9.2-x86_64-apple-darwin-pgo-20210303T0937.tar.zst
error: python/build/Modules/readline.o references unallowed symbol ___darwin_check_fd_set_overflow
error: python/build/Modules/selectmodule.o references unallowed symbol ___darwin_check_fd_set_overflow
error: python/install/lib/libpython3.9.dylib references unallowed symbol ___darwin_check_fd_set_overflow

It finds the symbol in selectmodule.o, which matches your linker error. But other symbols don't align. PyOxidizer appears to drop the readline extension, which is why you aren't seeing a reference to readline.o. And I'm guessing it isn't finding the symbol in tclMacOSXNotify.o because that file is part of a static library / archive, which the validation code isn't (yet) smart enough to crack open. I guess I know what I'll be doing today :)

@indygreg
Copy link
Owner

indygreg commented Mar 5, 2021

And with validation of object files within archive files (read: static libraries):

validating dist/cpython-3.8.6-x86_64-apple-darwin-pgo-20201020T0626.tar.zst
dist/cpython-3.8.6-x86_64-apple-darwin-pgo-20201020T0626.tar.zst OK
validating dist/cpython-3.8.8-x86_64-apple-darwin-pgo-20210303T0937.tar.zst
error: python/build/Modules/readline.o references unallowed symbol ___darwin_check_fd_set_overflow
error: python/build/Modules/selectmodule.o references unallowed symbol ___darwin_check_fd_set_overflow
error: python/build/lib/libncursesw.a:lib_twait.o references unallowed symbol ___darwin_check_fd_set_overflow
error: python/build/lib/libncursesw.a:tty_update.o references unallowed symbol ___darwin_check_fd_set_overflow
error: python/build/lib/libncursesw_g.a:lib_twait.o references unallowed symbol ___darwin_check_fd_set_overflow
error: python/build/lib/libncursesw_g.a:tty_update.o references unallowed symbol ___darwin_check_fd_set_overflow
error: python/build/lib/libtcl8.6.a:tclMacOSXNotify.o references unallowed symbol ___darwin_check_fd_set_overflow
error: python/install/lib/libpython3.8.dylib references unallowed symbol ___darwin_check_fd_set_overflow
error: python/install/lib/python3.8/config-3.8-darwin/libpython3.8.a:readline.o references unallowed symbol ___darwin_check_fd_set_overflow
error: python/install/lib/python3.8/config-3.8-darwin/libpython3.8.a:selectmodule.o references unallowed symbol ___darwin_check_fd_set_overflow
validating dist/cpython-3.9.2-x86_64-apple-darwin-pgo-20210303T0937.tar.zst
error: python/build/Modules/readline.o references unallowed symbol ___darwin_check_fd_set_overflow
error: python/build/Modules/selectmodule.o references unallowed symbol ___darwin_check_fd_set_overflow
error: python/build/lib/libncursesw.a:lib_twait.o references unallowed symbol ___darwin_check_fd_set_overflow
error: python/build/lib/libncursesw.a:tty_update.o references unallowed symbol ___darwin_check_fd_set_overflow
error: python/build/lib/libncursesw_g.a:lib_twait.o references unallowed symbol ___darwin_check_fd_set_overflow
error: python/build/lib/libncursesw_g.a:tty_update.o references unallowed symbol ___darwin_check_fd_set_overflow
error: python/build/lib/libtcl8.6.a:tclMacOSXNotify.o references unallowed symbol ___darwin_check_fd_set_overflow
error: python/install/lib/libpython3.9.dylib references unallowed symbol ___darwin_check_fd_set_overflow
error: python/install/lib/python3.9/config-3.9-darwin/libpython3.9.a:readline.o references unallowed symbol ___darwin_check_fd_set_overflow
error: python/install/lib/python3.9/config-3.9-darwin/libpython3.9.a:selectmodule.o references unallowed symbol ___darwin_check_fd_set_overflow

There's our missing tclMacOSXNotify.o object file!

Now to figure out how this 11.0+ SDK symbol is getting introduced in the first place...

@gi0baro
Copy link
Contributor Author

gi0baro commented Mar 5, 2021

Out of curiosity, what happens when you use the new default 3.9.2 distribution? If you get an Undefined symbols for architecture x86_64: message, could you please paste it? If it isn't exactly the same, there are more issues to tackle...

@indygreg here it is, I would say kinda the same:

building with Rust 1.50.0
    Updating crates.io index
 Downloading crates ...
  Downloaded libc v0.2.88
   Compiling memchr v2.3.4
   Compiling once_cell v1.7.2
   Compiling regex-syntax v0.6.22
   Compiling cc v1.0.67
   Compiling libc v0.2.88
   Compiling fs_extra v1.2.0
   Compiling byteorder v1.4.2
   Compiling anyhow v1.0.38
   Compiling encoding_rs v0.8.28
   Compiling proc-macro-hack v0.5.19
   Compiling cfg-if v1.0.0
   Compiling autocfg v1.0.1
   Compiling lazy_static v1.4.0
   Compiling smallvec v1.6.1
   Compiling cpython v0.5.2
   Compiling pyembed v0.11.0
   Compiling quoted_printable v0.4.2
   Compiling base64 v0.12.3
   Compiling same-file v1.0.6
   Compiling either v1.6.1
   Compiling tugger-file-manifest v0.1.0
   Compiling dunce v1.0.1
   Compiling thread_local v1.1.3
   Compiling base64 v0.10.1
   Compiling walkdir v2.3.1
   Compiling itertools v0.10.0
   Compiling embed-resource v1.6.1
   Compiling num-traits v0.2.14
   Compiling aho-corasick v0.7.15
   Compiling python-packed-resources v0.5.0
   Compiling memmap v0.7.0
   Compiling jemalloc-sys v0.3.2
   Compiling alfred v0.1.0 (/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/alfred)
   Compiling paste-impl v0.1.18
   Compiling charset v0.1.2
   Compiling mailparse v0.13.2
   Compiling regex v1.4.3
   Compiling paste v0.1.18
   Compiling spdx v0.3.6
   Compiling tugger-licensing v0.1.0
   Compiling python-packaging v0.4.0
   Compiling python3-sys v0.5.2
   Compiling jemallocator v0.3.2
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-m64" "-arch" "x86_64" "-L" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.0.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.1.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.10.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.11.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.2.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.3.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.4.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.5.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.6.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.7.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.8.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.9.rcgu.o" "-o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/alfred" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/alfred.4vn6ezcmupjx8p50.rcgu.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/release/deps" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/build/jemalloc-sys-cc97a8e57aa21db6/out/build/lib" "-L" "/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/lib/darwin" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizer-build-exe-packaging1pa8Ws" "-L" "/Users/giovanni/Development/ProntoPro/cd-tool/./build/python_distributions/python.bba27f89e6ec/python/build/lib" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/artifacts" "-L" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libjemallocator-a5e2dbdcbabf97be.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libpyembed-3799b3e586477aac.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libmemmap-8a39f2bd2400c7c2.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libjemalloc_sys-27e5c4fb4a35505f.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libdunce-c5e9b78ee82be9f9.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libcpython-52ea3db994530ba0.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libpaste-d38ce5b5784be175.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libnum_traits-cf66d0025fde9c0d.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libpython_packaging-1f0435f87ba8cf06.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libitertools-a57eec996a8cc945.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libeither-7639319a24c1ce6b.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libwalkdir-3274d4d3dec30549.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libsame_file-312b7c3f4db734a3.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libpython_packed_resources-77130fe057d6663e.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libmailparse-d81cbb87b0580c26.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libquoted_printable-76fd619fe8e7b795.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libcharset-7b45e18ee5f18914.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libencoding_rs-3eb6f7d3e915f5c3.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libcfg_if-2c09d33489315c6b.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libbase64-b1a9e17536c5510e.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libbase64-fdf9c4e974d9166a.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libtugger_licensing-402ca77557399c61.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libspdx-19c36274f2b04fa3.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libregex-3dea78d0190721fd.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libthread_local-f0ed3e184ee41f51.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libonce_cell-2677ce9b9e668579.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libregex_syntax-8cbaaf8fb94140ae.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libaho_corasick-57a5daf663859cea.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libmemchr-512039b4256b8b78.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/liblazy_static-be02bd543b1a672a.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libsmallvec-bf2bbad9b17c20a6.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libtugger_file_manifest-e421c134bef57653.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libbyteorder-79457a5cbc751dc5.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libanyhow-19c0706a53df082e.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/libpython3_sys-7843268e06d502c8.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizergPdF96/build/target/x86_64-apple-darwin/release/deps/liblibc-b0515853f408e931.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libstd-1356eb4a7f983e16.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-8ae047be503d7619.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libobject-ab8fafc452749532.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-f75e34ad235373a3.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libgimli-ed4b8c38c97ddcd6.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-9ca625a2899d3719.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-64c7f86b25c47576.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-4d1eb83250258253.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libunwind-46e0e02619331401.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-71dbab27ef745144.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/liblibc-8425a559f49d7df9.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/liballoc-3b6462f38288b0eb.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-820a42893aa0c85f.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libcore-cfb9ec37e32acc9c.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-36c5611c149fc184.rlib" "-framework" "AppKit" "-framework" "ApplicationServices" "-framework" "Carbon" "-framework" "CoreFoundation" "-framework" "CoreGraphics" "-framework" "CoreServices" "-framework" "IOKit" "-framework" "SystemConfiguration" "-ldl" "-lm" "-lncurses" "-lclang_rt.osx" "-lpthread" "-liconv" "-lSystem" "-lresolv" "-lc" "-lm" "-rdynamic"
  = note: ld: warning: directory not found for option '-L/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizer-build-exe-packaging1pa8Ws'
          Undefined symbols for architecture x86_64:
            "___darwin_check_fd_set_overflow", referenced from:
                _seq2set in libpyembed-3799b3e586477aac.rlib(selectmodule.o)
                _set2list in libpyembed-3799b3e586477aac.rlib(selectmodule.o)
                _QueueFileEvents in libpyembed-3799b3e586477aac.rlib(tclMacOSXNotify.o)
                _Tcl_CreateFileHandler in libpyembed-3799b3e586477aac.rlib(tclMacOSXNotify.o)
                _Tcl_DeleteFileHandler in libpyembed-3799b3e586477aac.rlib(tclMacOSXNotify.o)
                _TclUnixWaitForFile in libpyembed-3799b3e586477aac.rlib(tclMacOSXNotify.o)
                _NotifierThreadProc in libpyembed-3799b3e586477aac.rlib(tclMacOSXNotify.o)
                ...
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)


error: aborting due to previous error

@indygreg
Copy link
Owner

indygreg commented Mar 5, 2021

I confirmed that all object files with a reference to ___darwin_check_fd_set_overflow have the symbol declared as a weak reference. The linker should set the address of this symbol to 0 and allow the program to be linked without raising an undefined symbol error.

Perhaps the linker you are using (possibly an old one due to running on older macOS) doesn't support weak symbols? Or maybe Rust is invoking the linker to not allow weak linking (but I don't see a flag for that)?

Regardless, the symbol shouldn't be introduced in the first place on Python 3.8 builds because we're using the 10.15 SDK and that symbol isn't defined until the 11.0 SDK. Somehow the build environment is actually using an 11.0+ SDK. I thought -isysroot would replace the system root and therefore default search paths for headers. But I think the default sysroot baked into the Clang compiler is being used. I'll be looking at Clang's driver source code to get to the bottom of this...

indygreg/python-build-standalone@5b01386 is related.

@indygreg
Copy link
Owner

indygreg commented Mar 5, 2021

I wonder if we should be linking with -undefined dynamic_lookup on Darwin. The default behavior is -undefined error, which causes undefined symbols to result in a linker error, which is what you are getting.

But I thought weakly referenced symbols would bypass the undefined symbol validation in the linker because... that's essentially how weakly referenced symbols work! We also have plenty of other weakly referenced symbols in the binaries and I'm pretty sure a lot of them aren't available in 10.9-10.15 SDKs. So why is your linker only complaining about the symbol introduced by the 11.0 SDK?

I have a CI build at https://github.com/indygreg/python-build-standalone/actions/runs/625312878 that adds -v to compiler and linker flags so we should see what search paths the compiler and linker are using in CI. I suspect this is going to pick up the 11.0 SDK before the 10.15 SDK we're supposedly pointing it to.

@indygreg
Copy link
Owner

indygreg commented Mar 5, 2021

Our custom Clang build in CI is 100% using the 11.1 SDK:

2021-03-04T16:07:53.5532120Z clang> -- Found OSX_SYSROOT: /Applications/Xcode_12.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk
...
2021-03-04T16:08:15.3927430Z clang> -- Checking DARWIN_macosx_SYSROOT - '/Applications/Xcode_12.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk'
2021-03-04T16:08:20.6005860Z clang> -- Checking DARWIN_iphonesimulator_SYSROOT - '/Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk'
2021-03-04T16:08:26.1934870Z clang> -- Checking DARWIN_iphoneos_SYSROOT - '/Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk'
2021-03-04T16:08:31.6636430Z clang> -- Checking DARWIN_watchsimulator_SYSROOT - '/Applications/Xcode_12.4.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator7.2.sdk'
2021-03-04T16:08:37.0635370Z clang> -- Checking DARWIN_watchos_SYSROOT - '/Applications/Xcode_12.4.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS7.2.sdk'
2021-03-04T16:08:42.3656020Z clang> -- Checking DARWIN_appletvsimulator_SYSROOT - '/Applications/Xcode_12.4.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator14.3.sdk'
2021-03-04T16:08:47.8223980Z clang> -- Checking DARWIN_appletvos_SYSROOT - '/Applications/Xcode_12.4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.3.sdk'

These sysroots are almost certainly being baked into and used by the compiler, despite -isysroot. And I believe we need to build Clang against the 11.0+ SDK to get arm target support on macOS. We certainly need to build compiler_rt with arm support so we can PGO on arm macOS.

@indygreg
Copy link
Owner

indygreg commented Mar 5, 2021

OK. So the way mach-o does weak symbols, the linker needs to find the symbol at link time so it can record the dylib it is present in so this information can be written out.

I think this means that if we include a weakly referenced symbol from SDK version X, we'll need SDK version X present at link time (pyoxidizer build time). If not, we'll get undefined symbol errors from the linker.

I suspect we were getting lucky about this situation before because:

  1. CPython's build system learned to use __builtin_available and weak linking relatively recently. Previously unavailable symbols for the target configuration would get preprocessed away and no symbol reference would be present. So new symbols weren't being introduced and there wasn't a potential for issues.
  2. Developers tend to run modern machines / Xcode and have the latest SDKs installed.

When PyOxidizer picked up Python distributions using weak linking, we effectively imposed a requirement that a modern SDK is used with PyOxidizer. That SDK must be at least as new as whatever the Python distribution [using weak symbols] was built with. That's currently the 11.1 SDK (although 11.0 should also work as I don't believe there are any new symbols in use from 11.1). (But again I thought we were building Python 3.8 with the 10.15 SDK and I may want to fix that.)

So I think a workaround here is to build against the 11.0/11.1 SDK. Try downloading the 11.1 SDK and doing the following:

RUSTFLAGS="-C link-args='-isysroot /path/to/MacOSX11.1.sdk'" pyoxidizer build

(You can find a copy of the Apple SDKS in the [legally dubious] https://github.com/phracker/MacOSX-SDKs/ repo if you don't want to install Xcode or the command line tools to get it.)

(Edited to fix RUSTFLAGS line to include quotes.)

@indygreg
Copy link
Owner

indygreg commented Mar 5, 2021

@ronaldoussoren I figured you may "enjoy" this issue. Don't feel obliged to comment. But if you want to, your wisdom would be greatly appreciated.

@ronaldoussoren
Copy link

I don't really have anything to add, in particular because I know nothing about PyOxidiser (other than knowing it exists and some vague notion about what it does).

As others mentions __darwin_check_fd_set_overflow is a symbol introduced in the macOS 11 SDK, and shouldn't be used on older versions of the OS.

The deployment target for the installers on python.org is macOS 10.9, but that's for the compiled binaries. AFAIK those installers don't ship separate .o files for static linking (which would introduce a requirement to use a recent SDK due to weak-linking a number of symbols).

We switched to the current setup with weak linking and building with a recent SDK for two reasons: (1) M1 support requires using Xcode 12 (and its included SDK), and (2) recent compilers generate better code and can use beter optimisation features (LTO and PGO) which we couldn't use with the compilers on macOS 10.9. This also allowed us to switch to a newer and much better release of Tcl/Tk.

@gi0baro
Copy link
Contributor Author

gi0baro commented Mar 6, 2021

@indygreg quick update, tried with both 11.0 and 11.1 SDK, but it seems to be not enough to make the build successful:

building with Rust 1.50.0
    Updating crates.io index
   Compiling memchr v2.3.4
   Compiling once_cell v1.7.2
   Compiling regex-syntax v0.6.22
   Compiling cc v1.0.67
   Compiling libc v0.2.88
   Compiling fs_extra v1.2.0
   Compiling byteorder v1.4.2
   Compiling encoding_rs v0.8.28
   Compiling anyhow v1.0.38
   Compiling proc-macro-hack v0.5.19
   Compiling autocfg v1.0.1
   Compiling cfg-if v1.0.0
   Compiling smallvec v1.6.1
   Compiling lazy_static v1.4.0
   Compiling quoted_printable v0.4.2
   Compiling cpython v0.5.2
   Compiling base64 v0.12.3
   Compiling pyembed v0.11.0
   Compiling same-file v1.0.6
   Compiling either v1.6.1
   Compiling tugger-file-manifest v0.1.0
   Compiling dunce v1.0.1
   Compiling thread_local v1.1.3
   Compiling base64 v0.10.1
   Compiling walkdir v2.3.1
   Compiling itertools v0.10.0
   Compiling embed-resource v1.6.1
   Compiling num-traits v0.2.14
   Compiling aho-corasick v0.7.15
   Compiling python-packed-resources v0.5.0
   Compiling memmap v0.7.0
   Compiling jemalloc-sys v0.3.2
   Compiling alfred v0.1.0 (/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/alfred)
   Compiling paste-impl v0.1.18
   Compiling charset v0.1.2
   Compiling mailparse v0.13.2
   Compiling regex v1.4.3
   Compiling paste v0.1.18
   Compiling spdx v0.3.6
   Compiling tugger-licensing v0.1.0
   Compiling python-packaging v0.4.0
   Compiling python3-sys v0.5.2
   Compiling jemallocator v0.3.2
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-m64" "-arch" "x86_64" "-L" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.0.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.1.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.10.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.11.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.2.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.3.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.4.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.5.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.6.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.7.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.8.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.9.rcgu.o" "-o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/alfred" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/alfred.4vn6ezcmupjx8p50.rcgu.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/release/deps" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/build/jemalloc-sys-cc97a8e57aa21db6/out/build/lib" "-L" "/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/lib/darwin" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizer-build-exe-packaging8w8mVd" "-L" "/Users/giovanni/Development/ProntoPro/cd-tool/./build/python_distributions/python.b87aba6f6c6a/python/build/lib" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/artifacts" "-L" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libjemallocator-a5e2dbdcbabf97be.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libpyembed-3799b3e586477aac.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libmemmap-8a39f2bd2400c7c2.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libjemalloc_sys-27e5c4fb4a35505f.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libdunce-c5e9b78ee82be9f9.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libcpython-52ea3db994530ba0.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libpaste-d38ce5b5784be175.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libnum_traits-cf66d0025fde9c0d.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libpython_packaging-1f0435f87ba8cf06.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libitertools-a57eec996a8cc945.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libeither-7639319a24c1ce6b.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libwalkdir-3274d4d3dec30549.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libsame_file-312b7c3f4db734a3.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libpython_packed_resources-77130fe057d6663e.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libmailparse-d81cbb87b0580c26.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libquoted_printable-76fd619fe8e7b795.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libcharset-7b45e18ee5f18914.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libencoding_rs-3eb6f7d3e915f5c3.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libcfg_if-2c09d33489315c6b.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libbase64-b1a9e17536c5510e.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libbase64-fdf9c4e974d9166a.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libtugger_licensing-402ca77557399c61.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libspdx-19c36274f2b04fa3.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libregex-3dea78d0190721fd.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libthread_local-f0ed3e184ee41f51.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libonce_cell-2677ce9b9e668579.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libregex_syntax-8cbaaf8fb94140ae.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libaho_corasick-57a5daf663859cea.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libmemchr-512039b4256b8b78.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/liblazy_static-be02bd543b1a672a.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libsmallvec-bf2bbad9b17c20a6.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libtugger_file_manifest-e421c134bef57653.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libbyteorder-79457a5cbc751dc5.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libanyhow-19c0706a53df082e.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/libpython3_sys-7843268e06d502c8.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerhEakkC/build/target/x86_64-apple-darwin/release/deps/liblibc-b0515853f408e931.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libstd-1356eb4a7f983e16.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-8ae047be503d7619.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libobject-ab8fafc452749532.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-f75e34ad235373a3.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libgimli-ed4b8c38c97ddcd6.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-9ca625a2899d3719.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-64c7f86b25c47576.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-4d1eb83250258253.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libunwind-46e0e02619331401.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-71dbab27ef745144.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/liblibc-8425a559f49d7df9.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/liballoc-3b6462f38288b0eb.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-820a42893aa0c85f.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libcore-cfb9ec37e32acc9c.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-36c5611c149fc184.rlib" "-framework" "AppKit" "-framework" "ApplicationServices" "-framework" "Carbon" "-framework" "CoreFoundation" "-framework" "CoreGraphics" "-framework" "CoreServices" "-framework" "IOKit" "-framework" "SystemConfiguration" "-ldl" "-lncurses" "-lclang_rt.osx" "-lpthread" "-liconv" "-lSystem" "-lresolv" "-lc" "-lm" "-isysroot" "/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk"
  = note: ld: warning: directory not found for option '-L/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizer-build-exe-packaging8w8mVd'
          ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/System/Library/Frameworks//AppKit.framework/AppKit.tbd' for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)


error: aborting due to previous error

Question: wouldn't make sense to build x86_64 distributions for macOS with the old SDK? As far as I understand, 11 SDK is needed only for the aarch64 one. At least we can keep the build pipeline working on previous MacOS versions for the intel architecture.

@indygreg
Copy link
Owner

indygreg commented Mar 6, 2021

I don't really have anything to add, in particular because I know nothing about PyOxidiser (other than knowing it exists and some vague notion about what it does).

Thanks for chiming in @ronaldoussoren!

The tl;dr for PyOxidizer is that it uses Python distributions produced from https://github.com/indygreg/python-build-standalone which also target 10.9+ on x86_64 (11.0+ on aarch64). It uses modern Clang and all 3rd party dependencies are static libraries. In addition to the Python installs in the archives, there are also object files plus a lot of metadata describing dependencies. PyOxidizer takes the object files and links a custom libpython and embeds that into a built [Rust] binary, effectively allowing you build your own Python distribution.

I wasn't aware of the mach-o requirement that weak references be discoverable at build time (unlike ELF). In hindsight, I had been playing whack-a-mole with missing symbols errors over the months due to this. But I never realized because CPython didn't weak link until 3.9, PyOxidizer used 3.8 as the default distribution, and we got lucky with a combination of using an older SDK to build and users having modern SDKs on their machines.

@indygreg
Copy link
Owner

indygreg commented Mar 6, 2021

The plot has thickened.

tl;dr the MacOSX10.15 SDK is buggy.

I pushed a build to CI introducing -v to compiler flags. It yields results like the following:

2021-03-06T00:41:34.9916450Z cpython-3.8> clang -Wno-unused-result -Wsign-compare -g -O0 -Wall -arch x86_64 -mmacosx-version-min=10.9 -Wno-nullability-completeness -Wno-expansion-to-defined -Wno-undef-prefix -isysroot /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -v -fPIC -I/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpopdjvmb9/tools/deps/include -I/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpopdjvmb9/tools/deps/include/ncursesw -I/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpopdjvmb9/tools/deps/include/uuid -Werror=unguarded-availability-new   -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration  -I./Include/internal  -I. -I./Include -arch x86_64 -mmacosx-version-min=10.9 -Wno-nullability-completeness -Wno-expansion-to-defined -Wno-undef-prefix -isysroot /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -v -fPIC -I/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpopdjvmb9/tools/deps/include -I/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpopdjvmb9/tools/deps/include/ncursesw -I/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpopdjvmb9/tools/deps/include/uuid -Werror=unguarded-availability-new   -DMODULE_NAME=\"sqlite3\" -DSQLITE_OMIT_LOAD_EXTENSION=1 -DPy_BUILD_CORE_BUILTIN  -IModules/_sqlite -c ./Modules/_sqlite/statement.c -o Modules/statement.o
2021-03-06T00:41:34.9999100Z cpython-3.8> clang version 11.1.0
2021-03-06T00:41:35.0021770Z cpython-3.8> Target: x86_64-apple-darwin19.6.0
2021-03-06T00:41:35.0033430Z cpython-3.8> Thread model: posix
2021-03-06T00:41:35.0124920Z cpython-3.8> InstalledDir: /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpopdjvmb9/tools/clang-macos/bin
2021-03-06T00:41:35.0131900Z cpython-3.8>  (in-process)
2021-03-06T00:41:35.0162900Z cpython-3.8>  "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpopdjvmb9/tools/clang-macos/bin/clang-11" -cc1 -triple x86_64-apple-macosx10.9.0 -Wundef-prefix=TARGET_OS_ -Werror=undef-prefix -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name statement.c -mrelocation-model pic -pic-level 2 -mframe-pointer=all -fno-rounding-math -munwind-tables -faligned-alloc-unavailable -target-sdk-version=10.15.6 -fcompatibility-qualified-id-block-type-checking -target-cpu core2 -debug-info-kind=standalone -dwarf-version=2 -debugger-tuning=lldb -target-linker-version 609.8 -v -v -resource-dir /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpopdjvmb9/tools/clang-macos/lib/clang/11.1.0 -isysroot /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -isysroot /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -I /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpopdjvmb9/tools/deps/include -I /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpopdjvmb9/tools/deps/include/ncursesw -I /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpopdjvmb9/tools/deps/include/uuid -I ./Include/internal -I . -I ./Include -I /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpopdjvmb9/tools/deps/include -I /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpopdjvmb9/tools/deps/include/ncursesw -I /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpopdjvmb9/tools/deps/include/uuid -D "MODULE_NAME=\"sqlite3\"" -D SQLITE_OMIT_LOAD_EXTENSION=1 -D Py_BUILD_CORE_BUILTIN -I Modules/_sqlite -internal-isystem /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/local/include -internal-isystem /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpopdjvmb9/tools/clang-macos/lib/clang/11.1.0/include -internal-externc-isystem /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -O0 -Wno-unused-result -Wsign-compare -Wall -Wno-nullability-completeness -Wno-expansion-to-defined -Wno-undef-prefix -Werror=unguarded-availability-new -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -Wno-nullability-completeness -Wno-expansion-to-defined -Wno-undef-prefix -Werror=unguarded-availability-new -std=c99 -fdebug-compilation-dir /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpopdjvmb9/Python-3.8.8 -ferror-limit 19 -stack-protector 1 -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fmax-type-align=16 -o Modules/statement.o -x c ./Modules/_sqlite/statement.c
2021-03-06T00:41:35.0238130Z cpython-3.8> clang -cc1 version 11.1.0 based upon LLVM 11.1.0 default target x86_64-apple-darwin19.6.0
2021-03-06T00:41:35.0244610Z cpython-3.8> ignoring nonexistent directory "/Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/local/include"
2021-03-06T00:41:35.0309140Z cpython-3.8> ignoring nonexistent directory "/Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/Library/Frameworks"
2021-03-06T00:41:35.0354170Z cpython-3.8> ignoring duplicate directory "/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpopdjvmb9/tools/deps/include"
2021-03-06T00:41:35.0413690Z cpython-3.8> ignoring duplicate directory "/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpopdjvmb9/tools/deps/include/ncursesw"
2021-03-06T00:41:35.0470210Z cpython-3.8> ignoring duplicate directory "/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpopdjvmb9/tools/deps/include/uuid"
2021-03-06T00:41:35.0516500Z cpython-3.8> #include "..." search starts here:
2021-03-06T00:41:35.0592860Z cpython-3.8> #include <...> search starts here:
2021-03-06T00:41:35.0638150Z cpython-3.8>  /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpopdjvmb9/tools/deps/include
2021-03-06T00:41:35.0700090Z cpython-3.8>  /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpopdjvmb9/tools/deps/include/ncursesw
2021-03-06T00:41:35.0743590Z cpython-3.8>  /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpopdjvmb9/tools/deps/include/uuid
2021-03-06T00:41:35.0813740Z cpython-3.8>  ./Include/internal
2021-03-06T00:41:35.0849330Z cpython-3.8>  .
2021-03-06T00:41:35.0918120Z cpython-3.8>  ./Include
2021-03-06T00:41:35.0979860Z cpython-3.8>  Modules/_sqlite
2021-03-06T00:41:35.1054850Z cpython-3.8>  /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpopdjvmb9/tools/clang-macos/lib/clang/11.1.0/include
2021-03-06T00:41:35.1158150Z cpython-3.8>  /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include
2021-03-06T00:41:35.1202500Z cpython-3.8>  /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks (framework directory)
2021-03-06T00:41:35.1305140Z cpython-3.8> End of search list.

No references to the MacOSX platform SDK outside of /Applications/Xcode_12.1.1.app. That's good, as according to https://github.com/actions/virtual-environments/blob/main/images/macos/macos-10.15-Readme.md#installed-sdks the Xcode 12.1.1 install should only have the 10.15 SDK. I confirmed this by pushing a minimal GitHub Action to inspect the filesystem:

$ ls -al /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
drwxr-xr-x  5 runner  wheel  160 Mar  2 22:13 .
drwxr-xr-x  6 runner  wheel  192 Oct 24 02:19 ..
drwxr-xr-x  4 runner  wheel  128 Aug 10  2020 DriverKit19.0.sdk
drwxr-xr-x  8 runner  wheel  256 Aug 10  2020 MacOSX.sdk
lrwxr-xr-x  1 runner  wheel   10 Mar  2 22:09 MacOSX10.15.sdk -> MacOSX.sdk

But, I pushed a separate custom GitHub Action job that effectively does grep -r __darwin_check_fd_set_overflow and it reports some hits in places where I wouldn't expect:

2021-03-06T05:27:51.0222420Z /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.3.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T05:27:51.0257430Z /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T05:33:55.3546560Z /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T05:33:55.3591410Z /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T05:33:55.3718930Z /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T05:37:43.7514040Z /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS7.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T05:37:43.7610040Z /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T05:38:52.6747090Z /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T05:38:52.6884840Z /Applications/Xcode.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T05:38:58.1704660Z /Applications/Xcode.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator7.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T05:38:58.1790340Z /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T05:39:03.7816110Z /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator14.3.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T05:39:03.7905710Z /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T05:39:09.7899630Z /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T07:33:59.0749590Z /Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:33:59.0781010Z /Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:36:06.7082490Z /Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:36:06.7114270Z /Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:40:33.1919270Z /Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS6.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:40:33.1949500Z /Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:43:34.4933880Z /Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:43:34.4982400Z /Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:43:40.9867960Z /Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator6.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:43:40.9926690Z /Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:43:40.9986340Z /Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:43:45.6799430Z /Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:43:45.6862510Z /Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:47:13.9372630Z /Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:47:13.9437730Z /Applications/Xcode_11.4.1_beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:47:13.9469720Z /Applications/Xcode_11.4.1_beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:49:25.4486610Z /Applications/Xcode_11.4.1_beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:49:25.4518220Z /Applications/Xcode_11.4.1_beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:53:51.9289710Z /Applications/Xcode_11.4.1_beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS6.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:53:51.9320040Z /Applications/Xcode_11.4.1_beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:56:41.1555610Z /Applications/Xcode_11.4.1_beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:56:41.1603580Z /Applications/Xcode_11.4.1_beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:57:00.2691760Z /Applications/Xcode_11.4.1_beta.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator6.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:57:00.2750940Z /Applications/Xcode_11.4.1_beta.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:57:05.4743930Z /Applications/Xcode_11.4.1_beta.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:57:05.4817370Z /Applications/Xcode_11.4.1_beta.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:57:05.4882100Z /Applications/Xcode_11.4.1_beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:00:32.2412660Z /Applications/Xcode_11.4.1_beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:00:32.2476290Z /Applications/Xcode_11.4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:00:32.2507970Z /Applications/Xcode_11.4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:02:19.2468610Z /Applications/Xcode_11.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:02:19.2499910Z /Applications/Xcode_11.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:06:47.2237750Z /Applications/Xcode_11.4.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS6.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:06:47.2277860Z /Applications/Xcode_11.4.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:09:43.1178700Z /Applications/Xcode_11.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:09:43.8864100Z /Applications/Xcode_11.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:10:02.7684440Z /Applications/Xcode_11.4.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator6.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:10:02.7750180Z /Applications/Xcode_11.4.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:10:07.9517060Z /Applications/Xcode_11.4.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:10:07.9583080Z /Applications/Xcode_11.4.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:10:08.9112260Z /Applications/Xcode_11.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:13:38.4658960Z /Applications/Xcode_11.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:13:38.4729790Z /Applications/Xcode_11.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:15:33.3766830Z /Applications/Xcode_11.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:15:33.3871530Z /Applications/Xcode_11.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:15:33.3903970Z /Applications/Xcode_11.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:20:03.0865930Z /Applications/Xcode_11.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS6.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:20:03.0894900Z /Applications/Xcode_11.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:23:14.8128940Z /Applications/Xcode_11.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:23:14.8175900Z /Applications/Xcode_11.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:23:34.4392860Z /Applications/Xcode_11.5.0.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator6.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:23:34.4450470Z /Applications/Xcode_11.5.0.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:23:39.5815540Z /Applications/Xcode_11.5.0.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:23:39.5876080Z /Applications/Xcode_11.5.0.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:23:39.5940600Z /Applications/Xcode_11.5.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:27:08.6188080Z /Applications/Xcode_11.5.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:27:08.6249780Z /Applications/Xcode_11.5.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:29:13.9897140Z /Applications/Xcode_11.5.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:29:13.9994860Z /Applications/Xcode_11.5.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:29:14.0026250Z /Applications/Xcode_11.5.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:33:52.4342630Z /Applications/Xcode_11.5.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS6.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:33:52.4375170Z /Applications/Xcode_11.5.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:36:53.6039430Z /Applications/Xcode_11.5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:36:53.6091260Z /Applications/Xcode_11.5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:37:12.9891260Z /Applications/Xcode_11.5.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator6.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:37:12.9951830Z /Applications/Xcode_11.5.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:37:17.8942280Z /Applications/Xcode_11.5.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:37:17.9004530Z /Applications/Xcode_11.5.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:40:41.3326020Z /Applications/Xcode_11.5.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:40:41.3396530Z /Applications/Xcode_11.5.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:40:41.3459020Z /Applications/Xcode_11.5_beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:42:37.6847460Z /Applications/Xcode_11.5_beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:42:37.6950730Z /Applications/Xcode_11.5_beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:47:12.9490740Z /Applications/Xcode_11.5_beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:47:12.9624610Z /Applications/Xcode_11.5_beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS6.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:50:09.0924270Z /Applications/Xcode_11.5_beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:50:09.1023080Z /Applications/Xcode_11.5_beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:50:39.2512190Z /Applications/Xcode_11.5_beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:50:39.2568650Z /Applications/Xcode_11.5_beta.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator6.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:50:39.2629720Z /Applications/Xcode_11.5_beta.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:50:43.1547960Z /Applications/Xcode_11.5_beta.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:50:43.1609400Z /Applications/Xcode_11.5_beta.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:54:08.0189880Z /Applications/Xcode_11.5_beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:54:08.0258980Z /Applications/Xcode_11.5_beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:54:08.0326430Z /Applications/Xcode_11.6.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:56:04.1120480Z /Applications/Xcode_11.6.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:56:04.1218910Z /Applications/Xcode_11.6.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:00:30.1612150Z /Applications/Xcode_11.6.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:00:30.1725200Z /Applications/Xcode_11.6.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS6.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:03:06.7923070Z /Applications/Xcode_11.6.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:03:06.8017300Z /Applications/Xcode_11.6.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:04:00.7551730Z /Applications/Xcode_11.6.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:04:00.7602050Z /Applications/Xcode_11.6.0.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator6.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:04:00.7661630Z /Applications/Xcode_11.6.0.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:04:04.8801100Z /Applications/Xcode_11.6.0.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:04:04.8873590Z /Applications/Xcode_11.6.0.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:04:10.3328470Z /Applications/Xcode_11.6.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:04:10.3394340Z /Applications/Xcode_11.6.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:09:19.7288370Z /Applications/Xcode_11.6.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:09:19.7328440Z /Applications/Xcode_11.6.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:09:19.7426660Z /Applications/Xcode_11.6.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:13:49.2944260Z /Applications/Xcode_11.6.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:13:49.3051940Z /Applications/Xcode_11.6.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS6.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:16:16.8704670Z /Applications/Xcode_11.6.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:16:16.8799350Z /Applications/Xcode_11.6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:17:08.0970220Z /Applications/Xcode_11.6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:17:08.1020230Z /Applications/Xcode_11.6.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator6.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:17:08.1078220Z /Applications/Xcode_11.6.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:17:12.0128950Z /Applications/Xcode_11.6.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:17:12.0194000Z /Applications/Xcode_11.6.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:17:17.3562300Z /Applications/Xcode_11.6.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:17:17.3625300Z /Applications/Xcode_11.6.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:22:27.3097080Z /Applications/Xcode_11.6_beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:22:27.3129810Z /Applications/Xcode_11.6_beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:22:27.3227720Z /Applications/Xcode_11.6_beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:26:59.0291390Z /Applications/Xcode_11.6_beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:26:59.0402370Z /Applications/Xcode_11.6_beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS6.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:29:35.2690230Z /Applications/Xcode_11.6_beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:29:35.2785710Z /Applications/Xcode_11.6_beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:30:29.9277610Z /Applications/Xcode_11.6_beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:30:29.9329620Z /Applications/Xcode_11.6_beta.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator6.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:30:35.9165240Z /Applications/Xcode_11.6_beta.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:30:35.9226080Z /Applications/Xcode_11.6_beta.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:30:35.9289930Z /Applications/Xcode_11.6_beta.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:30:41.3997740Z /Applications/Xcode_11.6_beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:30:41.4057990Z /Applications/Xcode_11.6_beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:35:04.3261880Z /Applications/Xcode_11.7.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:35:04.3296780Z /Applications/Xcode_11.7.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:38:49.3413100Z /Applications/Xcode_11.7.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.7.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:38:49.3444770Z /Applications/Xcode_11.7.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:43:24.1959890Z /Applications/Xcode_11.7.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS6.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:43:24.1990700Z /Applications/Xcode_11.7.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:43:24.2082650Z /Applications/Xcode_11.7.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:44:20.6969220Z /Applications/Xcode_11.7.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:44:20.7023160Z /Applications/Xcode_11.7.0.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator6.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:44:24.9062400Z /Applications/Xcode_11.7.0.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:44:24.9120560Z /Applications/Xcode_11.7.0.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:44:31.9532590Z /Applications/Xcode_11.7.0.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:44:31.9596440Z /Applications/Xcode_11.7.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:44:31.9658130Z /Applications/Xcode_11.7.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:48:34.5945940Z /Applications/Xcode_11.7.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:48:34.5979010Z /Applications/Xcode_11.7.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:52:17.1055910Z /Applications/Xcode_11.7.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.7.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:52:17.1094670Z /Applications/Xcode_11.7.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:56:49.3707850Z /Applications/Xcode_11.7.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS6.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:56:49.3740140Z /Applications/Xcode_11.7.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:57:54.6934010Z /Applications/Xcode_11.7.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:57:54.6982530Z /Applications/Xcode_11.7.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:57:54.7032600Z /Applications/Xcode_11.7.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator6.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:57:58.5868250Z /Applications/Xcode_11.7.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:57:58.5926540Z /Applications/Xcode_11.7.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:58:05.1377960Z /Applications/Xcode_11.7.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:58:05.1451370Z /Applications/Xcode_11.7.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:58:05.1510930Z /Applications/Xcode_11.7.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:01:54.8708270Z /Applications/Xcode_11.7_beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:01:54.8742570Z /Applications/Xcode_11.7_beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:05:12.8460840Z /Applications/Xcode_11.7_beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.7.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:05:12.8497010Z /Applications/Xcode_11.7_beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:09:30.0280650Z /Applications/Xcode_11.7_beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS6.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:09:30.0311750Z /Applications/Xcode_11.7_beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:11:30.3438780Z /Applications/Xcode_11.7_beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:11:30.3491470Z /Applications/Xcode_11.7_beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:11:30.3544230Z /Applications/Xcode_11.7_beta.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator6.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:11:34.7441830Z /Applications/Xcode_11.7_beta.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:11:34.7501110Z /Applications/Xcode_11.7_beta.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:11:41.6687910Z /Applications/Xcode_11.7_beta.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator13.4.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:11:41.6758550Z /Applications/Xcode_11.7_beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:15:12.6093760Z /Applications/Xcode_11.7_beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:15:12.6192800Z /Applications/Xcode_12.0.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.0.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:15:12.6226400Z /Applications/Xcode_12.0.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:18:13.5031240Z /Applications/Xcode_12.0.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:18:13.5068800Z /Applications/Xcode_12.0.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:24:48.6552060Z /Applications/Xcode_12.0.1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:24:48.6581440Z /Applications/Xcode_12.0.1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS7.0.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:29:21.5969990Z /Applications/Xcode_12.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:29:21.6016900Z /Applications/Xcode_12.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:29:44.3690760Z /Applications/Xcode_12.0.1.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator7.0.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:29:44.3774200Z /Applications/Xcode_12.0.1.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:29:48.5840050Z /Applications/Xcode_12.0.1.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:29:55.6866280Z /Applications/Xcode_12.0.1.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator14.0.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:29:55.6980140Z /Applications/Xcode_12.0.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:30:04.8549680Z /Applications/Xcode_12.0.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:35:31.1593070Z /Applications/Xcode_12.1.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.0.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:38:46.9856540Z /Applications/Xcode_12.1.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:38:46.9960560Z /Applications/Xcode_12.1.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:38:46.9997800Z /Applications/Xcode_12.1.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.1.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:45:31.0314200Z /Applications/Xcode_12.1.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:49:54.2332350Z /Applications/Xcode_12.1.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS7.0.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:49:54.2432510Z /Applications/Xcode_12.1.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:50:24.6247200Z /Applications/Xcode_12.1.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:50:24.6304350Z /Applications/Xcode_12.1.0.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator7.0.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:50:30.8729920Z /Applications/Xcode_12.1.0.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:50:30.8812150Z /Applications/Xcode_12.1.0.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:50:36.7556500Z /Applications/Xcode_12.1.0.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator14.0.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:50:47.3351080Z /Applications/Xcode_12.1.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:50:47.3454440Z /Applications/Xcode_12.1.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.1.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:59:35.9017080Z /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T10:59:35.9058370Z /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T10:59:35.9161410Z /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T11:05:58.8347830Z /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T11:10:56.3652870Z /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T11:10:56.3691550Z /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS7.1.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T11:10:56.3787430Z /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T11:11:48.2612580Z /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T11:11:48.2665370Z /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator7.1.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T11:11:55.8554630Z /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T11:11:55.8636770Z /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T11:12:00.4323840Z /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator14.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T11:12:05.3418930Z /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T11:16:39.0102220Z /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T11:18:53.9368500Z /Applications/Xcode_12.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.0.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T11:18:53.9403830Z /Applications/Xcode_12.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));

(This is partial output because grep timed out after 6 hours.)

Here are just the MacOSX SDKs with that function declaration:

2021-03-06T05:37:43.7610040Z /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T05:38:52.6747090Z /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
2021-03-06T07:43:34.4933880Z /Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:43:34.4982400Z /Applications/Xcode_11.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:56:41.1555610Z /Applications/Xcode_11.4.1_beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T07:56:41.1603580Z /Applications/Xcode_11.4.1_beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:09:43.1178700Z /Applications/Xcode_11.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:09:43.8864100Z /Applications/Xcode_11.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:23:14.8128940Z /Applications/Xcode_11.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:23:14.8175900Z /Applications/Xcode_11.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:36:53.6039430Z /Applications/Xcode_11.5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:36:53.6091260Z /Applications/Xcode_11.5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:50:09.1023080Z /Applications/Xcode_11.5_beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T08:50:39.2512190Z /Applications/Xcode_11.5_beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:03:06.8017300Z /Applications/Xcode_11.6.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:04:00.7551730Z /Applications/Xcode_11.6.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:16:16.8799350Z /Applications/Xcode_11.6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:17:08.0970220Z /Applications/Xcode_11.6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:29:35.2785710Z /Applications/Xcode_11.6_beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:30:29.9277610Z /Applications/Xcode_11.6_beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:43:24.2082650Z /Applications/Xcode_11.7.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:44:20.6969220Z /Applications/Xcode_11.7.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:57:54.6934010Z /Applications/Xcode_11.7.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T09:57:54.6982530Z /Applications/Xcode_11.7.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:11:30.3438780Z /Applications/Xcode_11.7_beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:11:30.3491470Z /Applications/Xcode_11.7_beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:29:21.5969990Z /Applications/Xcode_12.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:29:21.6016900Z /Applications/Xcode_12.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:49:54.2432510Z /Applications/Xcode_12.1.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T10:50:24.6247200Z /Applications/Xcode_12.1.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T11:10:56.3787430Z /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
2021-03-06T11:11:48.2612580Z /Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));

We also see a reference to the symbol in the Xcode 12.1.1 / SDK 10.15 libSystem.tbd:

/Applications/Xcode_12.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd:                       ___connect, ___connect_nocancel, ___copyfile, ___csrctl, ___darwin_check_fd_set_overflow,

I ran jq '[input_filename, .CanonicalName]' /Applications/Xcode*/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/*/SDKSettings.json on a 10.15 GitHub Actions worker and verified the the SDK versions are what they claim to me. (I was concerned the installed SDKs were improperly annotated or something, but that doesn't appear to be the case.)

If you look at sys/_types/_fd_def.h in the 10.15 SDK, there are no preprocessor or api availability guards. If you search the internet for __darwin_check_fd_set_overflow you get a lot of people complaining about this missing symbol. A lot of the links are very shallow in technical analysis, however. https://openradar.appspot.com/FB7647406 is worth the read and contains a reply from an Apple employee indicating that API availability guards were added.

So as far as I can tell Apple shipped buggy MacOSX 10.15 SDKs by failing to add API availability annotations to __darwin_check_fd_set_overflow. This issue was corrected in the 11.0 SDK (according to my grepping of installed SDKs on a GitHub Actions runner).

So it appears the 10.15 SDK is (forever?) buggy and isn't safe for some use cases, including PyOxidizer's.

I'll have to think about next steps here. I really want to have weakly referenced symbols in the Python distributions because Python and other dependencies can take advantage of modern Apple APIs (this can have performance implications). But I recognize not everybody has a modern Xcode / SDK sitting around and this could make PyOxidizer harder to use. There's also the issue where @gi0baro couldn't get things to link against the 11.x SDK. But I'm optimistic that's either due to the bugged SDK (I'm unsure if the API availability guards make it into mach-o or what) or not passing the right linker arguments to actually pull in the 11.x SDK frameworks. More investigation is still needed.

@indygreg
Copy link
Owner

indygreg commented Mar 6, 2021

@gi0baro could you please run the following and let me know if you have any success with any of them or if the output looks interesting:

# It isn't clear -isysroot works with the way Rust invokes the linker. Let's try -syslibroot instead.
RUSTFLAGS="-C link-args='--verbose -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk'" pyoxidizer build

# Let's try explicitly adding the usr/lib directory from the SDK in case -syslibroot doesn't work.
RUSTFLAGS="-C link-args='--verbose -L/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/lib'" pyoxidizer build

While I'm here, weak references in mach-o files appear to only have their associated library defined in a two-level namespace image indicated by MH_TWOLEVEL in the mach-o header. Concretely, it appears the .o files don't have their library name annotated but the .dylib files do.

Now, if you can tell Clang which library each weak symbol is in without Clang insisting on finding it itself (perhaps you can do this with a linker script?), PyOxidizer could parse libpython.dylib for the associated library name and dynamically generate linker args/script so you don't need libraries/SDKs with those symbols available on the building system in order to link. Threading all of this through Rust's compiler could... be an adventure, but I think it is doable.

@indygreg
Copy link
Owner

indygreg commented Mar 6, 2021

Another potential idea is to generate a custom library defining all the weak symbols, have Rust link against that to appease the linker symbol requirements, then re-write the resulting mach-o file so the weak references refer to the appropriate library. (If the binary already has LC_LOAD_DYLIB commands for each library, you should be able to rewrite the file in place, as this is a matter of updating the high 8 bits of the nlist.n_desc field in the symbol table to point to the correct offset of the LC_LOAD_DYLIB command. Although you probably want to strip the placeholder library. I'll have to think this through.)

indygreg added a commit to indygreg/python-build-standalone that referenced this issue Mar 6, 2021
See the inline comment and indygreg/PyOxidizer#373
for more context. The goal of this change is to get rid of the reference to
__darwin_check_fd_set_overflow to restore working Python distributions
for PyOxidizer. This is far from a long-term solution as we need to
handle weak symbols more robustly for Python 3.9+. But it seems
appropriate for Python 3.8 builds, as the introduction of this symbol
was a "regression" when we transitioned to GitHub Actions and apparently
introduced the buggy SDK.
@gi0baro
Copy link
Contributor Author

gi0baro commented Mar 6, 2021

@indygreg

can't use -syslibroot:

RUSTFLAGS='-C link-arg=--verbose -C link-arg=-syslibroot -C link-arg=/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk' pyoxidizer build --release --target-triple=x86_64-apple-darwin
[...]
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-m64" "-arch" "x86_64" "-L" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.0.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.1.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.10.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.11.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.2.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.3.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.4.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.5.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.6.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.7.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.8.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.9.rcgu.o" "-o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/alfred" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/alfred.4vn6ezcmupjx8p50.rcgu.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/release/deps" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/build/jemalloc-sys-cc97a8e57aa21db6/out/build/lib" "-L" "/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/lib/darwin" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizer-build-exe-packaging7j7Cvj" "-L" "/Users/giovanni/Development/ProntoPro/cd-tool/./build/python_distributions/python.b87aba6f6c6a/python/build/lib" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/artifacts" "-L" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libjemallocator-a5e2dbdcbabf97be.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libpyembed-3799b3e586477aac.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libmemmap-8a39f2bd2400c7c2.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libjemalloc_sys-27e5c4fb4a35505f.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libdunce-c5e9b78ee82be9f9.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libcpython-52ea3db994530ba0.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libpaste-d38ce5b5784be175.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libnum_traits-cf66d0025fde9c0d.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libpython_packaging-1f0435f87ba8cf06.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libitertools-a57eec996a8cc945.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libeither-7639319a24c1ce6b.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libwalkdir-3274d4d3dec30549.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libsame_file-312b7c3f4db734a3.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libpython_packed_resources-77130fe057d6663e.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libmailparse-d81cbb87b0580c26.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libquoted_printable-76fd619fe8e7b795.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libcharset-7b45e18ee5f18914.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libencoding_rs-3eb6f7d3e915f5c3.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libcfg_if-2c09d33489315c6b.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libbase64-b1a9e17536c5510e.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libbase64-fdf9c4e974d9166a.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libtugger_licensing-402ca77557399c61.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libspdx-19c36274f2b04fa3.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libregex-3dea78d0190721fd.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libthread_local-f0ed3e184ee41f51.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libonce_cell-2677ce9b9e668579.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libregex_syntax-8cbaaf8fb94140ae.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libaho_corasick-57a5daf663859cea.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libmemchr-512039b4256b8b78.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/liblazy_static-be02bd543b1a672a.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libsmallvec-bf2bbad9b17c20a6.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libtugger_file_manifest-e421c134bef57653.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libbyteorder-79457a5cbc751dc5.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libanyhow-19c0706a53df082e.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/libpython3_sys-7843268e06d502c8.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerQ1wjwA/build/target/x86_64-apple-darwin/release/deps/liblibc-b0515853f408e931.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libstd-1356eb4a7f983e16.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-8ae047be503d7619.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libobject-ab8fafc452749532.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-f75e34ad235373a3.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libgimli-ed4b8c38c97ddcd6.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-9ca625a2899d3719.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-64c7f86b25c47576.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-4d1eb83250258253.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libunwind-46e0e02619331401.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-71dbab27ef745144.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/liblibc-8425a559f49d7df9.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/liballoc-3b6462f38288b0eb.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-820a42893aa0c85f.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libcore-cfb9ec37e32acc9c.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-36c5611c149fc184.rlib" "-framework" "AppKit" "-framework" "ApplicationServices" "-framework" "Carbon" "-framework" "CoreFoundation" "-framework" "CoreGraphics" "-framework" "CoreServices" "-framework" "IOKit" "-framework" "SystemConfiguration" "-ldl" "-lncurses" "-lclang_rt.osx" "-lpthread" "-liconv" "-lSystem" "-lresolv" "-lc" "-lm" "--verbose" "-syslibroot" "/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk"
  = note: clang: error: unknown argument: '-syslibroot'
          Apple LLVM version 10.0.1 (clang-1001.0.46.4)
          Target: x86_64-apple-darwin18.7.0
          Thread model: posix
          InstalledDir: /Library/Developer/CommandLineTools/usr/bin


error: aborting due to previous error

while -L shows the same output of -isysroot

RUSTFLAGS='-C link-arg=--verbose -C link-arg=-L/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/lib' pyoxidizer build --release --target-triple=x86_64-apple-darwin
[...]
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-m64" "-arch" "x86_64" "-L" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.0.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.1.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.10.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.11.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.2.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.3.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.4.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.5.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.6.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.7.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.8.rcgu.o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.9.rcgu.o" "-o" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.4vn6ezcmupjx8p50.rcgu.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/release/deps" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/build/jemalloc-sys-cc97a8e57aa21db6/out/build/lib" "-L" "/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/lib/darwin" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizer-build-exe-packagingRwtmzE" "-L" "/Users/giovanni/Development/ProntoPro/cd-tool/./build/python_distributions/python.b87aba6f6c6a/python/build/lib" "-L" "/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/artifacts" "-L" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libjemallocator-a5e2dbdcbabf97be.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libpyembed-3799b3e586477aac.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libmemmap-8a39f2bd2400c7c2.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libjemalloc_sys-27e5c4fb4a35505f.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libdunce-c5e9b78ee82be9f9.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libcpython-52ea3db994530ba0.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libpaste-d38ce5b5784be175.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libnum_traits-cf66d0025fde9c0d.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libpython_packaging-1f0435f87ba8cf06.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libitertools-a57eec996a8cc945.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libeither-7639319a24c1ce6b.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libwalkdir-3274d4d3dec30549.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libsame_file-312b7c3f4db734a3.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libpython_packed_resources-77130fe057d6663e.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libmailparse-d81cbb87b0580c26.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libquoted_printable-76fd619fe8e7b795.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libcharset-7b45e18ee5f18914.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libencoding_rs-3eb6f7d3e915f5c3.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libcfg_if-2c09d33489315c6b.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libbase64-b1a9e17536c5510e.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libbase64-fdf9c4e974d9166a.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libtugger_licensing-402ca77557399c61.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libspdx-19c36274f2b04fa3.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libregex-3dea78d0190721fd.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libthread_local-f0ed3e184ee41f51.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libonce_cell-2677ce9b9e668579.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libregex_syntax-8cbaaf8fb94140ae.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libaho_corasick-57a5daf663859cea.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libmemchr-512039b4256b8b78.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/liblazy_static-be02bd543b1a672a.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libsmallvec-bf2bbad9b17c20a6.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libtugger_file_manifest-e421c134bef57653.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libbyteorder-79457a5cbc751dc5.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libanyhow-19c0706a53df082e.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libpython3_sys-7843268e06d502c8.rlib" "/private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/liblibc-b0515853f408e931.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libstd-1356eb4a7f983e16.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-8ae047be503d7619.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libobject-ab8fafc452749532.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-f75e34ad235373a3.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libgimli-ed4b8c38c97ddcd6.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-9ca625a2899d3719.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-64c7f86b25c47576.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-4d1eb83250258253.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libunwind-46e0e02619331401.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-71dbab27ef745144.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/liblibc-8425a559f49d7df9.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/liballoc-3b6462f38288b0eb.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-820a42893aa0c85f.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libcore-cfb9ec37e32acc9c.rlib" "/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-36c5611c149fc184.rlib" "-framework" "AppKit" "-framework" "ApplicationServices" "-framework" "Carbon" "-framework" "CoreFoundation" "-framework" "CoreGraphics" "-framework" "CoreServices" "-framework" "IOKit" "-framework" "SystemConfiguration" "-ldl" "-lncurses" "-lclang_rt.osx" "-lpthread" "-liconv" "-lSystem" "-lresolv" "-lc" "-lm" "--verbose" "-L/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/lib"
  = note: Apple LLVM version 10.0.1 (clang-1001.0.46.4)
          Target: x86_64-apple-darwin18.7.0
          Thread model: posix
          InstalledDir: /Library/Developer/CommandLineTools/usr/bin
           "/Library/Developer/CommandLineTools/usr/bin/ld" -demangle -lto_library /Library/Developer/CommandLineTools/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.14.0 -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -o /var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred -L/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib -L/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps -L/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/release/deps -L/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/build/jemalloc-sys-cc97a8e57aa21db6/out/build/lib -L/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/lib/darwin -L/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizer-build-exe-packagingRwtmzE -L/Users/giovanni/Development/ProntoPro/cd-tool/./build/python_distributions/python.b87aba6f6c6a/python/build/lib -L/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/artifacts -L/usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib -L/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/lib /var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.0.rcgu.o /var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.1.rcgu.o /var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.10.rcgu.o /var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.11.rcgu.o /var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.2.rcgu.o /var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.3.rcgu.o /var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.4.rcgu.o /var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.5.rcgu.o /var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.6.rcgu.o /var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.7.rcgu.o /var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.8.rcgu.o /var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.alfred.86kylpbd-cgu.9.rcgu.o /var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/alfred.4vn6ezcmupjx8p50.rcgu.o -dead_strip /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libjemallocator-a5e2dbdcbabf97be.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libpyembed-3799b3e586477aac.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libmemmap-8a39f2bd2400c7c2.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libjemalloc_sys-27e5c4fb4a35505f.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libdunce-c5e9b78ee82be9f9.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libcpython-52ea3db994530ba0.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libpaste-d38ce5b5784be175.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libnum_traits-cf66d0025fde9c0d.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libpython_packaging-1f0435f87ba8cf06.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libitertools-a57eec996a8cc945.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libeither-7639319a24c1ce6b.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libwalkdir-3274d4d3dec30549.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libsame_file-312b7c3f4db734a3.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libpython_packed_resources-77130fe057d6663e.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libmailparse-d81cbb87b0580c26.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libquoted_printable-76fd619fe8e7b795.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libcharset-7b45e18ee5f18914.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libencoding_rs-3eb6f7d3e915f5c3.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libcfg_if-2c09d33489315c6b.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libbase64-b1a9e17536c5510e.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libbase64-fdf9c4e974d9166a.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libtugger_licensing-402ca77557399c61.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libspdx-19c36274f2b04fa3.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libregex-3dea78d0190721fd.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libthread_local-f0ed3e184ee41f51.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libonce_cell-2677ce9b9e668579.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libregex_syntax-8cbaaf8fb94140ae.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libaho_corasick-57a5daf663859cea.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libmemchr-512039b4256b8b78.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/liblazy_static-be02bd543b1a672a.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libsmallvec-bf2bbad9b17c20a6.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libtugger_file_manifest-e421c134bef57653.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libbyteorder-79457a5cbc751dc5.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libanyhow-19c0706a53df082e.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/libpython3_sys-7843268e06d502c8.rlib /private/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizerrh2qLE/build/target/x86_64-apple-darwin/release/deps/liblibc-b0515853f408e931.rlib /usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libstd-1356eb4a7f983e16.rlib /usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-8ae047be503d7619.rlib /usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libobject-ab8fafc452749532.rlib /usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-f75e34ad235373a3.rlib /usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libgimli-ed4b8c38c97ddcd6.rlib /usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-9ca625a2899d3719.rlib /usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-64c7f86b25c47576.rlib /usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-4d1eb83250258253.rlib /usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libunwind-46e0e02619331401.rlib /usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-71dbab27ef745144.rlib /usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/liblibc-8425a559f49d7df9.rlib /usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/liballoc-3b6462f38288b0eb.rlib /usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-820a42893aa0c85f.rlib /usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libcore-cfb9ec37e32acc9c.rlib /usr/local/Cellar/rust/1.50.0/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-36c5611c149fc184.rlib -framework AppKit -framework ApplicationServices -framework Carbon -framework CoreFoundation -framework CoreGraphics -framework CoreServices -framework IOKit -framework SystemConfiguration -ldl -lncurses -lclang_rt.osx -lpthread -liconv -lSystem -lresolv -lc -lm -L/usr/local/lib
          ld: warning: directory not found for option '-L/var/folders/k9/_w6k8j8170zggr5jpq9g4bl00000gn/T/pyoxidizer-build-exe-packagingRwtmzE'
          ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/lib/libncurses.tbd' for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)


error: aborting due to previous error

@indygreg
Copy link
Owner

indygreg commented Mar 6, 2021

I just realized cargo accepts an SDKROOT environment variable. Try this:

SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk pyoxidizer build

And can you also try throwing MACOS_DEPLOYMENT_TARGET=10.9 (or insert your own version) in there as well to see if that has an effect. (Although I don't think it will, since the symbol is always going to be present in the .o files being linked. But it can't hurt to try.)

indygreg added a commit to indygreg/python-build-standalone that referenced this issue Mar 6, 2021
See the inline comment and indygreg/PyOxidizer#373
for more context. The goal of this change is to get rid of the reference to
__darwin_check_fd_set_overflow to restore working Python distributions
for PyOxidizer. This is far from a long-term solution as we need to
handle weak symbols more robustly for Python 3.9+. But it seems
appropriate for Python 3.8 builds, as the introduction of this symbol
was a "regression" when we transitioned to GitHub Actions and apparently
introduced the buggy SDK.
@gi0baro
Copy link
Contributor Author

gi0baro commented Mar 6, 2021

@indygreg it's just the same, the only difference is that for several other packages I get the error

ld: unsupported tapi file type '!tapi-tbd' in YAML file ...

for several files in the SDK. Seems pretty clear that SDK 11.1 is not compatible with MacOS 10.14 (which kinda make sense to me).

@indygreg
Copy link
Owner

indygreg commented Mar 7, 2021

Yeah, it looks like the older linker isn't able to read the .tbd files in the newer SDK. And that's likely causing the failure to link against the newer SDK. I'm convinced that if you pointed a more modern clang/linker at the 11.0 (or even 10.15) SDK, things would just work. Although there are tons of bug reports for random projects regarding __darwin_check_fd_set_overflow, so it is still possible many versions of the SDK are just bugged. It is possible the .tbd file could be bugged. But I'm unsure how .tbd files work.

Relatedly, I wonder what the compatibility story is for Clang versions and .tbd files / SDK versions. We should at the very least document minimum toolchain / SDK versions in the user docs. Ideally we add run-time detection to detect outdated requirements and abort the build in a more user-friendly way.

Anyway, I updated python-build-standalone to build Python 3.8 with an older, non-bugged version of the 10.15 SDK. The __darwin_check_fd_set_overflow symbol is gone and you may be able to build with the newer Python 3.8 distributions. You can try grabbing a build from https://github.com/indygreg/python-build-standalone/actions/runs/627915400 or https://github.com/indygreg/python-build-standalone/actions/runs/628307728 and verifying. Note that the PGO build on the first failed intermittently and the distribution isn't available. And distributions with lto in their name are not compatible with PyOxidizer (because LTO .o files are LLVM bitcode instead of mach-o and must be linked with the LLVM version that produced them, making them not very portable). A debug build should be functionally the same as a pgo build from the linker perspective if you want to test that.

@ronaldoussoren
Copy link

Linking _ctypes also requires the macOS 11 SDK if you want to run ctypes on macOS 11. MacOS 11 introduced a shared library "cache" that contains all system shared libraries, _ctypes uses a function introduced in macOS 11 to check if a library is present in that cache. This affects both arm64 and x86_64.

@indygreg
Copy link
Owner

indygreg commented Mar 7, 2021

OK, having researched this a bit more, Apple SDKs use .tbd files to describe libraries to link against. These .tbd files are just YAML files describing properties of the library, like the target architectures it supports, its installed path, version, and a list of symbols it exports.

Symbol exports are often just the string name of the symbol. But they can also include special syntax to indicate a weakly referenced symbol and the minimal SDK version that is supported. e.g. $ld$weak$os10.11$_clock_getres seemingly indicates that _clock_getres should be weakly linked and is only available on certain macOS versions. Indeed man clock_getres says These functions first appeared in Mac OSX 10.12. So I guess the instruction effectively says "weakly link when targeting 10.11 and below, strong link when targeting 10.12."

The YAML-based .tbd files have multiple versions of the schema used to describe dylibs. I'm convinced that's what happening on @gi0baro's machine is the older Clang can't parse the newer .tbd files. The linker thus can't read the 10.15 or 11.0 SDK versions of libSystem.tbd where the __darwin_check_fd_set_overflow symbol export is defined, thus leading to an unresolved symbol error.

The main implication for PyOxidizer is that end-user machines will only be able to link Python distributions if their Clang/linker is able to read .tbd files from SDKs for all external symbols in linked object files. In other words, every symbol from a progressively newer SDK version creates not only a dependency on that SDK versions being present on the end-user machine, but also a potential dependency on a newer version of Clang.

We probably want to start annotating SDK version dependencies in the Python distributions.

We almost certainly want to be validating minimum SDK / toolchain requirements in PyOxidizer when building so end-users avoid cryptic linker errors.

There's still an open question on what the minimum version requirements should be. I'd really like to keep the Python distributions modern. But would requiring a 10.15 or 11.0 SDK / Xcode / Developer command line tools effectively prevent users on older macOS versions from using PyOxidizer? (I haven't kept up on the state of what it is like to run an older macOS version. I know people do it. But I have no clue if Apple supports newer versions of developer tools on older macOS releases.)

@indygreg
Copy link
Owner

indygreg commented Mar 7, 2021

Oh, interestingly the definition of the __darwin_check_fd_set_overflow export in the 10.15 and 11.1 SDKs' libSystem.tbd doesn't annotate it as weak. I installed the Command Line Tools for Xcode 12.5 beta 3 (released a few days ago) and its 11.3 SDK has the same export. I'm unsure if this is a bug or not. It is quite possible that the presence of the weak reference annotation on the object file is sufficient to introduce weak linking in the final binary. If this is the case, I'm curious why that $ld$weak$os<version>$ syntax exists in the .tbd file! The max macOS version referenced I could find in any .tbd in the 11.3 SDK is 10.12 (meaning 10.13+ required). New symbols are getting introduced in every OS / SDK release. So I suspect somewhere along the way Apple changed the semantics for how the linker handles weak symbols and the .tbd $ld$weak$` annotation is no longer used.

@indygreg
Copy link
Owner

indygreg commented Mar 8, 2021

I have committed a tugger-apple crate to this repo for obtaining metadata about Apple tooling. It has functions for doing things like find all Apple SDKs installed on the system. The goal is to hook this up to PyOxidizer to sniff out SDK versions and enforce minimum version requirements. (I feel like this functionality should have already existed in another generic crate somewhere but I couldn't find it. The closest I found was https://crates.io/crates/xcrun, which just calls out into xcrun. My crate does that for resolving the default developer directory. But my crate also walks the filesystem for SDKs and reads the SDKSettings.json file in each SDK to extract metadata about the SDK.)

I have also committed a text-stub-library crate to this repo for (de)serializing .tbd files. I tested it against every .tbd file in every Apple SDK on GitHub Actions runners and it works (hey - a use for the tugger-apple crate!). So I'm fairly confident it can parse all modern Apple SDKs.

Did I need to write the .tbd parser? Probably not. But I couldn't find an existing crate for parsing .tbd files and figured I'd contribute something more to the Rust ecosystem. I also started a conversation at m4b/goblin#265 about teaching goblin to parse .tbd files.

A potential mad scientist idea we could explore is generating custom .tbd files so a client could link without a modern SDK. This feels a bit brittle, however, and is probably more trouble that it is worth. I think the path of least resistance is enforcing a minimum SDK / toolchain requirement when relinking the Python distributions.

indygreg added a commit to indygreg/python-build-standalone that referenced this issue Mar 8, 2021
indygreg/PyOxidizer#373 has revealed issues
relinking the Python distributions on older Apple SDKs and Clang
toolchains. In order to help downstream consumers validate they are
using a sufficiently modern SDK and toolchain, this commit adds metadata
to the Python distribution to advertise information about the Apple
SDK used to build and its targeting settings.

As part of this, we teach the Rust validation code to ensure fields
are present on Apple triples.
indygreg added a commit to indygreg/python-build-standalone that referenced this issue Mar 8, 2021
indygreg/PyOxidizer#373 has revealed issues
relinking the Python distributions on older Apple SDKs and Clang
toolchains. In order to help downstream consumers validate they are
using a sufficiently modern SDK and toolchain, this commit adds metadata
to the Python distribution to advertise information about the Apple
SDK used to build and its targeting settings.

As part of this, we teach the Rust validation code to ensure fields
are present on Apple triples.
indygreg added a commit to indygreg/python-build-standalone that referenced this issue Mar 8, 2021
indygreg/PyOxidizer#373 has revealed issues
relinking the Python distributions on older Apple SDKs and Clang
toolchains. In order to help downstream consumers validate they are
using a sufficiently modern SDK and toolchain, this commit adds metadata
to the Python distribution to advertise information about the Apple
SDK used to build and its targeting settings.

As part of this, we teach the Rust validation code to ensure fields
are present on Apple triples.
@indygreg
Copy link
Owner

indygreg commented Mar 8, 2021

The Python distributions now advertise Apple SDK metadata.

I have some commits queued up to teach PyOxidizer to use this metadata to automatically locate, validate, and use a compatible Apple SDK. This means we'll be imposing the requirement of the 10.15 SDK for Python 3.8 and the 11.0 SDK for Python 3.9. And the modern SDKs are incompatible with sufficiently old Clang versions. So this effectively bumps the minimum required Clang on Apple platforms. (Although it is unclear which Apple Clang versions support the newer TBD file formats - I may have to download a bunch of old Xcode Commandline Tools packages to find out.)

PyOxidizer will respect the SDKROOT environment variable if people want to play with fire and opt into a lesser SDK.

I think this solution strikes the appropriate balance between build correctness, build success rate, and end-user experience. I anticipate the only people negatively impacted by this will be those running older macOS versions. While sympathetic to that population, that is a vanishingly small segment of the developer user segment. We can accommodate affected users through documentation and actionable error messages, which I'll try to do.

indygreg added a commit to indygreg/python-build-standalone that referenced this issue Mar 8, 2021
These patches were added to avoid introducing symbols from
modern macOS SDKs because of linking issues when using an
older SDK.

With the investigation in indygreg/PyOxidizer#373
and the conclusion to require a minimum SDK version to relink, it
should be safe to introduce these symbols back into the binaries.

I'm pretty certain that the symbol mentioned inline is already
being pulled in by CPython 3.9 anyway. So these patches were
arguably already out of date before the aforementioned policy
change.
@yasyf
Copy link

yasyf commented Apr 21, 2021

@indygreg just a heads up, the one place this might impact people is those who run PyOxidizer on CircleCI (or any CI service), as they don't yet support macOS images with 11.0, so we're stuck on 10.15.

We want to keep building with Python 3.9, so for now we're working around this by locking the PyOxidizer version to 0.11.0 and using the 20210303 PythonDistribution of Python 3.9.2. This works, but just wanted to give a heads up!

@indygreg
Copy link
Owner

Are you still having trouble with the latest release (0.13.2)? I thought I had sorted out all these macOS issues. The CI for PyOxidizer itself is working just fine on GitHub Actions on 10.15.

The only hurdle should be ensuring you have access to a new-enough SDK to build against. But it needed, I can teach PyOxidizer to search for the SDK in non-standard directories when certain CI environment variables are defined to make it more turnkey.

Perhaps a new issue should be opened documenting your exact problems on 0.13.2?

@yasyf
Copy link

yasyf commented Apr 21, 2021

@indygreg ah, I didn't realize it was possible to just pull in the 11.0 SDK on macOS 10.15. Makes sense in hindsight. Are there docs on this somewhere? No worries if not, I'll figure it out! Thanks for the pointer :)

@indygreg
Copy link
Owner

Usually CI platforms have ~all versions of Apple SDKs available somewhere. e.g. GitHub Actions: https://github.com/actions/virtual-environments/blob/main/images/macos/macos-10.15-Readme.md#xcode

PyOxidizer's docs for Apple SDK targeting are at https://pyoxidizer.readthedocs.io/en/stable/pyoxidizer_distributing_macos.html#pyoxidizer-distributing-macos-build-machine-requirements

indygreg added a commit to indygreg/python-build-standalone that referenced this issue Apr 28, 2022
The bane of weak symbols on macOS has come back to haunt us.
(See indygreg/PyOxidizer#373 for previous
battles.)

In #122
we tracked down a runtime failure to the fact that CPython 3.8
didn't properly backport weak symbol handling support. So, if
you build with a modern SDK targeting an older SDK (which we do as
of 63f13fb), the linker will
insert a weak symbol. However, CPython doesn't have the runtime
guards and will attempt to dereference it, causing a crash.

Up to this point, our strategy for handling this mess was to
stop using symbols on all Python versions when we found one to
be causing an issue. This was crude, but effective.

In recent commits, we implemented support for leveraging the
macOS SDK .tbd files for validating symbol presence. We can now
cross reference undefined symbols in our binaries against what
the SDKs tell us is present and screen for missing symbols. This
helps us detect strong symbols that aren't present on targeted
SDK versions.

For weak symbols, I'm not sure if we can statically analyze the
Mach-O to determine if a symbol is guarded. I _think_ the guard
is a compiler built-in and gets converted to a function call, or
maybe inline assembly. We _might_ have to disassemble if we wanted
to catch unguarded weakly referenced symbols. Yeah, no.

In this commit, we effectively change our strategy for weak symbol
handling.

Knowing that CPython 3.9+ should have guarded weak symbols everywhere,
we only ban symbol use on CPython 3.8, specifically x86-64 3.8 since
the aarch64 build targets macOS SDK 11, which has the symbols we
need.

We also remove the one-off validation check for 2 banned symbols. In
its place we add validation that only a specific allow list of weak
symbols is present on CPython 3.8 builds.

As part of developing this, I found yet more bugs in other programs.

CPython had some pragmas forcing symbols to be weak but the pragmas
weren't protected by an #if guard. This caused a compiler failure if
we prevented the symbols from being defined.

libffi was also using mkostemp without runtime guards. I'm unsure if
Python would ever call into a function that would attempt to resolve
this symbol. But if it does it would crash on 10.9. So we disable that
symbol for builds targeting 10.9.
indygreg added a commit to indygreg/python-build-standalone that referenced this issue Apr 28, 2022
The bane of weak symbols on macOS has come back to haunt us.
(See indygreg/PyOxidizer#373 for previous
battles.)

In #122
we tracked down a runtime failure to the fact that CPython 3.8
didn't properly backport weak symbol handling support. So, if
you build with a modern SDK targeting an older SDK (which we do as
of 63f13fb), the linker will
insert a weak symbol. However, CPython doesn't have the runtime
guards and will attempt to dereference it, causing a crash.

Up to this point, our strategy for handling this mess was to
stop using symbols on all Python versions when we found one to
be causing an issue. This was crude, but effective.

In recent commits, we implemented support for leveraging the
macOS SDK .tbd files for validating symbol presence. We can now
cross reference undefined symbols in our binaries against what
the SDKs tell us is present and screen for missing symbols. This
helps us detect strong symbols that aren't present on targeted
SDK versions.

For weak symbols, I'm not sure if we can statically analyze the
Mach-O to determine if a symbol is guarded. I _think_ the guard
is a compiler built-in and gets converted to a function call, or
maybe inline assembly. We _might_ have to disassemble if we wanted
to catch unguarded weakly referenced symbols. Yeah, no.

In this commit, we effectively change our strategy for weak symbol
handling.

Knowing that CPython 3.9+ should have guarded weak symbols everywhere,
we only ban symbol use on CPython 3.8, specifically x86-64 3.8 since
the aarch64 build targets macOS SDK 11, which has the symbols we
need.

We also remove the one-off validation check for 2 banned symbols. In
its place we add validation that only a specific allow list of weak
symbols is present on CPython 3.8 builds.

As part of developing this, I found yet more bugs in other programs.

CPython had some pragmas forcing symbols to be weak but the pragmas
weren't protected by an #if guard. This caused a compiler failure if
we prevented the symbols from being defined.

libffi was also using mkostemp without runtime guards. I'm unsure if
Python would ever call into a function that would attempt to resolve
this symbol. But if it does it would crash on 10.9. So we disable that
symbol for builds targeting 10.9.
indygreg added a commit to indygreg/python-build-standalone that referenced this issue Apr 28, 2022
The bane of weak symbols on macOS has come back to haunt us.
(See indygreg/PyOxidizer#373 for previous
battles.)

In #122
we tracked down a runtime failure to the fact that CPython 3.8
didn't properly backport weak symbol handling support. So, if
you build with a modern SDK targeting an older SDK (which we do as
of 63f13fb), the linker will
insert a weak symbol. However, CPython doesn't have the runtime
guards and will attempt to dereference it, causing a crash.

Up to this point, our strategy for handling this mess was to
stop using symbols on all Python versions when we found one to
be causing an issue. This was crude, but effective.

In recent commits, we implemented support for leveraging the
macOS SDK .tbd files for validating symbol presence. We can now
cross reference undefined symbols in our binaries against what
the SDKs tell us is present and screen for missing symbols. This
helps us detect strong symbols that aren't present on targeted
SDK versions.

For weak symbols, I'm not sure if we can statically analyze the
Mach-O to determine if a symbol is guarded. I _think_ the guard
is a compiler built-in and gets converted to a function call, or
maybe inline assembly. We _might_ have to disassemble if we wanted
to catch unguarded weakly referenced symbols. Yeah, no.

In this commit, we effectively change our strategy for weak symbol
handling.

Knowing that CPython 3.9+ should have guarded weak symbols everywhere,
we only ban symbol use on CPython 3.8, specifically x86-64 3.8 since
the aarch64 build targets macOS SDK 11, which has the symbols we
need.

We also remove the one-off validation check for 2 banned symbols. In
its place we add validation that only a specific allow list of weak
symbols is present on CPython 3.8 builds.

As part of developing this, I discovered that libffi was also using
mkostemp without runtime guards. I'm unsure if Python would ever call
into a function that would attempt to resolve this symbol. But if it
does it would crash on 10.9. So we disable that symbol for builds
targeting 10.9.
indygreg added a commit to indygreg/python-build-standalone that referenced this issue Apr 29, 2022
The bane of weak symbols on macOS has come back to haunt us.
(See indygreg/PyOxidizer#373 for previous
battles.)

In #122
we tracked down a runtime failure to the fact that CPython 3.8
didn't properly backport weak symbol handling support. So, if
you build with a modern SDK targeting an older SDK (which we do as
of 63f13fb), the linker will
insert a weak symbol. However, CPython doesn't have the runtime
guards and will attempt to dereference it, causing a crash.

Up to this point, our strategy for handling this mess was to
stop using symbols on all Python versions when we found one to
be causing an issue. This was crude, but effective.

In recent commits, we implemented support for leveraging the
macOS SDK .tbd files for validating symbol presence. We can now
cross reference undefined symbols in our binaries against what
the SDKs tell us is present and screen for missing symbols. This
helps us detect strong symbols that aren't present on targeted
SDK versions.

For weak symbols, I'm not sure if we can statically analyze the
Mach-O to determine if a symbol is guarded. I _think_ the guard
is a compiler built-in and gets converted to a function call, or
maybe inline assembly. We _might_ have to disassemble if we wanted
to catch unguarded weakly referenced symbols. Yeah, no.

In this commit, we effectively change our strategy for weak symbol
handling.

Knowing that CPython 3.9+ should have guarded weak symbols everywhere,
we only ban symbol use on CPython 3.8, specifically x86-64 3.8 since
the aarch64 build targets macOS SDK 11, which has the symbols we
need.

We also remove the one-off validation check for 2 banned symbols. In
its place we add validation that only a specific allow list of weak
symbols is present on CPython 3.8 builds.

As part of developing this, I discovered that libffi was also using
mkostemp without runtime guards. I'm unsure if Python would ever call
into a function that would attempt to resolve this symbol. But if it
does it would crash on 10.9. So we disable that symbol for builds
targeting 10.9.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants