I'm trying to make a port (Aseprite) use the newer macOS 10.13 SDK on older 
macOS versions like 10.9, like this:


set min_sdk_version         10.13
if {${os.platform} eq "darwin" && [vercmp ${configure.sdk_version} < 
${min_sdk_version}]} {
    configure.sdk_version   ${min_sdk_version}
    configure.sdkroot       
${prefix}/Developer/SDKs/MacOSX${configure.sdk_version}.sdk
    depends_build-append    port:MacOSX${configure.sdk_version}.sdk
}


The port uses C++17 so it needs a newer MacPorts clang. MacPorts picks clang-17.

The port uses cmake and ninja and it fails:


-- Check for working C compiler: /opt/local/bin/clang-mp-17
-- Check for working C compiler: /opt/local/bin/clang-mp-17 - broken
CMake Error at /opt/local/share/cmake-3.29/Modules/CMakeTestCCompiler.cmake:67 
(message):
  The C compiler
    "/opt/local/bin/clang-mp-17"
  is not able to compile a simple test program.
  It fails with the following output:
...
    ld: unexpected token: !tapi-tbd-v3 file 
'/opt/local/Developer/SDKs/MacOSX10.13.sdk/usr/lib/libSystem.tbd' for 
architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see 
invocation)
    ninja: build stopped: subcommand failed.


The fact that we have a libtapi port made me think our toolchains supported 
this. Does anyone know how to make this work?


Reply via email to