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

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


The following commit(s) were added to refs/heads/master by this push:
     new 0046d90  [build] Fix building codegen on MacOS Mojave
0046d90 is described below

commit 0046d90cc5246ecda6f0c4a14c9577465279162b
Author: Attila Bukor <[email protected]>
AuthorDate: Fri Apr 5 11:35:42 2019 -0700

    [build] Fix building codegen on MacOS Mojave
    
    When macOS_SDK_headers_for_macOS_10.14 is installed setting the
    --sysroot to the default header location breaks the build, which is why
    there was a check whether /usr/include existed and only set --sysroot to
    the SDK path if it didn't.
    
    The problem with this is if something creates the /usr/include
    directory, the build will fail again. This commit changes the check to
    look for /usr/include/libc.h instead.
    
    Change-Id: I29ec74014bee3121bfb4a203dd7bfa8bac8f8321
    Reviewed-on: http://gerrit.cloudera.org:8080/12936
    Reviewed-by: Attila Bukor <[email protected]>
    Tested-by: Attila Bukor <[email protected]>
---
 src/kudu/codegen/CMakeLists.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/kudu/codegen/CMakeLists.txt b/src/kudu/codegen/CMakeLists.txt
index 33443b0..5ce82ac 100644
--- a/src/kudu/codegen/CMakeLists.txt
+++ b/src/kudu/codegen/CMakeLists.txt
@@ -89,12 +89,12 @@ set(IR_FLAGS
   ${PREFIXED_IR_PP_DEFS}
   ${PREFIXED_IR_INCLUDES})
 
-# /usr/include doesn't exist on macOS 10.14 (Mojave) with Xcode 10[1]. In this
-# case the --sysroot has to be set to the output of "xcrun --show-sdk-path" for
-# the thirdparty clang-6.0 to work correctly.
+# /usr/include doesn't have the necessary headers on macOS 10.14 (Mojave) with
+# Xcode 10[1]. In this case the --sysroot has to be set to the output of "xcrun
+# --show-sdk-path" for the thirdparty clang-6.0 to work correctly.
 #
 # [1] 
https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes
-if (APPLE AND NOT EXISTS /usr/include)
+if (APPLE AND NOT EXISTS /usr/include/libc.h)
   EXECUTE_PROCESS (COMMAND
     xcrun --show-sdk-path
     OUTPUT_STRIP_TRAILING_WHITESPACE

Reply via email to