You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by gr...@apache.org on 2020/01/29 17:58:43 UTC

[kudu] 01/02: [cmake_modules] fix GET_LINKER_VERSION on macOS Catalina

This is an automated email from the ASF dual-hosted git repository.

granthenke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit 0f3bb6508d97227aba7dd6320c2b1f49ef7bd418
Author: Grant Henke <gr...@apache.org>
AuthorDate: Wed Jan 29 11:22:43 2020 -0600

    [cmake_modules] fix GET_LINKER_VERSION on macOS Catalina
    
    On macOS Catalina the linker version is currently `530`.
    The current regex requires a second version component.
    The result is an error that looks like the following:
    
      CMake Error at cmake_modules/KuduLinker.cmake:160 (message):
        Could not extract ld64 version.  Linker version output:
      Call Stack (most recent call first):
        cmake_modules/KuduLinker.cmake:36 (GET_LINKER_VERSION)
        CMakeLists.txt:398 (APPEND_LINKER_FLAGS)
    
    To fix this the regex was updated to make the second version
    component optional.
    
    Change-Id: I11b43153279cc44766f5f03c7d59808d555d9321
    Reviewed-on: http://gerrit.cloudera.org:8080/15129
    Reviewed-by: Alexey Serbin <as...@cloudera.com>
    Tested-by: Kudu Jenkins
---
 cmake_modules/KuduLinker.cmake | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cmake_modules/KuduLinker.cmake b/cmake_modules/KuduLinker.cmake
index c447c73..d8dacfc 100644
--- a/cmake_modules/KuduLinker.cmake
+++ b/cmake_modules/KuduLinker.cmake
@@ -157,7 +157,8 @@ function(GET_LINKER_VERSION)
     # ld64 outputs the versioning information into stderr.
     # Sample:
     #   @(#)PROGRAM:ld  PROJECT:ld64-409.12
-    if (NOT "${LINKER_STDERR}" MATCHES "PROJECT:ld64-([0-9]+\\.[0-9]+)")
+    #   @(#)PROGRAM:ld  PROJECT:ld64-530
+    if (NOT "${LINKER_STDERR}" MATCHES "PROJECT:ld64-([0-9]+(\\.[0-9]+)?)")
       message(SEND_ERROR "Could not extract ld64 version. "
         "Linker version output: ${LINKER_STDOUT}")
     endif()