Hey <@U9UUY3CU9> and <@UELMFD9PG> the latest FFI b...
# maintainers
r
Hey @Matt (pactflow.io / pact-js / pact-go) and @Yousaf Nabi (pactflow.io) the latest FFI build failed on MacOS.
blobwave 1
There are these two lines in the build script:
Copy code
export SDKROOT=$(xcrun -sdk macosx11.1 --show-sdk-path)
export MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.1 --show-sdk-platform-version)
We need to understand why there is a need to target the SDK like this (what is this doing to the generated dynlib) and also why it is failing
m
was that me? I’d need to go back to check why we did that. Hopefully there is an issue. I assume it’s not related to the install_name shenanigans. Perhaps it was an attempt to build on an older version so that it would be forward compatible?
πŸ‘Œ 1
y
im not sure why we need the sdkroot env var but you can fix it with this action https://github.com/maxim-lobanov/setup-xcode and set to xcode 12.4 https://github.com/pact-foundation/pact-reference/commit/2e02838e9f1196f03e6e6ed38e40d45bfa6ddc6d macos gha github runners should have that xcode version installed but its not linking. i think the only thing that matters there is setting the maosx deployment target to the oldest version you can support
πŸ‘ 2
tested to resolve on my fork. btw
need to understand why there is a need to target the SDK like this (what is this doing to the generated dynlib) and also why it is failing
it allows newer versions of xcode to generate binaries which can be used by older versions of macos.
πŸ‘ 2
woop woop green build πŸ’š
j
Thanks!
Could it be worth finding the oldest SDK version dynamically on the runner by inspecting the contents of the
/Library/Developer/CommandLineTools/SDKs/
directory? E.g., something like:
Copy code
find /Library/Developer/CommandLineTools/SDKs/ -type d -maxdepth 1 | sort -V | tail -n+2 | head -n1
or perhaps
Copy code
find /Library/Developer/CommandLineTools/SDKs/ -type d -maxdepth 1 -path '*.sdk' | sort -V | head -n1