You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2025/07/20 19:19:04 UTC

(kudu) branch master updated: KUDU-3678: Fix cmake compilation in MacOS

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

alexey 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 e902cc29b KUDU-3678: Fix cmake compilation in MacOS
e902cc29b is described below

commit e902cc29bd6343ec92700ac26a6a1f837df14def
Author: Jeffrey Smith <je...@gmail.com>
AuthorDate: Sat Jul 19 13:45:30 2025 -0400

    KUDU-3678: Fix cmake compilation in MacOS
    
    This patch fixes compiling cmake in MacOS by removing an old define
    that sets fdopen to NULL. This change is already present in cmake
    version 3.30 and greater.
    
    Change-Id: I8ceec62d5c0fd7ff1564fec10ab4761b699c4e6d
    Reviewed-on: http://gerrit.cloudera.org:8080/23196
    Tested-by: Alexey Serbin <al...@apache.org>
    Reviewed-by: Alexey Serbin <al...@apache.org>
---
 thirdparty/download-thirdparty.sh                    |  7 ++++---
 thirdparty/patches/cmake-fix-macos-compilation.patch | 18 ++++++++++++++++++
 2 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/thirdparty/download-thirdparty.sh b/thirdparty/download-thirdparty.sh
index d867efa22..8230c56cc 100755
--- a/thirdparty/download-thirdparty.sh
+++ b/thirdparty/download-thirdparty.sh
@@ -235,18 +235,19 @@ needs_patched_cmake() {
   fi
   return 0
 }
-
-CMAKE_PATCHLEVEL=1
 CMAKE_PATCHES=""
+CMAKE_PATCHLEVEL=2
 if needs_patched_cmake; then \
  CMAKE_PATCHES="patch -p1 < $TP_DIR/patches/cmake-issue-15873-dont-use-select.patch"
 fi
 
+# cmake-fix-macos-compilation should be removed once cmake is upgraded to version 3.30 or later
 fetch_and_patch \
  cmake-${CMAKE_VERSION}.tar.gz \
  $CMAKE_SOURCE \
  $CMAKE_PATCHLEVEL \
- "$CMAKE_PATCHES"
+ "$CMAKE_PATCHES" \
+ "patch -p1 < $TP_DIR/patches/cmake-fix-macos-compilation.patch"
 
 SNAPPY_PATCHLEVEL=0
 fetch_and_patch \
diff --git a/thirdparty/patches/cmake-fix-macos-compilation.patch b/thirdparty/patches/cmake-fix-macos-compilation.patch
new file mode 100644
index 000000000..a3680f8f4
--- /dev/null
+++ b/thirdparty/patches/cmake-fix-macos-compilation.patch
@@ -0,0 +1,18 @@
+--- a/Utilities/cmzlib/zutil.h	2025-07-18 14:44:11
++++ b/Utilities/cmzlib/zutil.h	2025-07-18 14:47:27
+@@ -139,15 +139,6 @@
+ 
+ #if defined(MACOS) || defined(TARGET_OS_MAC)
+ #  define OS_CODE  7
+-#  ifndef Z_SOLO
+-#    if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
+-#      include <unix.h> /* for fdopen */
+-#    else
+-#      ifndef fdopen
+-#        define fdopen(fd,mode) NULL /* No fdopen() */
+-#      endif
+-#    endif
+-#  endif
+ #endif
+ 
+ #ifdef __acorn