build-commons.sh: check for OpenSSL 1.1 on macOS (#43037)
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Mon, 5 Oct 2020 17:04:13 +0000 (19:04 +0200)
committerGitHub <noreply@github.com>
Mon, 5 Oct 2020 17:04:13 +0000 (19:04 +0200)
We're installing openssl@1.1 from Homebrew so we should check that version.
It looks like CI Macs don't set the /usr/local/opt/openssl symlink anymore.

eng/native/build-commons.sh

index 2e94d68..dc1641f 100755 (executable)
@@ -55,7 +55,7 @@ check_prereqs()
         if ! pkg-config openssl ; then
             # We export the proper PKG_CONFIG_PATH where openssl was installed by Homebrew
             # It's important to _export_ it since build-commons.sh is sourced by other scripts such as build-native.sh
-            export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig
+            export PKG_CONFIG_PATH=/usr/local/opt/openssl@1.1/lib/pkgconfig
             # We try again with the PKG_CONFIG_PATH in place, if pkg-config still can't find OpenSSL, exit with an error, cmake won't find OpenSSL either
             pkg-config openssl || { echo >&2 "Please install openssl before running this script, see https://github.com/dotnet/runtime/blob/master/docs/workflow/requirements/macos-requirements.md"; exit 1; }
         fi