You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "kou (via GitHub)" <gi...@apache.org> on 2023/06/29 01:39:48 UTC

[GitHub] [arrow] kou commented on a diff in pull request #36336: GH-36329: [C++][CI] Use OpenSSL 3 on macOS

kou commented on code in PR #36336:
URL: https://github.com/apache/arrow/pull/36336#discussion_r1245991191


##########
cpp/cmake_modules/FindOpenSSLAlt.cmake:
##########
@@ -22,17 +22,24 @@ endif()
 if(APPLE AND NOT OPENSSL_ROOT_DIR)
   find_program(BREW brew)
   if(BREW)
-    execute_process(COMMAND ${BREW} --prefix "openssl@1.1"
-                    OUTPUT_VARIABLE OPENSSL11_BREW_PREFIX
+    execute_process(COMMAND ${BREW} --prefix "openssl"

Review Comment:
   `openssl` is the default OpenSSL formula. In general, it refers the latest OpenSSL formula (`openssl@3.1` now).
   If `openssl@3.1` isn't installed, `brew --prefix openssl` is failed.
   
   Then, this process falls back to `openssl@3.0`, then `openssl@1.1`. Because we want to use newer OpenSSL as much as possible.



##########
cpp/cmake_modules/FindOpenSSLAlt.cmake:
##########
@@ -22,17 +22,24 @@ endif()
 if(APPLE AND NOT OPENSSL_ROOT_DIR)
   find_program(BREW brew)
   if(BREW)
-    execute_process(COMMAND ${BREW} --prefix "openssl@1.1"
-                    OUTPUT_VARIABLE OPENSSL11_BREW_PREFIX
+    execute_process(COMMAND ${BREW} --prefix "openssl"
+                    OUTPUT_VARIABLE OPENSSL_BREW_PREFIX
                     OUTPUT_STRIP_TRAILING_WHITESPACE)
-    if(OPENSSL11_BREW_PREFIX)
-      set(OPENSSL_ROOT_DIR ${OPENSSL11_BREW_PREFIX})
+    if(OPENSSL_BREW_PREFIX)
+      set(OPENSSL_ROOT_DIR ${OPENSSL_BREW_PREFIX})
     else()
-      execute_process(COMMAND ${BREW} --prefix "openssl"
-                      OUTPUT_VARIABLE OPENSSL_BREW_PREFIX
+      execute_process(COMMAND ${BREW} --prefix "openssl@3.0"
+                      OUTPUT_VARIABLE OPENSSL3_BREW_PREFIX
                       OUTPUT_STRIP_TRAILING_WHITESPACE)
-      if(OPENSSL_BREW_PREFIX)
-        set(OPENSSL_ROOT_DIR ${OPENSSL_BREW_PREFIX})
+      if(OPENSSL11_BREW_PREFIX)

Review Comment:
   Ah, yes. Good catch!
   
   Ah, wait. I should have used `OPENSSL30_...` for it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org