tuhaihe commented on code in PR #1151:
URL: https://github.com/apache/cloudberry/pull/1151#discussion_r2139105939


##########
configure.ac:
##########
@@ -932,7 +933,40 @@ PGAC_ARG_BOOL(enable, pax, no,
               [enable PAX support],
               [AC_DEFINE(USE_PAX_STORAGE, 1,
                          [Define to 1 to support PAX])])
-AC_MSG_RESULT([checking whether to build with PAX support ... $enable_pax])
+if test "$enable_pax" = yes; then
+  # Check protobuf >= 3.5.0
+  PKG_CHECK_MODULES([PROTOBUF], [protobuf >= 3.5.0],
+    [AC_DEFINE([HAVE_PROTOBUF], [1], [Define if protobuf is available])],
+    [AC_MSG_ERROR([protobuf >= 3.5.0 is required for PAX support])]
+  )
+
+  # Check libzstd >= 1.4.0
+  PKG_CHECK_MODULES([ZSTD], [libzstd >= 1.4.0],
+    [AC_DEFINE([HAVE_ZSTD], [1], [Define if zstd is available])],
+    [AC_MSG_ERROR([libzstd >= 1.4.0 is required for PAX support])]
+  )
+
+  # Check cmake >= 3.11.0 using AX_COMPARE_VERSION
+  AC_PATH_PROG([CMAKE], [cmake], [no])
+  if test "$CMAKE" = "no"; then
+    AC_MSG_ERROR([cmake is required for PAX support but was not found in PATH])
+  fi
+
+  AC_MSG_CHECKING([CMake version])
+  CMAKE_VERSION=`$CMAKE --version | head -n1 | sed 
's/[^0-9]*\([0-9][0-9.]*\).*/\1/'`
+  AC_MSG_RESULT([$CMAKE_VERSION])
+
+  AX_COMPARE_VERSION([$CMAKE_VERSION], [ge], [3.11.0],
+    [],
+    [AC_MSG_ERROR([cmake >= 3.11.0 is required for PAX support])]
+  )

Review Comment:
   I just raised the idea that we can only verify whether protobuf, cmake, or 
libzstd are installed. The default versions of those libraries under Rocky8 all 
meet the minimum version requirement, so we can simplify the version check for 
them here.
   
   Only the g++ version requires at least version 9+ or it will fail to build 
the PAX-related modules. @yjhjstz 



-- 
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: commits-unsubscr...@cloudberry.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cloudberry.apache.org
For additional commands, e-mail: commits-h...@cloudberry.apache.org

Reply via email to